This example shows how to configure alert rules in Kyma and to define a new alert rule for AlertManager.
- Kyma as the target deployment environment.
NOTE: You need access to the
kyma-system
Namespace to execute the following steps.
-
Create a ConfigMap for the alert-rule.
kubectl apply -f deployment/alert-rule-configmap.yaml -n kyma-system
-
Run the
port-forward
command on thecore-prometheus
service to access the Prometheus dashboard.kubectl port-forward pod/prometheus-core-0 -n kyma-system 9090:9090
Find the http-db-service-is-not-running rule here.
As the
http-db-service
Deployment does not the exist, the alert is fired here.
To stop the alert from getting fired, create a Deployment as follows:
kubectl apply -f ../http-db-service/deployment/deployment.yaml
Run the following commands to completely remove the example and all its resources from the cluster:
- Remove the
http-db-service-is-not-running
alert rule from the cluster.
kubectl delete cm -n kyma-system -l example=monitoring-alert-rules
- Remove the
http-db-service
Deployment which stopped alerts firing.
kubectl delete -f ../http-db-service/deployment/deployment.yaml