Skip to content

Commit

Permalink
Refine rawmsg destination
Browse files Browse the repository at this point in the history
* Refine rawmsg destination test based on Bazsi's input
  • Loading branch information
Mark Bonsack committed Apr 20, 2020
1 parent c817b86 commit 8654150
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions package/etc/conf.d/destinations/rawmsg_file.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
destination d_rawmsg {
channel {
# Test for length of RAWMSG macro contents, minimum (meaning not set) appears to be "2"
filter { "$(length (${RAWMSG}))" != "2" };
destination {
file("/opt/syslog-ng/var/archive/rawmsg/${.splunk.sourcetype}/${HOST}/$YEAR-$MONTH-$DAY-message.log"
template("${RAWMSG}\n")
# template("Length of RAWMSG is: $(length (${RAWMSG})), RAWMSG is: <${RAWMSG}>\n")
);
if ("${RAWMSG}" ne "") {
destination {
file("/opt/syslog-ng/var/archive/rawmsg/${.splunk.sourcetype}/${HOST}/$YEAR-$MONTH-$DAY-message.log"
template("${RAWMSG}\n")
);
};
};
};
};

0 comments on commit 8654150

Please sign in to comment.