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!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...