When i am creating a dashboard for a pod memory us...
# general
p
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
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
I have tried that too, but its not working.
@Brian Clark
b
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!