Splunk Search

find maximum value of a field by host over the last 7 days

arrangineni
Path Finder

I need am trying to find the maximum value of a field(Peak value and time at which it happened everyday) based on a other field for the last seven days, I am using the time chart to get the values of the field but I need the exact time of the filed when it occurred rather than only the day. Can someone help me with this?

Need the know what is the Peak Processing time of hosts and the time when that is occurring.

index=perfmon sourcetype="Perfmon:" host=A OR host=B OR host=C OR host=D object="Processor" counter="% Processor Time" instance=""
| timechart span=1d max(Value) as Peak by host

which gives results as,

_time A B C D
2018-10-10 45 67 6 56
2018-10-11 12 45 56 45
2018-10-12 79 78 34 67

0 Karma

Vijeta
Influencer

Try the below query, you can do transpose if needed

index=perfmon sourcetype="Perfmon:" host=A OR host=B OR host=C OR host=D object="Processor" counter="% Processor Time" instance="" 
|  eval date= strftime(_time,"%Y-%m-%d")

|  sort - 0 date host Value
| dedup   date host
| table _time Value host
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 ...