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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...