Splunk Search

How can I create a timechart for two different searches

oscargarcia
Path Finder

Hi,

I want to create a timechart that plots results from two separate searches overlapped in the same chart. An example would be timecharting CPU use along Memory use in the same graph.

Any ideas?

Many thanks

0 Karma
1 Solution

LCM
Contributor

If you have the *nix app installed, you can copy/paste this command!

sourcetype=vmstat OR sourcetype=cpu | multikv fields memUsedPct pctIdle | eval CPU_Usage=100-pctIdle | timechart span=10m avg(CPU_Usage) avg(memUsedPct) by host

That gives you a combined timechart (10mins avg.) over CPU & Memory usages per host

View solution in original post

LCM
Contributor

If you have the *nix app installed, you can copy/paste this command!

sourcetype=vmstat OR sourcetype=cpu | multikv fields memUsedPct pctIdle | eval CPU_Usage=100-pctIdle | timechart span=10m avg(CPU_Usage) avg(memUsedPct) by host

That gives you a combined timechart (10mins avg.) over CPU & Memory usages per host

oscargarcia
Path Finder

Thanks! the "multikv fields" was the key one.

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...