Skip to content

Latest commit

 

History

History

prometheus-rules

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Prometheus Creating Alert Rules

This example shows how to create alert rules for Prometheus, using PrometheusRule CRD. Example defines two rules for two different type of event that can occur.

First rule fires an alert if application MyApp has disappered from Prometheus target discovery. Second rule fires an alert if application MyApp's failure rate measured on a time window of 2 minutes was higher than 10% in the last 10 minutes.

Alert rule conditions are defined based on PromQL expressions, with expr field in your rule definitions. To learn more about PromQL please refer to Prometheus documentation

  1. Run furyctl to get packages: furyctl install

  2. Add new rules based on conditions expressed with PromQL, add annotations to inform user about alert and specify an interval with for field.

  3. Run make build to see output of kustomize with your modifications.

  4. Once you're satisfied with generated output run make deploy to deploy it on your cluster.