Splunk Search

merging two search strings

Splunk_U
Path Finder

Can you please help me out to merge these two search strings

index=os sourcetype=vmstat 
| multikv fields memUsedPct  
| stats avg(memUsedPct) as avgMemUse max(memUsedPct) as pkMemUse by host
| join host [ search index=os sourcetype=cpu 
    | multikv fields pctIdle  
    | search all  
    | eval Percent_CPU_Load = 100 - pctIdle  
    | stats avg(Percent_CPU_Load) as avgCpuUse max(Percent_CPU_Load) as pkCpuUse by host ]

and

index=os sourcetype=perfmon* 
| stats avg(Value) as Average max(Value) as Max by host counter
Tags (1)
0 Karma

Splunk_U
Path Finder

I need the result of both the search string combined in a same window.

0 Karma

lguinn2
Legend

Just keep following the pattern....

index=os sourcetype=vmstat 
| multikv fields memUsedPct  
| stats avg(memUsedPct) as avgMemUse max(memUsedPct) as pkMemUse by host
| join host [ search index=os sourcetype=cpu 
    | multikv fields pctIdle  
    | search all  
    | eval Percent_CPU_Load = 100 - pctIdle  
    | stats avg(Percent_CPU_Load) as avgCpuUse max(Percent_CPU_Load) as pkCpuUse by host ]
| join host [ search index=os sourcetype=perfmon* 
    | stats avg(Value) as Average max(Value) as Max by host counter ]

Although I don't think that is going to work exactly the way you want...

0 Karma

lguinn2
Legend

What output do you get from this search?

index=os sourcetype=perfmon*
| stats avg(Value) as Average max(Value) as Max by host counter

0 Karma

Splunk_U
Path Finder

No it is not working...I have tried the same follow ... 😞

0 Karma

lguinn2
Legend

Do you really need these stats combined? Or could you put both searches on a dashboard, where you could see the results side-by-side?

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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