@kn450 Whats your setup? Multiple products sending syslog traffic to splunk syslog receiver? or do you have any syslog-ng/rsyslog setup? If you have multiple products better to use syslog-ng/ryslog to listen syslog port(single or dedicated port) and filter incoming messages by pattern, host, or facility and then send them to different destinations. Eg: # Source: listen for syslog on UDP 514
source s_net {
udp(ip(0.0.0.0) port(514));
};
# Filters based on client IP
filter f_productA { netmask(192.168.x.x/32); };
filter f_productB { netmask(192.168.x.x/32); };
# Destinations: write to different files
destination d_productA {
file("/var/log/productA.log");
};
destination d_productB {
file("/var/log/productB.log");
};
# Log paths
log { source(s_net); filter(f_productA); destination(d_productA); };
log { source(s_net); filter(f_productB); destination(d_productB); }; Then use splunk inputs.conf for each product and assign correct sourcetype,index.... If you can’t split at syslog, you can still do it on the Splunk side. Use props.conf with a TRANSFORMS stanza to rewrite the sourcetype based on a regex match Eg: # props.conf
[nix:syslog]
TRANSFORMS-set_sourcetype = set_productA, set_productB
# transforms.conf
[set_productA]
REGEX = ProductA
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::productA_syslog
[set_productB]
REGEX = ProductB
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::productB_syslog Regards, Prewin 🌟If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!
... View more