Create new alerting rules based on platform-defined metrics in OpenShift
Issue
- How to create an alerting rule for platform-level metrics?
- How to create
PrometheusRules
for cluster-related metrics (openshift-
,kube-
anddefault
namespaces)? -
We have one custom metrics whose main purpose is to define an alert using the
kube_node_labels
metric. However, inside of Thanos ruler the expression is modified to have namespace filter:kube_node_labels{namespace="platform"}
-
In the transformed expression,
kube_node_labels{namespace="platform"}
will not work since thekube_node_labels
metrics do not have a namespace tag. - How to scrape the metrics for
kube-state-metrics
which are by default only scrapped by Prometheus inopenshift-monitoring
?
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.