Splunk Search

Values from inputlookup file not captured in syslog

Maverick904
Explorer

Hello All,

I wrote below query to get the URLs from inputlookup file that is not captured in syslog.But didnt give me any results.Can someone please help me to find out the issue with below query.

  1. |inputlookup URLs.csv | fields Domains| rename Domains as domain | join domain[search index=* sourcetype=syslog eventtype=DNS host="device1" OR host="device2" | where domain=""] | table domain
0 Karma

micahkemp
Champion

I suggest you move your search strings around such that your inputlookup is the one inside your join search:

index=* sourcetype=syslog eventtype=DNS host="device1" OR host="device2" 
| where domain="" 
| join domain 
    [| inputlookup URLs.csv 
    | fields Domains 
    | rename Domains as domain 
    ] 
| table domain

In your example (and in mine as I tried to keep it the same as yours), you are searching for an empty domain field, but are also joining on the same domain field. This seems like it would cause an issue with your join.

0 Karma

Maverick904
Explorer

@micahkemp

Thank you so much for your input.I ran the query u have provided.But no results found.
please Correct me if i am wrong.the query you have given,will take each domain from lookupfile and search it in syslog. And if the URL not found in syslog,then it will list in table?

0 Karma

micahkemp
Champion

I'm not sure that the search I pasted actually accomplishes anything of value, because I don't really understand your use case. Can you explain more about what it is you are looking for in terms of searching and how the CSV could be used?

What I have above looks like it would end up performing basic lookup capabilities, which would be better accomplished by using the lookup command with the csv in question.

0 Karma

Maverick904
Explorer

Actually i have few URLs in inputlookup file.i want each URL from lookup file to be searched in syslog.And whichever URLs are not found in syslog,should be showed in a table..

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...