Hi all,
How can we add alert manager on Rancher console as I have to test it with Prometheus -monitoring service. I am not able to find etc/alertmanager.config.xml in ssh.
You have to create a alertmanager service.
ADDING ALERTMANAGER
In order to call the receiver hook, Alertmanager will need to be launched. You can add it to the Prometheus stack. Click on Add Service in the Prometheus stack. Use the prom/alertmanager to add a service. Make sure to map port 9093:9093 when adding the service. After the service has started, exec into the container to update the etc/alertmanager/config.yml. In the file, add the URL of the webhook so that it will send a POST request to the URL when the alert is fired. After the file is updated with the URL information, restart the service.
EXAMPLE ETC/ALERTMANAGER/CONFIG.YML
route:
repeat_interval: 5h
routes:
- match:
action: up
receiver: “webhook-receiver-up” - match:
action: down
receiver: “webhook-receiver-down”
receivers: - name: “webhook-receiver-up”
webhook_configs:- url: <WEBHOOK_URL>
send_resolved: true
- url: <WEBHOOK_URL>
- name: “webhook-receiver-down”
webhook_configs:- url: <WEBHOOK_URL>
send_resolved: true
- url: <WEBHOOK_URL>
Source: https://rancher.com/docs/rancher/v1.6/en/cattle/webhook-service/