When i am creating a dashboard for a pod memory usage, it is showing me a data properly and in the y axis unit which it use is bytes, now i want to get a that data into percentage (0-100), because i want to set a alert according to an usage of memory, so i have selected percentage unit, but after that it show me the percentage in 100000000%
i want to set a y axis from 0 - 100
So how can i able to do that, do you guys have any idea?
b
Brian Clark
09/03/2024, 2:58 PM
Try setting your axis to (0 - 1.0), and then in your alert threshold use decimal notation. For instance, for a threshold of 80%, set like
.80
.
p
Parth prajapati
09/03/2024, 8:39 PM
I have tried that too, but its not working.
Parth prajapati
09/03/2024, 8:40 PM
@Brian Clark
b
Brian Clark
09/03/2024, 8:55 PM
What values is
k8s_pod_memory_usage
meant to be in? Is it actually percentages, or is it something else ? Bytes?
I’m not working with K8s metrics (just boring Linux hosts 🙂 ), but what worked for me was to follow the basic guidelines for the memory alert from here.
The pattern seems to be:
Metric A - Memory used in bytes (hidden)
Metric B - All memory in bytes (hidden)
Formula of A/B (visible)
Alert threshold in fractions of percentages
So basically some number of bytes divided by some number of bytes expressed as a percentage.
There is a lot absorb with all the fast moving otel stuff, though, and I’m just starting to experiment with it!
SigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc.