Connect Prometheus Alertmanager with All Quiet
Integrations > Inbound
Tab.Create New Integration
.Create integration
.scrape_configs
defines the job for scraping metrics from allquiet.app
, with a frequent interval of every 5 seconds. We’re observing our own platform in this example :). The https
scheme and/status
metrics path dictate how Prometheus accesses the data.
The rule_files
section tells Prometheus to load any alerting rules from files ending with .rules
.
The alerting section is crucial for the integration. It specifies that Prometheus should send alerts to an Alertmanager instance located at your-prometheus-alertmanager.yourdomain.com:9093
.
With these settings, Prometheus is configured to monitor allquiet.app
closely and forward alerts to Alertmanager, which then communicates with the All Quiet platform, ensuring efficient incident management.
prometheus.yml
file, the next step in integrating Prometheus with All Quiet is to set up alert rules. Alert rules in Prometheus define the conditions under which an alert should be fired. Below is a sample alert rule file that demonstrates how to create a rule for monitoring response times.
Here’s the alert rule configuration:
allquiet.app
. The rule Response Time slow
triggers an alert if the scrape_duration_seconds
for the allquiet.app
job exceeds 0.1 seconds, sustained over a period of 5 seconds. This means if the response time of the monitored service goes beyond 100 milliseconds and stays that way for at least 5 seconds, an alert is triggered.
The labels
section classifies the alert’s severity as critical
, which can be useful for advanced routing and handling the alert. The annotations section provides a descriptive message for the alert, e.g. indicating that the response time of the service is poor. :)
By implementing this alert rule, you can effectively monitor critical performance metrics like response times and ensure that such issues are promptly flagged and communicated to the All Quiet platform for efficient incident management.
route
section defines how alerts are processed and sent to receivers. group_wait
sets the time to wait before sending a notification about new alerts that are added to a group of alerts. group_interval
sets the interval between sending notifications about the same group of alerts, while repeat_interval
controls how long to wait before sending repeat notifications.receiver
parameter within the route
is set to 'allquiet'
. This tells Alertmanager to use the allquiet
receiver for notifications.receivers
section, a receiver named allquiet
is defined. This receiver useswebhook_configs
to send alerts to the specified URL, which is the webhook provided by All Quiet in Copy Webhook URL.Reload
to load your most recent payloads.← Select
to load the test payload from the previous step.allquiet_integration_mapping
resource for the Prometheus integration. Simply copy the syntax to your .tf file and tailor the resource to your team’s needs!