-
-
Save vutkin/9e4feaa1331b59a0c9631ccfcd0359e7 to your computer and use it in GitHub Desktop.
Dynamic prometheus alert rules based on team label
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List of kube_*_labels metrics - not all of these are useful for alerting. | |
# kube_certificatesigningrequest_labels | |
kube_certificatesigningrequest_labels * on (certificatesigningrequest) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_cronjob_labels | |
kube_cronjob_labels * on (cronjob, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_daemonset_labels | |
kube_daemonset_labels * on (daemonset, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_deployment_labels | |
kube_deployment_labels * on (deployment, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_endpoint_labels | |
kube_endpoint_labels * on (endpoint, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_hpa_labels | |
kube_hpa_labels * on (hpa, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_ingress_labels | |
kube_ingress_labels * on (ingress, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_job_labels | |
kube_job_labels * on (job_name, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_namespace_labels | |
kube_namespace_labels * on (namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_node_labels | |
kube_node_labels * on (node) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_persistentvolume_labels | |
kube_persistentvolume_labels * on (persistentvolume) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_persistentvolumeclaim_labels | |
kube_persistentvolumeclaim_labels * on (persistentvolumeclaim) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_pod_labels | |
kube_pod_labels * on (pod, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_replicaset_labels | |
kube_replicaset_labels * on (replicaset, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_secret_labels | |
kube_secret_labels * on (secret, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_service_labels | |
kube_service_labels * on (service, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_statefulset_labels | |
kube_statefulset_labels * on (statefulset, namespace) group_right(label_team) ( | |
...insert expression here | |
) | |
# kube_storageclass_labels | |
kube_storageclass_labels * on (storageclass) group_right(label_team) ( | |
...insert expression here | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment