Abbreviate 'hour' to 'h'? And 'm', 's'?

Hey everyone. I’m running Telegraf/InfluxDBv1/Grafana on a RPi. I currently have uptime on a stat panel showin the time unit. Is there anyway to abbreviate the time unit displayed? e.g. Instead of week, day, hour, etc; display wks, d, h? Can I map it somehow in grafana.ini? I don’t see an option for that, nor does the Moment.js documentation touch on it.

I have tried different units (time vs duration), but ultimately I just want a one or two digits and a single-letter unit. Duration is almost there, but I want it to only show the longest time unit applicable (i.e. if >1 day → show only day count). More advanced rules would be nice (between 1-2 days → show #d#h), but I’m not quite at that stage in my dashboard config yet.

welcome to the :grafana: forum, @hung0702grafana

can you please follow these steps to share some of your raw unformatted data? That way, the community can try and mock up your problem :+1:

Sure. I’ve included an excerpt below. I’ve also included the query if that helps.


SELECT last(“uptime”) FROM “system” WHERE (“host” =~ /^$server$/) AND $timeFilter GROUP BY time($interval) fill(null)