kubernetes-monitoring / kubernetes-mixin

A set of Grafana dashboards and Prometheus alerts for Kubernetes.
Apache License 2.0
2.12k stars 597 forks source link

fix: correct quotas on prometheus federation HA #856

Closed aslafy-z closed 1 month ago

aslafy-z commented 1 year ago

When querying a child prometheus that uses federation to gather his metrics, an additional label is added to the metrics (eg: prometheus_replica). When a rollout is done on the parent prometheuses, there could be two metrics for the same time frame. This causes the scalar( function to return NaN as stated in the documentation, https://prometheus.io/docs/prometheus/latest/querying/functions/#scalar. Using scalar(max( instead of scalar( fixes the issue.

replaces https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/855

github-actions[bot] commented 2 months ago

This PR has been automatically marked as stale because it has not had any activity in the past 30 days.

The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed in 7 days if there is no new activity.

Thank you for your contributions!

github-actions[bot] commented 1 month ago

This PR has been automatically marked as stale because it has not had any activity in the past 30 days.

The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed in 7 days if there is no new activity.

Thank you for your contributions!

aslafy-z commented 1 month ago

I will resolve conflicts asap

aslafy-z commented 1 month ago

@povilasv Can you please give a look? Thank you