Last active
January 3, 2020 17:39
-
-
Save arkag/f087507dd02544537f417571a1987d6c to your computer and use it in GitHub Desktop.
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
set $!alarmmsg1 = "hello"; | |
set $!alarmfile = "alarm"; | |
if ($programname == "hello" and $msg contains $!alarmmsg1) then { set $!appmsg = "alarm"; } | |
else { set $!appmsg = "not-an-alarm"; } | |
template(name="%$!alarmfile%" type="string" string="{{ hub_log_mount }}/%$!env%/%$!alarmfile%.log") | |
if ( $!appmsg == "alarm" ) then | |
{ | |
action(name="alarm" type="omfile" dynaFile="%$!alarmfile%" fileCreateMode="0644" dirCreateMode="0755" dynaFileCacheSize="100") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment