Alerting

Alerting if a sending domain doesnt match the CSV file

Bryan_Rye
New Member

Hello. I have a search that looks like this:

sourcetype="sendmail_syslog" host=*-ess-css* | stats count by search_from_domain

It lists all of the sending domains through a set of email hosts. I also configured a csv file that lists the valid sending email domains. I've imported the file under the lookups folder and I can return results by running "|inputlookup css_domains.csv" of the valid domains.

I need help creating the search that will compare the search results to the csv file as well as the sending IP address and alert if the domain is not in the csv file.

Can you help me structure the search?

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

I'm assuming you have a CSV file something like this:

domain,is_valid
mydomain,yes
otherdomain,no

Define an automatic lookup that links domain from the CSV file to your events' domain field, adding the is_valid field to each event. Then it's just a matter of filtering by NOT is_valid="yes".

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...