freshtracks

Configure Alerts

Receive important notifications about your Kubernetes environment.

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.

Step 1: Create Rules for Alerts

  1. 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
  1. Upload the configuration file using the FreshTracks Recording Rules API

Step 2: Configure how Alerts are Sent

  1. Verify that your configuration has some some alerting rules.
  2. 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
  1. Upload the configuration file using the FreshTracks Alertmanager API