简体   繁体   中英

Call Custom API to send email notification from Prometheus Alertmanager

I have set an alert rule in Prometheus for MongoDB metrics. Now want send an email notification, for that I want configure Alertmanager. I can not access SMTP server directly as per our project process. For that we have a custom developed API that I can only call.

Now I am little confused how I can call a custom API from alert manager configuration file (alertmanager.yml), in documentation it has been given how to give SMTP details.

Can anyone help to understand how I can call custom API for email notification.

Thanks!!!

I created a web hook for alertmanager here is the config i used in alertmanager:

receivers:
- name: 'general'
  webhook_config:
  - url: https://my-webhook:8080/
    send_resolved: true

Here is the doc on webhook (not a lot there)
Also here i found example how to configure it.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM