Monitoring Splunk

Can you help me with my subsearch?

jip31
Motivator

Hello

I tried to combine the first query (before | append) with the subsearch ( [ search index=.........) but it doesn't work.
could you help me please??

eventtype="AppliEV" Name="'*'" (Level=1 OR Level=3) | dedup _time Name 
| stats dc(_time) as Erreurs by Name host
| rename Name as Application

| append
    [ search index="ai-wkst-windows-fr" sourcetype=WinRegistry key_path="\\registry\\machine\\software\\wow6432node\\xx\master\\WindowsVersion" 
    | eval OS=if(key_path=="\\registry\\machine\\software\\wow6432node\\xx\\master\\WindowsVersion",data, null)
  ] 

| table _time host Name Level EventCode OS
| rename Name as Application 
| sort -_time
Tags (1)
0 Karma
1 Solution

inventsekar
SplunkTrust
SplunkTrust

As per my understanding of "append" command, we have to keep the rows same (or the list of fields) on both searches..

(A bit modified version.. you may need to edit)

eventtype="AppliEV" Name="'*'" (Level=1 OR Level=3) | dedup _time Name 
 | stats dc(_time) as Erreurs by Name host
 | append
        [ search index="ai-wkst-windows-fr" sourcetype=WinRegistry 
         key_path="\\registry\\machine\\software\\wow6432node\\xx\master\\WindowsVersion" 
        | stats dc(_time) as Erreurs by Name host
        ] 
 | table _time host Name Level EventCode OS
 | rename Name as Application 
 | sort -_time
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

View solution in original post

0 Karma

jip31
Motivator

Hi it doesnt works no _time, eventcode, level and OS event...

0 Karma

inventsekar
SplunkTrust
SplunkTrust

As per my understanding of "append" command, we have to keep the rows same (or the list of fields) on both searches..

(A bit modified version.. you may need to edit)

eventtype="AppliEV" Name="'*'" (Level=1 OR Level=3) | dedup _time Name 
 | stats dc(_time) as Erreurs by Name host
 | append
        [ search index="ai-wkst-windows-fr" sourcetype=WinRegistry 
         key_path="\\registry\\machine\\software\\wow6432node\\xx\master\\WindowsVersion" 
        | stats dc(_time) as Erreurs by Name host
        ] 
 | table _time host Name Level EventCode OS
 | rename Name as Application 
 | sort -_time
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

jip31
Motivator

Hi it doesnt works no _time, eventcode, level and OS event...

0 Karma

inventsekar
SplunkTrust
SplunkTrust

i am not sure, but, lets check this - try to return the same table fields from append back to the original search.

 eventtype="AppliEV" Name="'*'" (Level=1 OR Level=3) | dedup _time Name 
 | stats dc(_time) as Erreurs by Name host
 | rename Name as Application
  | append
     [ search index="ai-wkst-windows-fr" sourcetype=WinRegistry key_path="\\registry\\machine\\software\\wow6432node\\xx\master\\WindowsVersion" 
     | eval OS=if(key_path=="\\registry\\machine\\software\\wow6432node\\xx\\master\\WindowsVersion",data, null) 
 | table _time host Name Level EventCode OS
   ] 

 | table _time host Name Level EventCode OS
 | rename Name as Application 
 | sort -_time
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...