Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.55 KB

README.md

File metadata and controls

52 lines (38 loc) · 2.55 KB

Alerting Rules Example

Overview

This example shows how to configure alert rules in Kyma.

  1. Define a new alerting rule in Prometheus.
  2. Configure Alertmanager to handle alerts.

Prerequisites

Installation

  1. Edit unhealthy-pods-rules.yaml by removing the line comment symbol #

  2. Edit alertmanager/values.yaml to enable the victorOps (and/or) slack integration. You will have to replace some data such a tokens and urls with your configuration.

  3. Run Kyma followed by the kubectl command to access prometheus dashboard. $ kubectl port-forward pod/prometheus-core-0 -n kyma-system 9090:9090 In http://localhost:9090/rules, you will find the rule, pod-not-running-rule. pod-not-running-rule

  4. After Kyma in fully running we should start to receive alerts in VictorOps or Slack.

  • VictorOps VictorOps alerts

  • Slack Slack alerts

Review you configuration if the alerts are not received after the expected time. You also should Validate alertmanager/values.yaml files.

  1. Create the required pod sample-metrics to solve the issue.
$ cd /examples/monitoring-alert-rules/k8s/
$ kubectl apply -f lambda-function.yaml
  • VictorOps VictorOps alerts
  • Slack Slack alerts

Cleanup

Run the following command to completely remove the example and all its resources from the cluster:

# notice that you do not need to indicate the Namespace, as the system created the resources using 'default namespace'
kubectl delete all -l example=monitoring-alert-rules