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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...