Getting Data In

How to configure inputs.conf to route logs from 2 IP addresses to a specific index?

j666gak
Communicator

Hello

I have a number of devices logging to an index feeding Splunk via Syslog on 514/UDP. Now, I want to route logs coming in over port 514 from two particular IP addresses to a specific index.

I would like anything with IP 192.168.1.1 and 192.168.1.2 to get indexed in an index called "web-gateway" and I do not want this configuration to affect anything else coming through via port 514.

From my understanding, I can do this using inputs.conf. I have read through the documentation for inputs.conf and the only thing in relation to IPs I can see in there is to blacklist or whitelist.

Can somebody advise how I can do this please?

Thanks

1 Solution

masonmorales
Influencer

Define two new stanzas in your inputs.conf:

[udp://192.168.1.1:514]
index=web-gateway

[udp://192.168.1.2:514]
index=web-gateway

View solution in original post

masonmorales
Influencer

Define two new stanzas in your inputs.conf:

[udp://192.168.1.1:514]
index=web-gateway

[udp://192.168.1.2:514]
index=web-gateway

Michael
Contributor

FWIW, names worked too...

thanks!

0 Karma

j666gak
Communicator

That worked great thanks

0 Karma

fdi01
Motivator

cool and Thanks for the information

0 Karma

ppablo
Retired

Hi @j666gak

Thanks for the information and clarifying. I edited your post to include the extra details you provided in your last comment.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...