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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...