Setting facility/priority in 2.1.4?
[ Wasn't subscribed to the list -- apologies if this ends up getting posted twice. ] I have a source (a FIFO/pipe) which I am re-emitting to another syslog-ng server via TCP. How do I define what facility and priority the data from this source is transmitted with? What is the default (daemon.info?)? This is syslog-ng 2.1.4 (old I know). Thanks, Ray
Hi, user.info is the default for non-kernel sources when the priority isn't set. You can't override PRI for the incoming logs in syslog-ng 2.1 however you can assign a template when you forward the logs to another syslog-ng instance. Use something like source s_myfifo { pipe("/foo/bar"); }; destination d_anothersyslog { tcp(1.2.3.4 port(514) template("<30> ${ISODATE} ${HOST} ${MESSAGE}\n")); }; log { source(s_myfifo); destination(d_anothersyslog); }; in the template the first field is the decimal priority code, for example <30> means daemon.info Regards, Sandor On Mon, May 2, 2011 at 11:47 PM, Ray Van Dolson <rvandolson@esri.com> wrote:
[ Wasn't subscribed to the list -- apologies if this ends up getting posted twice. ]
I have a source (a FIFO/pipe) which I am re-emitting to another syslog-ng server via TCP.
How do I define what facility and priority the data from this source is transmitted with? What is the default (daemon.info?)?
This is syslog-ng 2.1.4 (old I know).
Thanks, Ray ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
On Tue, May 03, 2011 at 01:30:05AM -0700, Sandor Geller wrote:
Hi,
user.info is the default for non-kernel sources when the priority isn't set. You can't override PRI for the incoming logs in syslog-ng 2.1 however you can assign a template when you forward the logs to another syslog-ng instance. Use something like
source s_myfifo { pipe("/foo/bar"); };
destination d_anothersyslog { tcp(1.2.3.4 port(514) template("<30> ${ISODATE} ${HOST} ${MESSAGE}\n")); };
log { source(s_myfifo); destination(d_anothersyslog); };
in the template the first field is the decimal priority code, for example <30> means daemon.info
Regards,
Sandor
Thanks, Sandor. This worked great! Ray
On Mon, May 2, 2011 at 11:47 PM, Ray Van Dolson <rvandolson@esri.com> wrote:
[ Wasn't subscribed to the list -- apologies if this ends up getting posted twice. ]
I have a source (a FIFO/pipe) which I am re-emitting to another syslog-ng server via TCP.
How do I define what facility and priority the data from this source is transmitted with? What is the default (daemon.info?)?
This is syslog-ng 2.1.4 (old I know).
Thanks, Ray
participants (2)
-
Ray Van Dolson
-
Sandor Geller