Splunk Search

Find earliest time of when the process starts using streamstats?

k31453
Explorer

Hi, I have a particular service which we triggered occasionally and I would like to know the earliest time of every time it gets kick off for e.g 

For e.g following is the data:

_time service message Host
2022-07-08T05:47:22.029Z abc calling service 123 host123.com
2022-07-08T05:49:17.029Z abc Talking to service 123 host123.com
2022-10-11T01:00:39.029Z
abc calling service 123 host123.com
2022-10-11T01:02:46.029Z
abc Talking to service 123 host123.com

 

The expected data outcome would be:

Host starting_time
host123.com 2022-07-08T05:47:22.029Z
host123.com 2022-10-11T01:00:39.029Z

 

I am aware I have to use streamstats somewhere. But given all the other fields are identical earliest time by host wont work. Also I am backdating the data for 6 months so I need something that is bit efficient. I only care about starting_time of the service of each time the service starts.

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| where message = "calling service 123"
0 Karma
Get Updates on the Splunk Community!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...