Splunk Enterprise

help on subsearch with strange behaviour

jip31
Motivator

hi

the search below returns results

 

 

index=tutu sourcetype=toto runq 
| search NOT runq=0.0 
| table runq host 
| join host 
    [ search index=tutu sourcetype=toto
    | fields type host cpu_core) 
    | stats max(cpu_core) as nbcore by host ] 
| eval Vel = (runq / nbcore) / 6

 

 

 but when I add 

 

 

table vel

 

 

or

 

 

| stats avg(Vel) as Vel

 

 

at the end of the search, there is no results

what is wrong please?

Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

It looks like you are just trying to find the maximum number of cpu_core for each host, so you could try eventstats:

index=tutu sourcetype=toto runq 
| search NOT runq=0.0 
| table runq host 
| eventstats max(cpu_core) as nbcore by host
| eval Vel = (runq / nbcore) / 6

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It looks like you are just trying to find the maximum number of cpu_core for each host, so you could try eventstats:

index=tutu sourcetype=toto runq 
| search NOT runq=0.0 
| table runq host 
| eventstats max(cpu_core) as nbcore by host
| eval Vel = (runq / nbcore) / 6
0 Karma

jip31
Motivator

I found, a sysntex error in eval...

0 Karma

jip31
Motivator

you search is doing the same thing

and what I need is to be able to do an average on the field "Vel" ( | stats perc(Vel))

so as long as there is no results with | table Vel, I can't doing this average

How explain that I am not able to retrieve the field "Vel"?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...