Getting Data In

syslog-ng configuration

maheshnc
Path Finder

I need to onboard CISCO IOS switch logs with splunk, we have a syslog-ng installed on HF, could somebody explain the exact configurations to be made in syslog-ng.conf?

Thanks in Advance

Labels (3)
0 Karma

PrewinThomas
Motivator

@maheshnc 

You can use rsyslog or syslog-ng based on your comfort and your system setup. Personally i have seen rsyslog is giving better performance for high volume environments and syslog-ng is more user friednly and easier to maintain the configs.

To your question, basic structure looks something like this for syslog-ng

# 1. Source: listen for UDP 514
source s_cisco {
udp(port(514));
};

# 2. Destination: write logs to a dedicated file per device
destination d_cisco {
file("/var/log/cisco/$HOST/ios.log"
perm(0644) create_dirs(yes));
};

# 3. Filter: accept from cisco switch IP's
filter f_cisco {
host("10.10.10.1") or host("10.10.10.2");
};

# 4. Log path
log {
source(s_cisco);
filter(f_cisco);
destination(d_cisco);
};

 

Regards,
Prewin
If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!

PickleRick
SplunkTrust
SplunkTrust

I would say that "user friendly" and "easier to maintain" is highly subjective 😉

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @maheshnc ,

at first I hint to use rsyslog instead of syslog-ng because it's newer.

anyway you can find a guide for syslog-ng at https://syslog-ng.github.io/ and for rsyslog at https://www.rsyslog.com/doc/index.html

If you choose to use rsyslog, I can help you.

Ciao.

Giuseppe

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

While I'm a big fan of rsyslog myself, you can't say that it's "newer" than rsyslog.

Depending on your metric, they are either both relatively aged already (1998 vs 2004) or both quite fresh (16th July vs 10th June).

But they have huge differences in how they work internally and how they are configured. (And I'm not gonna advocate in this thread for or against any of them).

So if you already have a significantly sized environment based on one of those solutions you're unlikely to migrate to the other one due to required time and effort (but I've known an organization which migrated a huge setup; it was painful).

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!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...