Dashboards & Visualizations

How can I get the DiskFreeSpace field to be colored in my dashboard, automatically depending on the value?

carlyleadmin
Contributor

Hi there,

I am pulling physical disk info and just putting it in Dashboard. I want DiskFreeSpace field to be colored automatically depending on the value. Is this possible?
Splunk Version
6.2.3
Splunk Build
264376

Here is what I have setup so far.

|eval DiskFreeSpace=round((FreeSpace/1024/1024/1024),2)|eval DiskSpace=round((Size/1024/1024/1024),2)|rangemap field=DiskFreeSpace blue=10-60 red=0-9 |rename Name AS Disk host AS Host|table Host Disk DiskSpace DiskFreeSpace|dedup Disk

alt text

I even added this to my source code

range

Thanks for the help

0 Karma
1 Solution

niketn
Legend

@carlyleadmin since you are on version 6.2.3 and Table Cell formatting option to add colors through UI was introduced only in version 6.5, only option for you to color your Table Cell based on range of value, is to use Simple XML JS and CSS extension. Get the Splunk Dashboard Examples App from Splunkbase and try out the Table Cell Highlighting Example which can be applied to your dashboard.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@carlyleadmin since you are on version 6.2.3 and Table Cell formatting option to add colors through UI was introduced only in version 6.5, only option for you to color your Table Cell based on range of value, is to use Simple XML JS and CSS extension. Get the Splunk Dashboard Examples App from Splunkbase and try out the Table Cell Highlighting Example which can be applied to your dashboard.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

carlyleadmin
Contributor

if i use the below it works on splunk Splunk Version
7.0.3
Splunk Build
fa31da744b51

but the same logic does not work on 6.2.3 version
alt text

alt text

0 Karma

carlyleadmin
Contributor

i added

option name=classfield>range to my source

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...