All Apps and Add-ons

How to calculate 2 different search results from one source

tpaulsen
Contributor

Hello,

we want to calculate some Requesttimes vs. Requestnumbers.

What we do is

source=ourdata.log | timechart span=1h sum(duration) as impact count(ws-method) by domain

Now we want to search in the same log for

source=ourdata.log | stats (count) ws-method="thespecialmessage"

With the results from the second search, we want to divide the results from the first query. how can we do that?
This seems to be a multidimensional search...

0 Karma

rturk
Builder

Hi tpaulson,

Have you thought about using subsearches?

Check the doco:
http://docs.splunk.com/Documentation/Splunk/5.0.4/Tutorial/Useasubsearch

0 Karma

yannK
Splunk Employee
Splunk Employee

tpaulson,

I do not understand your second search.

do you mean : source=ourdata.log ws-method="thespecialmessage" | stats count
or
source=ourdata.log ws-method="thespecialmessage" | stats count(eval(ws-method=="thespecialmessage") ?

As Turk mentioned, the subsearch is your friend here.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...