Splunk Search

Need help with Splunk query to merge subsearch with main search

Anon4Now
Loves-to-Learn Lots

Hi,

I am trying to craft a query that will look for Windows devices that have been rebooted and then have accessed a certain file path to launch a service. I have attempted this by creating a subsearch for the windows eventid 6005 (reboot), and then passing the computer name associated with that event to the main search for devices that have accessed a filepath. I am not sure how to obtain an output that will show the computer name of a device that has recently had a reboot and also has accessed the file path.

Thank you for any help, I am new to Splunk subsearches and appreciate any pointers.

index=wineventlog Creator_Process_Name="C:\\Program Files\\XXX\\YYY\\file.exe"
[search index=wineventlog  ComputerName="*xyz.local"  EventCode="6005" | stats count by ComputerName, EventCode | fields ComputerName, EventCode]
|stats values (?) by EventCode

 

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=wineventlog ComputerName="*xyz.local" (EventCode="6005" OR Creator_Process_Name="C:\\Program Files\\XXX\\YYY\\file.exe")
|stats values(*) as * by ComputerName
0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...