Alerting

Combining events and agregated statistics in an alert?

unitedmarsupial
Path Finder

If I perform a search like this:

...
| stats values(host) as Hosts
| eval Hosts=mvjoin(Hosts, ",")

I'll get the comma-separated list of hosts in the Statistics-tab, and the full list of matching events in the Events-tab. So far so good.

However, any alert based on this, will only contain the list of hosts -- not the events. How can I have both? Ideally, the aggregated "event" will be the last one, so its fields can be used in the text of the e-mail (such as $result.hostList$)...

0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

... | eventstats values(host) as Hosts
| eval Hosts=mvjoin(Hosts, ",")

View solution in original post

woodcock
Esteemed Legend

Like this:

... | eventstats values(host) as Hosts
| eval Hosts=mvjoin(Hosts, ",")
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...