Dashboards & Visualizations

Query which should show whenever there is a modification in data set

Janani_Krish
Path Finder

Hello All,

I have to construct a query whenever there is change in my query result. My query and result is as follows,
Query:
sourcetype="my_sourcetype"|dedup indicator|table indicator

Result:
indicator

a

b

So I need to get an alert whenever my set [Indicator(a,b)] changes, i.e addition [indicator(a,b,c)] or deletion[indicator(a)] happens.
Please suggest for my above requirement.

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

If you only need to worry about additions or deletions then this query should do.

sourcetype="my_sourcetype"
| stats dc(indicator) as count
| where count != 2

Trigger an alert whenever the query returns results.

---
If this reply helps you, Karma would be appreciated.

Janani_Krish
Path Finder

Thanks @richgalloway 
That will help. But is there any way I can identify any modifications in the list, like Indicator[a.b] changed to Indicator[c,d].


0 Karma

richgalloway
SplunkTrust
SplunkTrust

First, you'll need to save the set of expected results.

sourcetype="my_sourcetype"
|dedup indicator
|table indicator
| outputlookup indicator.csv

Then you can compare those results to a new search.

| set diff [sourcetype="my_sourcetype"|dedup indicator|table indicator]
[|inputlookup indicator.csv]
---
If this reply helps you, Karma would be appreciated.
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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...