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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...