Showing up / down - Decimal issue

I am adding a mission-control type dashboard for my project. It’s a microservices architecture so there are quite a lot of floating pieces which need monitoring. It looks like this (small censored snippet):

As you can see, 2 of the servers are showing as DOWN. This isn’t correct - one of the services bounced back so it should be showing green - OK. What I found was that the up function is returning a decimal number, and not a boolean number. Below is how I have set it up

up{job="consul services", instance=""}

And below is how I set the value mappings. Prometheus can show the server UP at up=0.6 so this screws up this logic. Does anybody have any pointers?


But isn’t the value of up either zero or one?



It turns out the time ranges were incorrect. How can I pin it to 5 mins or disable the time picker?

You can use the time range tab and override relative time/timeshift.

1 Like