Alerting

how to exclude several user activity from alert

bunfie
New Member

Hi All,

we use splunk to monitoring super user activity (on windows, DB, and network)

right now we have setting splunk to sending alert on several windows event code with .adm user. but now we want to exclude several user activities, so if the user doing activities on windows, splunk will not send the alert.
example we have user1.adm, user2.adm, user3.adm and right now if all user login on server, then splunk will send alert, but we want to exclude user3.adm. so if the user3.adm login, splunk will not send alert.
can someone help me, what query i need to add on my search alert on splunk?
note i need to exclude several user on all my DB, OS, Network, and the user is different in all the os, network and DB
please advice

alt text

Thanks,

Tags (2)
0 Karma
1 Solution

sundareshr
Legend

If there are many users in the exclusion list, your best option would be to create a lookup file/kvstore (http://docs.splunk.com/Documentation/Splunk/6.5.0/SearchReference/Lookup) and use that to exclude from your final list. Since you are using sub searches (append), it may be more effecient to just exclude from the final list. For example, lets assume your lookup file is called excludelist.csv, with a field named "user" then you could add something like this to the end of your query exclude users

.... | search NOT [| inputlookup excludelist.csv | field user ]

You could also do the filtering in each of your sub-searches, I just think that could be less efficient, depending on number events filtered by the users.

Having said this, I would strongly recommend against using sub-searches. Its just very slow and has limitations that could cause incorrect results. Look at this post here by @MuS on how you can achieve similar results without the use of sub-searches.
https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-jo...

View solution in original post

0 Karma

sundareshr
Legend

If there are many users in the exclusion list, your best option would be to create a lookup file/kvstore (http://docs.splunk.com/Documentation/Splunk/6.5.0/SearchReference/Lookup) and use that to exclude from your final list. Since you are using sub searches (append), it may be more effecient to just exclude from the final list. For example, lets assume your lookup file is called excludelist.csv, with a field named "user" then you could add something like this to the end of your query exclude users

.... | search NOT [| inputlookup excludelist.csv | field user ]

You could also do the filtering in each of your sub-searches, I just think that could be less efficient, depending on number events filtered by the users.

Having said this, I would strongly recommend against using sub-searches. Its just very slow and has limitations that could cause incorrect results. Look at this post here by @MuS on how you can achieve similar results without the use of sub-searches.
https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-jo...

0 Karma

bunfie
New Member

@sundareshr thanks for the help.
also thanks for the tips on the using sub-searches

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...