Splunk Search

How to create a 3 dimensional chart from 2 different sources ?

sangs8788
Communicator

I am trying to build panel which will show when GC occurred and what was the CPU time when GC occurred & before GC occurred. The problem is the search queries need to be build from two different sources. Below are the queries

Time at which GC occurred
index=gc host =testserver sourcetype="gc" "GC (Allocation Failure)" |table _time

Thread CPU time across the server
index=appln host=testserver | timechart span=5m sum(THREAD_CPU_MS) as CUM_THREAD_CPU_MS

How do i combine both into one chart ?

Tags (1)
0 Karma

woodcock
Esteemed Legend

Here is a run-anywhere example:

(index=_* AND sourcetype="splunkd") OR (index=_* AND sourcetype=splunk_resource_usage)
| timechart avg(eval(10000 * cpu_seconds)) AS CPU count(eval(sourcetype="splunkd")) AS splunkd_event_count

Yours might be something like this:

host=testserver AND ((index=gc AND sourcetype="gc" AND "GC (Allocation Failure)") OR (index=appln))
| timechart span=5m sum(THREAD_CPU_MS) AS CUM_THREAD_CPU_MS count(eval(index=gc)) AS Garbage_Collection_Allocation_Failures
0 Karma

nileena
Path Finder

Please try this search:

host=testserver ((index=gc sourcetype="gc" "GC (Allocation Failure)") OR index=appln)
| timechart span=5m sum(eval(case(index=="appln", THREAD_CPU_MS))) AS CUM_THREAD_CPU_MS count(eval(sourcetype=="gc")) AS gc_occurance

It will show both parameters in one timechart.
You can change one of the parameters to overlay so as to use a separate scale for each parameter.
Good luck!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...