-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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") | ||
| ); | ||
| }; | ||
| }; | ||
| }; | ||
| }; |