Splunk Search

Display response times for two different webservices in the same timechart

Norling
Explorer

Hi all!

I have two searches that I want to display in the same search and pipe them out in a time-chart

Both searches looks like this, but it´s different indexes, host-names and web services:
index="index name" host="host-name*" cs_uri_stem="/Web-service-name.svc" | timechart avg(time_taken) by host

So my question is how do I modify the search above to include both web services from the different hosts and pipe out avg responsetimes in a timechart (timechart avg(time_taken) by host).

cheers
/Magnus

Tags (1)
0 Karma

Norling
Explorer

Works really good, many thanks Patrik.
/Magnus

0 Karma

Ayn
Legend

Hi Magnus,

do these different web services share the same hosts, so you need to differentiate between them? Otherwise you could just OR everything together:

(index=index1 host="host-name*" cs_uri_stem="webservice1.svc") OR (index=index2 host="host-name*" cs_uri_stem="webservice2.svc") | timechart avg(time_taken) by host

You could also have a look at the append command for running separate searches that each contribute their own portion to the stats, but from the situation you describe it sounds like the first solution would solve what you want to accomplish.

Regards,
Patrik

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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