Getting Data In

rsyslog -> splunk UDP port 515

jeremymiller
New Member

Hi, I already have a syslog receiver (rsyslogd) that receives ALL syslog messages from our environment. I configured it to forward everything to 127.0.0.1 UDP port 515. Then I added a UDP Network data input in Splunk of port 515 of type syslog.

However, every event in Splunk has timestamp localhost prepended to it like so:
Sep 6 14:00:32 localhost Sep 6 14:00:32 uskyarpts08s0.mydomain.com vsftpd[4174]: warning: can't get client address: Connection reset by peer

Is there any way to make it so the original syslog host (uskyarpts08s0) is preserved as the actual source host and the localhost is not prepended?

Tags (1)
0 Karma
1 Solution

MarioM
Motivator

you can tell splunk to not prepend in inputs.conf with no_appending_timestamp=true:

no_appending_timestamp = [true|false]
* If this attribute is set to true, Splunk does NOT append a timestamp and host to received events.
* NOTE: Do NOT include this attribute if you want to append timestamp and host to received events.
* Default is false.

You can override host as well with props & transforms:

props.conf

[source::udp:515]
TRANSFORMS-extract_host = hostoverride

transforms.conf:

[hostoverride]
DEST_KEY = MetaData:Host
REGEX = ^\w+\s+\d+\s+\d+:\d+:\d+\s+\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+(\S+)
FORMAT = host::$1

View solution in original post

MarioM
Motivator

you can tell splunk to not prepend in inputs.conf with no_appending_timestamp=true:

no_appending_timestamp = [true|false]
* If this attribute is set to true, Splunk does NOT append a timestamp and host to received events.
* NOTE: Do NOT include this attribute if you want to append timestamp and host to received events.
* Default is false.

You can override host as well with props & transforms:

props.conf

[source::udp:515]
TRANSFORMS-extract_host = hostoverride

transforms.conf:

[hostoverride]
DEST_KEY = MetaData:Host
REGEX = ^\w+\s+\d+\s+\d+:\d+:\d+\s+\w+\s+\w+\s+\d+\s+\d+:\d+:\d+\s+(\S+)
FORMAT = host::$1
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...