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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...