Splunk Enterprise

Count number of events by a value(ServiceName) in log file

vineetc
Engager

I want to count number of events in the log file based on a serviceName and then plot them with Counts by ServiceName

Sample LogFile:

<Timestamp> Invoked Service1
<Timestamp> Invoked Service2
<Timestamp> Invoked Service3
<Timestamp> Invoked Service3
<Timestamp> Invoked Service1
<Timestamp> Invoked Service2
<Timestamp> Invoked Service1

I should get the count of invocation by service

Tags (1)
0 Karma

somesoni2
Revered Legend

If the field ServiceName is already extracted try this

your base search | stats count by ServiceName

OR

your base search | timechart count by ServiceName
0 Karma
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 ...