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

Not able to do maths on the query expression #72

Open
Tchoupinax opened this issue Feb 14, 2024 · 1 comment
Open

Not able to do maths on the query expression #72

Tchoupinax opened this issue Feb 14, 2024 · 1 comment

Comments

@Tchoupinax
Copy link

Hey!

I tested to improve the default dashboard by customized prometheus query and I'm surprised that it does not work with the ArgoCD extension while it works directly with Prometheus.

sum(rate(container_memory_usage_bytes{pod=~\"{{ "{{" }}.name{{ "}}" }}\", container!=\"POD\", image!=\"\", container!=\"\", container_name!=\"POD\"}[5m])) by (pod)/1000/1000"

For instance, I want to display the memory usage in megabytes (so we divide by 10^6). However, it continues to display the metrics in bytes in argoCD
Could you help me to know why it does not work?

Thank you!

@eduardomsec
Copy link

Hey!

Try this

round(sum(container_memory_usage_bytes{pod=~\"{{.name}}\", container!=\"POD\", image!=\"\", container!=\"\", container_name!=\"POD\"}) by (pod) / 1024 / 1024, 0.01)

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

No branches or pull requests

2 participants