Skip to content
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

Error Enabling Prometheus Integration #141

Open
prasadkris opened this issue Oct 14, 2024 · 1 comment
Open

Error Enabling Prometheus Integration #141

prasadkris opened this issue Oct 14, 2024 · 1 comment
Assignees
Labels
needs feedback We'll only proceed once we hear from you again

Comments

@prasadkris
Copy link

prasadkris commented Oct 14, 2024

Greetings,

I am running the latest icinga-kubernetes stack, and it works fine overall. However, I attempted to enable Prometheus integration by adding the following into the configuration:

  prometheus:
     url: http://prometheus-operator-kube-p-prometheus.ops-monitoring.svc.cluster.local:9090

Unfortunately, it fails with the error message below.

I1014 06:55:26.085874       1 main.go:69] Starting Icinga for Kubernetes (0.2.0)
I1014 06:55:26.087175       1 database.go:286] "Connecting to database" logger="database"
F1014 06:55:30.725815       1 main.go:385] error querying Prometheus: can't retry: execution: found duplicate series for the match group {} on the right hand-side of the operation: [{__name__="node_memory_MemTotal_bytes", container="node-exporter", endpoint="http-metrics", job="node-exporter", namespace="ops-monitoring", pod="prometheus-operator-prometheus-node-exporter-gdjwk", service="prometheus-operator-prometheus-node-exporter"}, {__name__="node_memory_MemTotal_bytes", container="node-exporter", endpoint="http-metrics", job="node-exporter", namespace="ops-monitoring", pod="prometheus-operator-prometheus-node-exporter-j4tq5", service="prometheus-operator-prometheus-node-exporter"}];many-to-many matching not allowed: matching labels must be unique on one side

Any idea how we can resolve this? Thanks! 🙏🏻

@jrauh01
Copy link
Collaborator

jrauh01 commented Dec 13, 2024

Hi @prasadkris,

I suspect the error in following query:

  • sum by (instance, namespace, pod) (container_memory_usage_bytes) / on () group_left () label_replace(node_memory_MemTotal_bytes, "instance", "$1", "node", "(.*)")

A solution for that could be the following query:

  • sum by (instance, namespace, pod) (container_memory_usage_bytes) / on (instance) group_left () label_replace(sum by (node) (node_memory_MemTotal_bytes), "instance", "$1", "node", "(.*)")

As I don't have the data from your system it would be nice if you could execute both of the queries in your Prometheus web interface and tell me if the first one is failing and the second one is returning data.

Best regards,
Johannes

@lippserd lippserd assigned prasadkris and unassigned jrauh01 Dec 18, 2024
@lippserd lippserd added the needs feedback We'll only proceed once we hear from you again label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs feedback We'll only proceed once we hear from you again
Projects
None yet
Development

No branches or pull requests

3 participants