Splunk Search

Timechart not working after multikv

johnsasikumar
Path Finder

Hi, I am not sure why timechart does not work for me. I would like a timechart for avg memory used.
I tried the below search:

source=vmstat 
| multikv fields memFreeMB
| timechart span=1h avg(memFreeMB)

the field avg(memFreeMB) is null.

I tried:

source=vmstat 
| multikv fields memFreeMB
| table _time memFreeMB

Which works but it's not a timechart. I tried using an eval command to create a new field =memFreeMB.
But no luck could someone help me with this.
I need a timechart for further analysis

0 Karma

somesoni2
Revered Legend

Your multikv command is limiting the available fields to be just memFreeMB. You need _time field in order to generate timechart. So give this a try

source=vmstat 
| multikv fields _time memFreeMB
| timechart span=1h avg(memFreeMB)
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...