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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...