Forum Discussion
Anonymous
Apr 10, 2018Custom OMS dashboard chart with 4 columns
Hi, cannot figure out how to create custom dashboard chart with 4 columns. i already have query for this dashboard. Just simple view, maybe with threshold colors. Thanks. https://portal.loganalyt...
- Apr 11, 2018
To be precise the list view can show up 4 columns just not two columns where there are numbers. You can potentially do something like this:
let diskfreepercent= Perf | where TimeGenerated > ago(1d) | where ObjectName == "LogicalDisk" and CounterName == "% Free Space" | summarize (TimeGenerated, FreeSpacePercent)=arg_max(TimeGenerated, CounterValue) by Computer, InstanceName | where strlen(InstanceName) ==2 and InstanceName contains ":"; let diskfreeMB= Perf | where TimeGenerated > ago(1d) | where ObjectName == "LogicalDisk" and CounterName == "Free Megabytes" | summarize (TimeGenerated, FreeMB)=arg_max(TimeGenerated, CounterValue) by Computer, InstanceName | where strlen(InstanceName) ==2 and InstanceName contains ":"; diskfreepercent | join ( diskfreeMB ) on Computer, InstanceName | project Computer, InstanceName, tostring(FreeSpacePercent), FreeMB
And it will show the 4 columns but as you see I am converting one of the numeric values to string. Also sorting can be done only on FreeMB column. My proposal is to create two lists views side by side.
Anonymous
Apr 10, 2018Thanks Stanislav, seems a bit odd that there isn't option to add table dashboard with 4 columns. :)
Probably will use two separate dashboards then.
Probably will use two separate dashboards then.
Apr 11, 2018
To be precise the list view can show up 4 columns just not two columns where there are numbers. You can potentially do something like this:
let diskfreepercent= Perf | where TimeGenerated > ago(1d) | where ObjectName == "LogicalDisk" and CounterName == "% Free Space" | summarize (TimeGenerated, FreeSpacePercent)=arg_max(TimeGenerated, CounterValue) by Computer, InstanceName | where strlen(InstanceName) ==2 and InstanceName contains ":"; let diskfreeMB= Perf | where TimeGenerated > ago(1d) | where ObjectName == "LogicalDisk" and CounterName == "Free Megabytes" | summarize (TimeGenerated, FreeMB)=arg_max(TimeGenerated, CounterValue) by Computer, InstanceName | where strlen(InstanceName) ==2 and InstanceName contains ":"; diskfreepercent | join ( diskfreeMB ) on Computer, InstanceName | project Computer, InstanceName, tostring(FreeSpacePercent), FreeMB
And it will show the 4 columns but as you see I am converting one of the numeric values to string. Also sorting can be done only on FreeMB column. My proposal is to create two lists views side by side.
- AnonymousApr 12, 2018This is something closer to what i would like to achieve. How to limit string output to 2-4 digits ?
tostring(FreeSpacePercent)
Now it returns % of free space like that 72.025016784668- Apr 12, 2018
You can do
tostring(round(FreeSpacePercent,2))
- AnonymousApr 12, 2018Thanks for your quick and precise responses.