Reporting

Grab statistics for complex searches where eventtypes doesnt do the trick

Starlette
Contributor

Let say I have a few searches :

alert1
search | eval etc | stats count by field1, field2, etc

alert2
search | eval etc | stats count by field1, field2, etc

alert3
search | eval etc | stats count by field1, field2, etc

Now i want to make search for top alerts, though i cant make eventypes, whats the most handy way to get here ?

Tags (2)
0 Karma

Starlette
Contributor

Oke thanks, I am aware it isnt easy, this is just a general question, and the 3 searches are an example to decribe the functional fundamentals.
Bottemline is I have seperate searches which are running in notification if there is a (siem) hit, those are combis of eval, subsearches, lookups etc. So just wondered if i can run a top just like evettypes top.
On the dashboards i have per search, postprocesses, with linkswitches, intentions to drills etc etc..
I will diginto this later but appreantly its more complex then i was thinking ( just though i could group "search" results and simple count them....

0 Karma

southeringtonp
Motivator

A few approaches...

  1. Find out why you can't define eventttypes. Talk to your Splunk admin and have the eventttypes added for you, or ask for permissions to do it yourself.

  2. Use 'OR' conditions in your search string, and group by some field other than eventtype. signature or EventCode might be a good choice, depending on your alert conditions.

  3. Run your existing searches, but don't send email alerts. Instead, enable summary indexing. Run a separate search against the summary index for alerting.

  4. Run your existing searches, but don't send email alerts. If all you care about is the result count, you can search against index=internal SavedSplunker to find the number of results that matched. Then use savedsearch_name like you would eventtype.

  5. Use |append to run your three searches, and create your equivlalent to the eventtype field for each alert type using eval. Then pipe the whole mess into top or stats.

0 Karma

Starlette
Contributor

Stange that this one is devoted...the search hit is an alert and differs per alert (fi external lookup for fields which are allowed, or users who are logged into a system with non allowed name etc etc...

So if there is a search hit then its an alert....now i want a consolidated overview instread of a bunch of loose rangemap values.

0 Karma

hazekamp
Builder

What defines an alert? What defines alert count?

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...