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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...