I think we're getting off topic here; we are now just into general system 
administration. Briefly:

* "systemctl stop alertmanager" will stop the systemd-managed version of 
alertmanager, so you can run a separate instance at the CLI.

* The file which contains the systemd config depends on where you (or your 
packager) put it.  It might be /etc/systemd/system/alertmanager.service. 
After editing this file, you need to do "systemctl daemon-reload" to pick 
up the changes.

Your logs show a single alert at 14:16:15 and another single alert at 
14:18:15.  Did you get three copies of both of these delivered?

I'm afraid I don't really have any idea what's happening.  Your system 
sends out alerts 3 times; my system (and apparently everybody else's) only 
sends out alerts once.

I can only suggest that you check the whole of your prometheus 
configuration from top to bottom.  Could you be installing three separate 
alerting rules, all of which alert on the same condition?? The problem will 
be something silly like that.

FWIW, I have alerts very similar to yours:

# In prometheus.yml
rule_files:
  - /etc/prometheus/rules.d/*.yml

# /etc/prometheus/rules.d/alert-certificate.yml
groups:
  - name: Certificates
    interval: 1m
    rules:
      - alert: CertificateInvalid
        expr: probe_success{module="certificate"} != 1
        for: 3m
        labels:
          severity: critical
        annotations:
          summary: 'Certificate is invalid or service could not be reached'
  - name: CertificateLifetime
    interval: 60m
    rules:
      - alert: CertificateExpiring
        expr: (probe_ssl_earliest_cert_expiry - time())/86400 < 14
        for: 120m
        labels:
          severity: warning
        annotations:
          summary: 'Certificate is expiring soon: {{ $value }} days'

and I don't get duplicates.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/769368f5-9853-4dd1-82b9-b8e374dcebdfo%40googlegroups.com.

Reply via email to