Reporting

Create an email alert to send all events per host

aallred
Engager

Fairly new Splunk customer and I've been struggling with this for a bit.

I am trying to develop a strategy around vulnerability scan data and being able to trigger a report that emails a summary of all vulnerabilities detected per device, one email per device.

So far, I have taken the relevant data (Anything with a high CVSS score) and written it to a lookup table. This includes dns_name, plugin_name. From that lookup, I have done the following:

|inputlookup vulnreportlookup.csv | stats values(plugin_name) as "Plugin" by dns_name | rename dns_name as "Device Name" | table "Device Name", Plugin

This table is a rough approximation of what I need, with one row per device and all the vulnerabilities for that device in-row. I've tried appending to this a map search and adding a eval statement:

|inputlookup vulnreportlookup.csv | stats values(plugin_name) as "Plugin" by dns_name | rename dns_name as "Device Name" | table "Device Name", Vulnerabilities | map search="| sendemail to=admin@mydomain.com subject=$result.DeviceName$ from=splunk@mydomain.com message=\"test test test\""

If I have 14 devices that I am testing, I will receive 14 emails where the subject line is "No subject" running this. I've tried different combinations of $result.DeviceName$, $DeviceName$, $result.dns_name$ with no success. From what I've read so far most of the questions on this forum that are similar have been around sending messages to different recipients based on the results. I am trying to aggregate the results per device and send one email per device.

Any help?

Tags (3)
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...