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!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...