IMO you need to fix your service metrics. Prometheus best practice is to
follow the pattern of probe_success. Boolean values are far easier to
handle.

On Mon, Jun 24, 2024 at 2:36 PM Raúl Lopez <[email protected]>
wrote:

> Hello,
> I need to know in percentage the time my service has been available in the
> last month, last week, etc (dynamic value).
> The metric in question can return the values; 0, 1 and 2.
>
> 0 -> OK
> 1 -> Warning
> 2 -> KO
>
> The idea I have is to disregard value 1 and only treat my service as KO
> when it has returned value 2. I am trying to build in a Grafana
> visualisation for the SLA in percentage that my service has been available
> according to the time range that the user specifies in the dashboard.
>
> I've been doing some research and it seems that for this kind of cases it
> is not as simple as for example for those endpoints where Blackbox is used
> for example (as I cannot use probe_success).
>
> Could someone help me?
> Thank you in advance.
>
> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/a26d17b9-b507-413a-89d7-f95ca49ef725n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/a26d17b9-b507-413a-89d7-f95ca49ef725n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmp8iDzPG6FetTbw9D1sEWRyfe0qxPu8wnj%3D7cxsjKZaxQ%40mail.gmail.com.

Reply via email to