Splunk Search

Is it possible to alert on something that is NOT in a lookup file?

Svill321
Path Finder

Hello everyone,

Basically exactly what the title says. I made a white list of approved accounts and would like to alert on successful logins for accounts that are NOT on that list. So far, what I have is very basic:

| inputlookup test_lookup | return account

The issue is that I can't find anything on the logic needed to match for accounts that are not in the file.

0 Karma
1 Solution

somesoni2
Revered Legend

Try like this

your base search to get account logins NOT [| inputlookup test_lookup | table account ]  | table ...relevant field to show in alert...

Above assumes that your logs have a field called account which has exactly same value as account field in the lookup table. If the field names are different, add a rename command in subsearch. You can then setup alert to get fired when number of events are greater than 0.

View solution in original post

somesoni2
Revered Legend

Try like this

your base search to get account logins NOT [| inputlookup test_lookup | table account ]  | table ...relevant field to show in alert...

Above assumes that your logs have a field called account which has exactly same value as account field in the lookup table. If the field names are different, add a rename command in subsearch. You can then setup alert to get fired when number of events are greater than 0.

cmerriman
Super Champion

You might try the set diff command. http://docs.splunk.com/Documentation/Splunk/6.6.1/SearchReference/Set

It takes two lists and basically finds the differences

0 Karma

horsefez
Motivator

Hi,

I do white- and blacklisting via lookup files.

The logic behind that evolves around this

For example this will give you only results for events that src_ip does not show up in the ip_whitelist lookup table.

| inputlookup ip_whitelist ip AS src_ip OUTPUT ip AS src_ip2
| where isnull(src_ip2)

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...