Skip to main content
Prerequisites

Create a new alert

Here we will add an XCC alert. To add an MTA alert, apply the same changes but in the monitored_mta folder.
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.
  1. Open the Expert Editor.
  2. Navigate to the /monitoring/prometheus/alert.
  3. Add the custom alert to custom.yml. How to write alerts is described in the official Prometheus Documentation.
  4. Add custom.yml to the list of rule_files in /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 the rule_files list.
  5. 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 the monitored_mta folder.
  1. Open the Expert Editor.
  2. 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.
  3. 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:
  4. Click Publish. The notification template becomes active within about one minute.