AlertManager not running.

19 views
Skip to first unread message

Saurabh Jain

unread,
May 11, 2020, 5:34:00 AM5/11/20
to Prometheus Users

Hi,

I am trying to run AlertManager but it is not running even after I configured prometheus.yml file.

pls take a look of yml file and kindly advice if I am missing any configuration.

global:
  scrape_interval: 15s
  evaluation_interval: 15s
  external_labels:
    cluster: eu1
    replica: 0


 
alerting:
  alertmanagers:
  - static_configs:
    - targets:
       - localhost:9093

rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"
 
  - 'alerts.yml'
 
 
scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['127.0.0.1:9090','localhost:9182']
  - job_name: 'sidecar'
    static_configs:
      - targets: ['127.0.0.1:19090']


URL to access AlertManager which I am using -----   http://localhost:9093/#/alerts/
Thanks,
Saurabh

Yashar Nesabian

unread,
May 11, 2020, 5:50:08 AM5/11/20
to Prometheus Users
Hi
Can you please check your configuration file to see if they are correct?
for prometheus:
promtool check config /etc/prometheus/prometheus.yml

for alertmanager:
amtool check-config /etc/alertmanager/alertmanager.yml

Saurabh Jain

unread,
May 11, 2020, 5:52:31 AM5/11/20
to Prometheus Users
Hi,

Pls find below output

C:\Users\SaurabhJain\Desktop\Bharti\prometheus-2.17.1.windows-amd64.tar\prometheus-2.17.1.windows-amd64>promtool.exe check config prometheus.yml
Checking prometheus.yml
  SUCCESS: 1 rule files found

Checking alerts.yml
  SUCCESS: 1 rules found

Thanks

Yashar Nesabian

unread,
May 11, 2020, 6:20:24 AM5/11/20
to Prometheus Users
what is the content of your alertmanager.yml file? 
Did you evaluate them using the command "amtool"?
Do you get any errors when you run the alertmanager binary manually? e.g :
/usr/local/sbin/alertmanager \
--config.file=/etc/alertmanager/alertmanager.yml \
--storage.path=/var/lib/alertmanager


Saurabh Jain

unread,
May 11, 2020, 6:27:09 AM5/11/20
to Prometheus Users

Thank you Yashar ... I am able to run Alertmanager now .. There was special character in the file due to which it was getting exited from the process
Reply all
Reply to author
Forward
0 new messages