Getting Data In

What is the best practice to write monitor stanzas for onboard Network logs from multiple hosts on server?

jarapally
Explorer

We have to onboard logs from more than 1200 network hosts which reside on a single server.
What is the best practice to write the monitor stanzas? Should we write stanza for each host or is there any other easy way to onboard?

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Sounds like you have the network sources being collected onto a remote host where they are persisted by log files (like a syslog setup).

Therefore, how about one monitor stanza on the host that will search through the sub-directories. You can then use the configuration file settings like host_segment or host_regex to dynamically assign the true network source's hostname.

https://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf#MONITOR:

0 Karma

adonio
Ultra Champion

hello there,

take a look at this doc, hopefully you will find it helpful.
https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Specifyinputpathswithwildcards

0 Karma

jarapally
Explorer

There are more than 1200 IP's with different ranges. Writing a wildcard can be difficult. Any other way

0 Karma

adonio
Ultra Champion

when you say "network hosts" do you mean switches, routes, etc?

0 Karma

jarapally
Explorer

Yes exactly everything from network devices

0 Karma

adonio
Ultra Champion

i think syslog-ng or rsyslog is the easier solution.
leverage one of them to write the files to a nice structure and then use the monitor stanza with wild cards and host segment to assign the proper host name to each log

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...