New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new metrics to be federated according to new alertRules #176
Conversation
|
Based on our call regarding this PR, I don't think it is possible to drop the label with specific key-value pair |
|
@bindrad does this pr needs a re-work? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
629ac88
to
f0dd6e3
Compare
…ated metric relabelling
This fixes two alerts
1. CephMonQuorumLost
2. CephMgrIsMissingReplicas
The metrics that have pod label whose value is prometheus-k8s-0 or prometheus-k8s-1 will be replaced with blank value.
Metric before change:
kube_pod_status_phase{container="kube-rbac-proxy-main", endpoint="https-main", job="kube-state-metrics", namespace="openshift-monitoring", phase="Succeeded", pod="prometheus-k8s-1", prometheus="openshift-monitoring/k8s", service="kube-state-metrics", uid="071feb6a-7d97-4ec3-93fd-938d27c5a097"}
Metrics after change:
kube_pod_status_phase{container="kube-rbac-proxy-main", endpoint="https-main", job="kube-state-metrics", namespace="openshift-monitoring", phase="Succeeded", prometheus="openshift-monitoring/k8s", service="kube-state-metrics", uid="071feb6a-7d97-4ec3-93fd-938d27c5a097"}
Signed-off-by: bindrad <dbindra@redhat.com>
|
@nb-ohad This PR can be merged |
This fixes two alerts
As there are two replicas of the Prometheus pod in the openshift-monitoring namespace and when we execute PersistentVolumeUsageNearFull and PersistentVolumeUsageCritical alertRule we get this error
Error executing query: found duplicate series for the match group {storageclass="ocs-storagecluster-cephfs"} on the right hand-side of the operation: [{__name__="kube_storageclass_info", container="kube-rbac-proxy-main", endpoint="https-main", job="kube-state-metrics", namespace="openshift-monitoring", prometheus="openshift-monitoring/k8s", provisioner="openshift-storage.cephfs.csi.ceph.com", reclaim_policy="Delete", service="kube-state-metrics", storageclass="ocs-storagecluster-cephfs", volume_binding_mode="Immediate"}, {__name__="kube_storageclass_info", container="kube-rbac-proxy-main", endpoint="https-main", job="kube-state-metrics", namespace="openshift-monitoring", pod="prometheus-k8s-1", prometheus="openshift-monitoring/k8s", provisioner="openshift-storage.cephfs.csi.ceph.com", reclaim_policy="Delete", service="kube-state-metrics", storageclass="ocs-storagecluster-cephfs", volume_binding_mode="Immediate"}];many-to-many matching not allowed: matching labels must be unique on one sideso we added labeldrop for pod label.But now CephMonQuorumLost alert requires pod label so we are relabelling in such a way that the metrics that have pod label whose value is prometheus-k8s-0 or prometheus-k8s-1 will be replaced with blank value.
Signed-off-by: bindrad dbindra@redhat.com