Dashboards & Visualizations

Existence of multiple *ix processes dashboard

wardallen
Path Finder

I need to create a dashboard to indicate the existence of several processes.

I have the Splunk *ix add-on providing the ps info I want, but am struggling with how to get this meaningfully onto a dashboard. All of the visualisations I can see are fine for numerical values, but I really only need a boolean one. Is there some kind of binary (such as red light/green light) visual I can use to indicate the presence of a process within the last set of ps data received?

Tags (1)
0 Karma
1 Solution

lguinn2
Legend

Yes. You could go as far as this answer suggests

How to show a custom icon

But there is an easier way, if you don't think that is necessary. First, in the search, set two fields (found and range in this example). Assume that you save this search with the name mySearch

yoursearchhere
| eval found=if(match(_raw,"regexofwhatyouwant"),"Found","Missing")
| eval range = if (found=="Found","low","severe")

Splunk makes the following color associations in the default.css for Single Value Panels

  • low = green
  • guarded = blue
  • elevated = yellow
  • high = orange
  • severe = red

So we set range to match low (green) or severe (red). To actually have this take effect, though, you need to create a dashboard and add this search to one of the dashboard panels. Make sure that you select the visualization called "Single" or "Single Value".

After the dashboard is created, edit the underlying simple XML. You can do this from the dashboard editor. In the simple XML, look for the <single> tag and add the two option lines. (There may be other lines within the single tag as well.)

<single>
  <searchName>mySearch</searchName>
  <title>Was the process found?</title>
  <option name="classField">range</option>
  <option name="field">found</option>
</single>

This will give you either the word "Found" in green or the word "Missing" in red.

View solution in original post

0 Karma

lguinn2
Legend

Yes. You could go as far as this answer suggests

How to show a custom icon

But there is an easier way, if you don't think that is necessary. First, in the search, set two fields (found and range in this example). Assume that you save this search with the name mySearch

yoursearchhere
| eval found=if(match(_raw,"regexofwhatyouwant"),"Found","Missing")
| eval range = if (found=="Found","low","severe")

Splunk makes the following color associations in the default.css for Single Value Panels

  • low = green
  • guarded = blue
  • elevated = yellow
  • high = orange
  • severe = red

So we set range to match low (green) or severe (red). To actually have this take effect, though, you need to create a dashboard and add this search to one of the dashboard panels. Make sure that you select the visualization called "Single" or "Single Value".

After the dashboard is created, edit the underlying simple XML. You can do this from the dashboard editor. In the simple XML, look for the <single> tag and add the two option lines. (There may be other lines within the single tag as well.)

<single>
  <searchName>mySearch</searchName>
  <title>Was the process found?</title>
  <option name="classField">range</option>
  <option name="field">found</option>
</single>

This will give you either the word "Found" in green or the word "Missing" in red.

0 Karma

lguinn2
Legend

Yes, you can combined results into a single panel: here is a link to the documentation

http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#row

0 Karma

wardallen
Path Finder

Is there a way to put more than one of these in a single dashboard panel?

0 Karma

wardallen
Path Finder

Fantastic, thank you!

I think I'll be able to extend it to look for more than one process quite easily.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...