Splunk Search

How to combine two searches in one timechart and show dynamic x-axis labels?

rajinovat
New Member

Hi All,
I would like to combine below two searches in one timechart stacked with x axis showing date and total records under each column stack
Search 1: ( Display batch runtime(in hours) by batch code over a day)
index=batch batch_cd="A1" OR batch_cd="A2" OR batch_cd="A3" OR batch_cd="A4" | timechart span=1d eval(sum(total_time)/60) as hours by batch_cd usenull=f useother=f limit=0
Search 2: ( Display total records processed by batch code over a day)
index=batch batch_cd="B1" OR batch_cd="B2" | bucket _time span=1d | stats sum(total_records) as tot_rec by batch_cd

1.Combine above two searches in a single query
2.Display search results in stacked mode
3.Display total_records below x axis along with time chart date
4.Show runtime hours as running labels top of each stack bar
5.Show legends grouped logically

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can do that... if you build yourself the appropriate visualization, e.g. using D3. The customizability of charts, either built-in or provided by 3rd party apps, does not go as far as you describe.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...