Dashboard chart to show server uptime and downtime history

  • Grafana 9.0.2 on RHEL 8, data source Prometheus 2.36.2/Node Exporter/Blackbox Exporter

I’ve been asked by a manager to create a graph/chart (of whatever type) that shows the history of a given server’s up and downtime - eg in the last week it was up Monday / down Tuesday / up Wednesday and Thursday / down Friday - that kind of thing, or perhaps a chart showing how many hours each day it was up or down would also do. I cannot find any mention via Google of anyone else having done this, or how to achieve it.

Anyone any thoughts how this could be done please?

hello, did you connect prometheus to grafana ?

if you did you can create a panel and compose a query in promotheus langage PromQL

Thanks; yes, Prometheus is working with Grafana and I have several dashboards set up. I am not at all familiar with writing PromSQL queries, and I wouldn’t have a clue how to write what is being asked for, which is why I’d hoped someone else would have done this before.

hello, you can open an already existing panel to inspire you.
People achieve this following the link i sent you. Ask you manager information about schema to get the series name you will need.
display this series and share us your data format.
if you have to do this board don’t you need to learn this langage promql ?

No, I set the dashboards up in Grafana, no need for promql.

No worries if it’s not obvious how to do this, I’ll just keep trawling the internet till someone knows how.

i have to say you this , your series have probably a specific name like the server host name for example, you will not find this on internet.
People can’t guess this name.
You can use auto complete to get this kind of information in grafana query.
I think reeading my link is faster too :wink:

1 Like