Alerting
Setup an alerting rule
Section titled “Setup an alerting rule”Using AlertManager, you can get alerted when your applications don’t meet your desired requirements.
This configuration creates a slack notification on the selected channel once the severity isn’t “none”.
Make sure the according PrometheusRule has been created in order to let this alert fire.
apiVersion: monitoring.coreos.com/v1alpha1kind: AlertmanagerConfigmetadata: name: slack-alert-config namespace: monitoringspec: route: receiver: 'slack-notifications' groupBy: ['alertname', 'severity'] groupWait: 30s groupInterval: 5m repeatInterval: 4h matchers: - name: severity value: none matchType: '!=' receivers: - name: 'slack-notifications' slackConfigs: - sendResolved: true apiURL: key: SLACK_WEBHOOK_URL name: slack-webhook-secret channel: '#alerts' title: '{{ .CommonAnnotations.summary }}' text: '{{ .CommonAnnotations.description }}'