Splunk Search

Chart of multiple sourcetypes

avitallange
Explorer

Hi,

I would like to get a line chart in which I can see a line for each trace level (verbose, info, warning, error).
In addition I'd like to see on the same chart another line for the CPU Usage.
It would let me know if errors are related to high CPU usage.

We have a sourcetype called "Trace" that contains the field "tracelevel".
And we have a sourcetype called "CpuLoad" that contains the fields "Value" and "Counter".
The "Counter" can be "ProcessorTime" or "UserTime".

I tried to combine the 2 queries into one line chart:

  1. sourcetype="Trace" | timechart count by tracelevel
  2. sourcetype="CpuLoad" Counter="ProcessorTime" | timechart avg(Value)

But I couldn't make it work.

Could you please assist?

Tags (2)
0 Karma

cramasta
Builder

You could probably do this without a join but its friday and my brain has shut down.

sourcetype="Trace" | timechart span=15m count by tracelevel | join type=left _time [search sourcetype="CpuLoad" Counter="ProcessorTime" | timechart span=15m avg(Value) AS avgValue]

0 Karma

avitallange
Explorer

Thank you!

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...