Correctly tweaking thresholds in Grafana Gauges

Hi,
I have been working with Grafana v.9.0.5 and Prometheus on the data collection side and I have a panel in my dashboard displaying a gauge. I would like to use thresholds, so that when the value goes beyond 10s should be yellow (warning) and red if it goes over 30s. I have two queries (one to calculate P95 and another for P99). For example, to calculate P99:

histogram_quantile(0.99, sum by(le) (rate(my_bucket{service_name="my_service"}[1m])))

What I cannot truly figure out is how I can set thresholds as per the above criteria:

Screenshot 2022-08-27 at 19.51.44

Here is my gauge:

Screenshot 2022-08-27 at 19.51.34

I have consulted this resource, but I am struggling to understand how the Base value influences the other thresholds. Is the Base value effectively what it is recorded in the dashboard? I would like to have around 5s as base, 10 as a warning threshold and the above 30s as a red one. Can you help? Is it incorrect to use a gauge in this case?

Thank you,

Regards

Hi @imminent,

Welcome to the :grafana: community support forums !!

I think you are getting confused with the % option in the Threshold.

Well, you can delete that one and create a new one e.g. seconds

You can follow this article as it describes how to do it:

I hope this answer your question.

Thank you so much, yes I have in the end worked out that I should have been using the absolute value and using that initially was not working because my metrics is in milliseconds! Thank you