Best way to present a pushgateway metric in Grafana

32 views
Skip to first unread message

Tamar

unread,
Oct 13, 2020, 4:40:20 AM10/13/20
to Prometheus Users
Hi,

I am new to PRmetheus.
I wrote a bash script that retuns either "1" or "0", and using pushgateway created a metric in prometheus for it.

In Prmehteus UI I can see the meteic's value as expected:


In Grafana however if I pick "stats" or "gauge" visualization I get a number with a decimal point (e.g: 0.245)

What is the correct way to show the value as either 1 or 0 in Grafana ?

Thanks

Matthias Rampke

unread,
Oct 13, 2020, 12:23:27 PM10/13/20
to Tamar, Prometheus Users
These visualizations often default to showing the average over the dashboard's time period. This looks a bit different depending on the panel, but under the panel options, look for an option to show the "Current" or "Last" value.

/MR

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/71b6439f-c698-4e86-a258-1af92704512cn%40googlegroups.com.

Tamar

unread,
Oct 14, 2020, 7:55:00 AM10/14/20
to Prometheus Users
Thank you Matt!
This did the trick.

ב-יום שלישי, 13 באוקטובר 2020 בשעה 19:23:27 UTC+3, matt...@prometheus.io כתב/ה:
Reply all
Reply to author
Forward
0 new messages