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!

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

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 ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...