Splunk Search

Alert when host sends different data in event

rtadams89
Contributor

Every day, a script runs on my Windows boxs that sends an event to Splunk. I'm looking for a search that will return the difference between the most recent event from each host, and the second most recent event from each host.

My hope is that I can create a search that will show me what has changed between the last time the script ran and the previous time the script ran.

Tags (3)
0 Karma

woodcock
Esteemed Legend

Add this to your existing search which is returning your stuff:

... | eventstats dc(linecount) AS numValues by host | where numValues>1
0 Karma

rtadams89
Contributor

"Delta" would not work, as it doesn't take factor in the different hosts. I need to essentially do a "Delta" recursively for each host and then return only those hosts where the delta != 0.

0 Karma

rtadams89
Contributor

Each server sends a list of user accounts (one per line, as a single event) to Splunk. I want to find changes to the users by comparing the previous events to the current events (comparing the linecount value). As a server may not report in each day, I pipe all the events through a "dedup 2 host" command to get a list of the last two events from each host. The results of this (tabled) look like

host | linecount

host1 | 10

host1 | 10

host2 | 3

host2 | 4

host3 | 1

host3 | 1

What I need is a command I can use to return only the "host2" events (as it's the only one that had a change).

0 Karma

lguinn2
Legend

Can you give us a little more info about the events? Also, have you looked at the delta command?
http://docs.splunk.com/Documentation/Splunk/4.2.4/SearchReference/Delta

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!

Detection Engineering Office Hours: Real-World Troubleshooting & Q&A

[REGISTER HERE] This thread is for the Community Office Hours session on Detection Engineering Office Hours: ...

Developer Spotlight with Mika Borner

From Hackathon Winner to Enterprise Leader    Mika Borner, CEO and Founder of Datapunctum AG, has been ...

Continue Your Federation Journey: Join Session 3 of the Bootcamp Series

To help practitioners build a stronger foundation, we launched the Data Management & Federation ...