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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...