openebs / monitoring

OpenEBS Monitoring add-on. A set of Grafana, Prometheus, and alert manager plugins.
Apache License 2.0
32 stars 20 forks source link

rule error #38

Open jr0dd opened 3 years ago

jr0dd commented 3 years ago

I am getting errors with the 2nd rule for localpv. I believe it has to do with multiple pods that use the same pvc. I'm still pretty rough at writing rules or I would fix and send a pr.

Rule:

kube_persistentvolumeclaim_info unless (kube_persistentvolumeclaim_info
        * on(persistentvolumeclaim) group_left kube_pod_spec_volumes_persistentvolumeclaims_info)
        == 1

Error:

Error executing query: found duplicate series for the match group {persistentvolumeclaim="media"} on the right hand-side of the operation: [{__name__="kube_pod_spec_volumes_persistentvolumeclaims_info", container="kube-state-metrics", endpoint="http", instance="172.16.0.249:8080", job="kube-state-metrics", namespace="media", persistentvolumeclaim="media", pod="mkvtoolnix-844d557d49-499rx", service="kube-prometheus-stack-kube-state-metrics", volume="data"}, {__name__="kube_pod_spec_volumes_persistentvolumeclaims_info", container="kube-state-metrics", endpoint="http", instance="172.16.0.249:8080", job="kube-state-metrics", namespace="media", persistentvolumeclaim="media", pod="lidarr-6c86fc7f57-rpz95", service="kube-prometheus-stack-kube-state-metrics", volume="data"}];many-to-many matching not allowed: matching labels must be unique on one side
avishnu commented 2 months ago

@abhilashshetty04 can you check if this is still relevant after the OpenEBS restructuring?