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

Update platform_k8s_hpa_metrics.j2 #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuperThinking
Copy link
Member

@SuperThinking SuperThinking commented Mar 10, 2022

Make the numerator exact match (same as the denominator)

We could've also used a query like:

Grafana

kube_deployment_status_replicas_available{deployment=~"^{{deployment_name}}*"} / on (deployment) label_replace(kube_horizontalpodautoscaler_spec_min_replicas{horizontalpodautoscaler=~"^{{hpa_name}}.*"}, "deployment", "$1", "horizontalpodautoscaler", "(.*)")

but this assumes that hpa_name == deployment_name which might not always be true

Make the numerator exact match (same as the denominator)

Either this or we should support something like (to show all the metrics in a single graph)

```
kube_deployment_status_replicas_available{deployment=~"^track-order.*"} / on (deployment) label_replace(kube_horizontalpodautoscaler_spec_min_replicas{horizontalpodautoscaler=~"^track-order.*"}, "deployment", "$1", "horizontalpodautoscaler", "(.*)")
```
[Grafana](https://grafana.grofers.com/d/1LIco9Ynz/track-order-service-usered?orgId=1&from=now-1h&to=now&editPanel=32)
but this assumes that hpa_name == deployment_name which might not always be true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant