Splunk Search

How to edit my search to add the total count for the number of times process appears in the logs per host?

davideberling
New Member
index=GenericHostName host=GenericServerName process="GenericServiceName" | fields _time, host, PID, process, source, pctCPU | fields - _raw
0 Karma

woodcock
Esteemed Legend

Just add this:

... | stats first(_time) AS first_time last(_time) AS last_time avg(pctCPU) count BY process PID source
0 Karma

davideberling
New Member

not exactly looking for the number of times a process (GenericServiceName) occurs in a certain time period (30 days)
index=GenericHostName host=GenericServerName process="GenericServiceName"
Thank you for your help

0 Karma

woodcock
Esteemed Legend

I am not at all clear on what you need or what is wrong with my answer but it might be better if you remove the source in my answer.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...