- Open the Expert Editor.
-
In the following we will activate alerting for XCC. Repeat all steps below in the
monitored_mtafolder instead ofmonitoringto activate MTA alerts. -
Open the file
/monitoring/alertmanager/alertmanager.yml. Create it if it does not exist. All alert configuration will be done in this file. -
Choose the desired alert channel and configure it in
alertmanager.yml. Here we provide examples for email, webhook and Slack integration. You can find the full list of supported integrations on the official Prometheus Documentation.- Email receiver (basic)
- Email receiver (with routing)
- Webhook receiver
- Slack receiver
- No alerts (default)
This example configuration sends all alerts to a specified email address, see also prometheus.io - email_config. -
Optional: You also find some predefined examples in the same folder. Only the file
alertmanager.ymlwill be considered, so they can be safely ignored or deleted if not used.alertmanager.email.yml- Email notification examples, one basic example and one with severity based routing.alertmanager.webhook.yml- Generic webhook examplealertmanager.slack.yml- Slack integration example.
Mixing receivers
The different examples can be mixed by configuring differentreceiversand adjusting therouteconfiguration accordingly, similar to the Email receiver (with routing) example. Alertmanager supports more receivers and allows for more advanced configuration (e.g. alerts being sent to more than one receiver, complex routing, etc.), see also prometheus.io - Route-related settings. - Click Publish. The alerting becomes active within about one minute. Have a look at Test and Troubleshoot Alerts to verify them.
Optional: Enable notifications for resolved alerts
If you want to enable notifications about resolved alerts, you have to add thesend_resolved property and set it to true for your selected receiver.
- Open your active
alertmanager.ymlconfig file (once for the XCC and once for the MTA). - Find the
receiversgroup, and under the chosen receiver config addsend_resolved: true. For example, the receivers config for email alerts should look like this: - Click Publish. The monitoring configuration becomes active within about one minute.