Last active
February 9, 2017 09:33
-
-
Save faxm0dem/63f40d0fd9963af2b6417a87ac09e49b to your computer and use it in GitHub Desktop.
syslog-ng SDATA RFC5424
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
source s_remote_udp { | |
network( | |
transport(udp), | |
port(514), | |
flags(syslog-protocol) | |
); | |
}; | |
filter f_dell { | |
match( | |
'^PowerEdge', | |
value(".SDATA.facter.productname") | |
); | |
}; | |
destination d_dell { | |
file("/var/log/remote/dell.log"); | |
}; | |
log { | |
source(s_remote_udp); | |
filter(f_dell); | |
destination(d_dell); | |
}; |
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
rewrite r_sdata_facter { | |
set( | |
"PowerEdge 1950", | |
value( | |
".SDATA.facter.productname" | |
) | |
); | |
}; | |
destination d_network { | |
network( | |
"remote-syslog", | |
transport(udp), | |
port(514), | |
flags(syslog-protocol) | |
); | |
}; | |
log { | |
... | |
rewrite(r_sdata_facter); | |
destination(d_network); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment