Configuring alerts in FreshTracks is a two step process. You must first create some rules for alerts and then configure how the alerts are sent. Both of these steps are similar to the existing Prometheus and Alert Manager configuration processes.
- Create a Prometheus alert rules configuration file. For detailed instructions, see the Prometheus alerting rules documentation.
groups: - name: example rules: - alert: HighErrorRate expr: job:request_latency_seconds:mean5m > 0.5 for: 10m labels: severity: page annotations: summary: High request latency
- Upload the configuration file using the FreshTracks Recording Rules API
- Verify that your configuration has some some alerting rules.
- Create a configuration file to define where alerts are sent. For detailed instructions, see the Prometheus configuration documentation.
global: slack_api_url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX receivers: - name: default-receiver slack_configs: - channel: "#testing" text: Some text for this alert route: group_by: - alertname group_interval: 5m group_wait: 10s receiver: default-receiver repeat_interval: 1h
- Upload the configuration file using the FreshTracks Alertmanager API