Splunk Search

Working on "snoweventstream" in a subsearch - Any thoughts?

victor_menezes
Path Finder

Hi guys,

I'm trying to control whenever I have to send an event to ServiceNow or not, and that's what I've done so far.

Basically, I need to check if the query results exceed a threshold. If it does, I need to update a lookup with that value and run a snoweventstream command with severity > 0.

If the result is below the threshold, I need to do the same update in the lookup with that value and run a snoweventstream command with severity = 0.

Have any of you guys already done something similar and do you have some ideas on how I can perform that?

This is basically a draft of what it would be (in a high level):

eval lastStatus=(subsearch inputlookup x.csv | get status where alert_name = something)
MyQuery
if fieldA > 10
then
    if (lastStatus == 0)    
    then append x.csv fieldB, fieldC, 1
    AND eval alerted=(subsearch that eval some fields and trigger snoweventstream command with severity 1)  

else    if (lastStatus == 1)
    then append x.csv fieldB, fieldC, 0
    AND eval alerted=(subsearch that eval some fields and trigger snoweventstream command with severity 0)

Thank you in advance!

0 Karma

493669
Super Champion

you can use service now event management plugin which will not require to use any command like snoweventstream to send events in service now

0 Karma

victor_menezes
Path Finder

Yeah I'm already using ServiceNow event management plugin. Actually this is what enables the snoweventstream command. I'm using the command inside the query because by using the trigger action option in the alert configuration will be only allow me to configure the event for when the threshold is met, which is what I have at the moment. I need to have a counterparty, by sending a communication when the result comes back down below the threshold.
Thanks!

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...