[syslog-ng] Setting facility/priority in 2.1.4?

Ray Van Dolson rvandolson at esri.com
Tue May 3 23:40:31 CEST 2011


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 at 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


More information about the syslog-ng mailing list