Prometheus Integration Guide
Prometheus is a system monitoring application that implements a highly dimensional data model. TaskCall's Prometheus integration allows alerts raised by the platform to be effectively dispatched to the correct on-call responders. The integration leverages Prometheus's AlertManager plugin. The alerts can be configured as desired with minor changes to the configuration files.
- The integration happens between a TaskCall service and Prometheus.
- Incidents will automatically resolve in TaskCall when metrics fall back within the normal threshold.
- At the moment this integration only supports alerts to be received from Prometheus to TaskCall.
- Go to Configurations > Services . Select the service you want to integrate with.
- Once you are on the Service details page, go to the Integrations tab. Click on New Integration.
- Give the integration a name.
- From the integration types, select the top radio button indicating that you are trying to use a built-in integration.
- From the list of built-in integrations, select Prometheus.
- Click Save.
- Copy the Integration Url that is issued for the integration.
On Prometheus Server
- Go to your Prometheus server.
- Install the Alertmanager plugin if you have not already. The Alertmanager allows notifications to be sent out when alerts are raised by Prometheus. If your server is hosted on Ubuntu, then you can read this article on How to Install and Configure Prometheus Alert Manager on Ubuntu.
- We will need to set up a webhook receiver in the configuration file. Read about Alertmanager configuration files if you are unfamiliar with them.
- Give the receiver a name . For example, TaskCall-Notification-Channel . Then, paste the Integration Url you copied over from TaskCall in the webhooks url field.
- The default route in Prometheus to send all alerts which do not match any custom routes to the new TaskCall receiver can be set up as shown below:
- You can also set up custom routes to send different types of alerts to different endpoints in TaskCall. For each endpoint you will need to set up a new integration to obtain a differnt Integration Url.
- Start the Alertmanager or restart it once you have set up the configuration file.
- Done! You should be all set up to receive alerts from Prometheus. You can send a test notification to yourself to test the set up with the following command:
TaskCall tries to make the alert details as contextual as possible by looking for details from the payload that is sent to it. Some of the fields that TaskCall looks for include annotations > summary, annotations > description and labels > severity. Here is a snippet of what alert rules can look like:
Please follow the Prometheus Alerting Rules documentation to learn more.