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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...