Splunk Search

How to Change Cisco SG350 Switch's sourcetype from syslog to cisco:ios?

splunkot
New Member

I have Cisco Networks App for Splunk Enterprise version 2.5.6 and Cisco Networks Add-on for Splunk Enterprise version 2.5.4 working great for the supported devices. I believe the SG350 switch is not supported, so the sourcetype="syslog". How do I change the source type for all my SG350 from syslog to cisco:ios, so that it can populate the Cisco Network Overview GUI?

Tags (1)
0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi splunkot,

you can do this on the parsing Splunk instance, that is either a heavy weight forwarder or an indexer. You need to configure a stanza in props.conf for syslog:

props.conf

[syslog] 
TRANSFORMS-001_syslog_sourcetype_rewrite = syslog_sourcetype_rewrite

and finally in transforms.conf set the regex to match the hosts or IP's of the SG350 devices:

transforms.conf

[syslog_sourcetype_rewrite] 
REGEX = whatevermatcheshostnamesofyourSG350devices
SOURCE_KEY = MetaData:Host 
DEST_KEY = MetaData:Sourcetype 
FORMAT = sourcetype::cisco:ios

This will only re-write the sourcetype for the SG350 devices.
You will need to restart the Splunk instance where you configured these config files, and it will only apply to new events.

Hope this helps ...

cheers, MuS

View solution in original post

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi splunkot,

you can do this on the parsing Splunk instance, that is either a heavy weight forwarder or an indexer. You need to configure a stanza in props.conf for syslog:

props.conf

[syslog] 
TRANSFORMS-001_syslog_sourcetype_rewrite = syslog_sourcetype_rewrite

and finally in transforms.conf set the regex to match the hosts or IP's of the SG350 devices:

transforms.conf

[syslog_sourcetype_rewrite] 
REGEX = whatevermatcheshostnamesofyourSG350devices
SOURCE_KEY = MetaData:Host 
DEST_KEY = MetaData:Sourcetype 
FORMAT = sourcetype::cisco:ios

This will only re-write the sourcetype for the SG350 devices.
You will need to restart the Splunk instance where you configured these config files, and it will only apply to new events.

Hope this helps ...

cheers, MuS

0 Karma

splunkot
New Member

Thank you MuS, that did the trick.

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...