Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Override host field with event data

$
0
0
Hello, I am indexing some data from a file monitor and i want to override the host field with data that lays inside the events. Below is a sample of the data and the values i want for the host field with bold. Mon Oct 09 2017 15:24:18 **SE-001** sshd[5905]: Failed password for invalid user postgres from 49.212.64.138 port 4856 ssh2 Mon Oct 09 2017 15:24:13 **ACME-005** sshd[2792]: Failed password for nsharpe from 10.2.10.163 port 1148 ssh2 Mon Oct 09 2017 15:24:12 **ops-sys-006** sshd[4105]: Failed password for sync from 233.77.49.94 port 4595 ssh2 Mon Oct 09 2017 15:24:19 **PROD-MFS-001** sshd[74897]: pam_unix(sshd:session): session closed for user nsharpe by (uid=0) Mon Oct 09 2017 15:24:07 **PROD-MFS-001** su: pam_unix(su:session): session closed for user root The data is indexed under linux_secure sourcetype. In order to achieve the host overriding, i added one props.conf and one transforms.conf stanza in /etc/system/local on the indexers: props.conf [linux_secure] TRANSFORMS-sethost = set_hostname_linux_secure SHOULD_LINEMERGE = false transforms.conf [set_hostname_linux_secure] REGEX = (?<=:\d{2}\s).*?(?=\s) FORMAT = host::$1 DEST_KEY = MetaData:Host The above configuration is not working, and the events are still indexing with host = the name of the forwarder where they come from. Any idea what's wrong with this configuration and how can i implement the host overriding? Thanks a lot!

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>