Splunk Enterprise

Piping from 'map' to get average as a single number per device?

winknotes
Path Finder

I'm using the map command to iterate through a list of devices and forecasting some of the metrics associated with each device.  That's all working but what I really want is to then average the returned results down to a single number per device.  

The query returns 104 rows per device.  I want to be able to average them as a single number per device but no matter what I pipe to it simply returns all of the data.  

I'd appreciate some guidance on making this work.  

 

 

 

| inputlookup array_stats.csv 
| dedup Array_Name 
| map maxsearches=1000 search="
    inputlookup array_stats.csv 
    | search Array_Name=$Array_Name$
    | timechart avg(IOPS) as avgIOPS avg(ReadRT) as avgReadRT avg(WriteRT) as avgWriteRT values(Array_Name) as ArrayName span=1d
    | predict "avgIOPS" as predIOPS "avgReadRT" as predReadRT "avgWriteRT" as predWriteRT  future_timespan=14 
| eventstats avg(avgIOPS) avg(avgReadRT) avg(avgWriteRT) avg(predIOPS) avg(predReadRT) avg(predWriteRT) by ArrayName"

 

 

 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Does using stats instead of eventstats in the last line help?

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Does using stats instead of eventstats in the last line help?

0 Karma

winknotes
Path Finder

Yes it did!!  I could have sworn I tried that before but I guess not.  Thank you for the help.  

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 ...