Skip to content

Instantly share code, notes, and snippets.

@faxm0dem
Last active February 9, 2017 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faxm0dem/63f40d0fd9963af2b6417a87ac09e49b to your computer and use it in GitHub Desktop.
Save faxm0dem/63f40d0fd9963af2b6417a87ac09e49b to your computer and use it in GitHub Desktop.
syslog-ng SDATA RFC5424
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);
};
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