Create a new alert
Here we will add an XCC alert. To add an MTA alert, apply the same changes but in themonitored_mta folder.
MTA and XCC alerts
MTA and XCC alerts
Custom alerting rules should be added to
/monitoring/prometheus/alert/custom.yml for alerting rules evaluated on XCC and to /monitored_mta/prometheus/alert/custom.yml for alerting rules evaluated on the MTAs. In addition, custom rules must be activated in /monitoring/prometheus/prometheus.yml, respectively /monitored_mta/prometheus/prometheus.yml.- Open the Expert Editor.
-
Navigate to the
/monitoring/prometheus/alert. -
Add the custom alert to
custom.yml. How to write alerts is described in the official Prometheus Documentation. -
Add
custom.ymlto the list ofrule_filesin/monitoring/prometheus/prometheus.yml:Use custom.ymlDo not edit default rules files. Changes made to the default files might be overwritten by software updates. However you can deactivate default rule files by commenting them out in, or removing them from therule_fileslist. - Click Publish. The monitoring configuration becomes active within about one minute.
Customize a notification template
The following instructions show how to customize a notification template for XCC alerts. For MTA alerts, apply the same changes but in themonitored_mta folder.
- Open the Expert Editor.
-
Navigate to the
/monitoring/alertmanager/template/custom.tmpl, and edit the template. These templates use Go templating, some examples can be found in the Alerting documentation. -
Enable the template by uncommenting the corresponding line in the current Alertmanager config file
monitoring/alertmanager/alertmanager.yml, and comment out the default template line: - Click Publish. The notification template becomes active within about one minute.