Splunk Search

Single value module question

RicoSuave
Builder

This is what i'm looking to do and i can't figure it out. I want a single value module to green up once a certain event shows up and go red when a different event shows up and instead of the module displaying the number of events, i want it to show the src address that is in the event. Any suggestions?

Tags (2)
1 Solution

hazekamp
Builder

This is accomplished using both search and SingleValue. In search you want to set the "range" field based on which event shows up.

The Search will lookup for either event and grab the first one. Eval is used to determine the value of "range":

eventA OR eventB | head 1 | eval range=if(eventA, "low", "severe")

In SingleValue the "field" param is the display field so we will set that to the source address. classField "range" adds an additional css class to SingleValue (low=green, red=severe). These values were set based on the above search.

...
<module name="SingleValue">
  <param name="field">src_ip</param>
  <param name="classField">range</param>
</module>

View solution in original post

0 Karma

RicoSuave
Builder

This worked like a charm. Thanks.

0 Karma

hazekamp
Builder

This is accomplished using both search and SingleValue. In search you want to set the "range" field based on which event shows up.

The Search will lookup for either event and grab the first one. Eval is used to determine the value of "range":

eventA OR eventB | head 1 | eval range=if(eventA, "low", "severe")

In SingleValue the "field" param is the display field so we will set that to the source address. classField "range" adds an additional css class to SingleValue (low=green, red=severe). These values were set based on the above search.

...
<module name="SingleValue">
  <param name="field">src_ip</param>
  <param name="classField">range</param>
</module>
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...