I’m using Azure Managed Grafana and I’m trying to create a panel using the Gauge.
I’ve written a query that returns a list of servers along with its disk information (disk space remaining and the total disk size), I’ve written the following query:
SharePoint_CL
| mv-expand OSDriveC
| evaluate bag_unpack(OSDriveC)
| where EnvironmentName in ($var_EnvironmentName) and EnvironmentType in ($var_EnvironmentType) and isnotempty(SizeGB) and TimeGenerated >= ago(5m)
| project HostName, FreeGB = todouble(SizeRemainingGB), SizeGB = todouble(SizeGB)
| sort by HostName asc
The query returns the following data:
I would like to see a gauge per host, displaying the free space from the total disk size, is it possible to achieve this?
Hi sowdenraymond,
Just wanted to say thanks for solving my problem, that worked like a charm.
I have one last question; how do I get rid of this text added after every server name? I did look everywhere, and I can’t find how, could you please help on this last bit?
1 Like
I also can’t see how to remove that as its the field name
no worries, thanks for looking into this one! much appreciated!
Hi Joachim,
Thanks for the solution!
I’m afraid to say it doesn’t work on my side. When I add the first step “Partition by values” and then add the fields HostName and SizeGB, I can’t get the option “Naming - As Label - as frame name” - and it seems to be necessary, because adding the next transformation step “Rename fields by regex”, doesn’t seem to affect anything in the result, and leaves the panel unchanged,
But thanks to your input I decided to play around with all the options and this is how I got the panel working for me (see the pic below), I don’t know if this is a good one but seemed to work:
Thanks Joachin, your solution helped me to get to this one!