Splunk Search

Hosts event search by lookup table

ned692000
Engager

Hi all,

I have created a lookup table and imported it into SPLUNK. It has 2 columns, one called hosts the other called IPs. The columns are populated with the hosts I want to query. I'm very new to SPLUNK and would like to create a search that returns errors/events worth investigating from the hosts specified in the lookup file. I'll display the results on a dashboard and will be checking this daily for preventative maintenance on my system. I'm just after events worth looking in to and need to filter out irrelevant events to save time. Can anyone help? Thanks in advance.

Labels (1)
0 Karma

manjunathmeti
Champion

hi @ned692000,

You can filter index events using inputlookup in a sub-search like below. This will return the events for the hosts specified in the lookup file

index=indexname sourcetype=sourcetypename [| inputlookup lookup_table | fields hosts | rename hosts as host | format]

 

If this reply helps you, a like would be appreciated.

ned692000
Engager

Thanks for your reply, that worked and its very useful. I have a further question. Are there any keywords/ event ID's that I can use to filter out events for Linux machines? I have used event ID's for windows but not sure what to use for Linux. Thanks again

0 Karma

isoutamo
SplunkTrust
SplunkTrust
In Linux there are not same kind of event ids as Windows have. In Linux there are several logs like syslog which have several different events from several processes/daemons. Depending of your configuration you could have sourcetypes, tags or other keywords which you can use in our queries.
For further help we must know what and how you are collecting those logs and are you using some TA's for that or are you doing tokenisation by yourself.
r. Ismo
0 Karma

ned692000
Engager

Hi,

Thanks for the reply, it's taking everything from var/messages via a forwarder. Is there anything I can use as a filter to reduce UN-useful messages. i.e. things I need to keep an eye on, rather than just normal system events

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...