Adds a set of fields describing the storage locations of this event.
eventInternals()
Examples
Click
next to an example below to get the full details.Count Events From Each Datasource
Count events from each datasource by using eventInternals()
function to add storage location to each event
Query
eventInternals()
| groupBy([@datasourceId])
Introduction
The eventInternals()
function is used to add
the storage locations of this event. The
eventInternals()
function augments the event
data with the event field count information.
Step-by-Step
Starting with the source repository events.
- logscale
eventInternals()
Adds a @datasourceId field describing the storage locations of the event.
- logscale
| groupBy([@datasourceId])
Groups the events based on the @datasourceId, performs a count of the events and returns the results in a _count field.
Event Result set.
Summary and Results
The query is used to find the number of events per datasource.