[syslog-ng] unable to figure out syntax error in config file

Balazs Scheidler bazsi at balabit.hu
Fri Mar 27 18:54:24 CET 2009


On Thu, 2009-03-26 at 07:44 -0700, Ritesh Sood wrote:
> On Mar 26, 2009, at 3:59 AM, ILLES, Marton wrote:
> 
> > On Wed, 2009-03-25 at 19:59 -0700, Ritesh Sood wrote:
> >> I've tried all of the following:
> >> 1a) destination d_loghost { syslog(ip"169.237.32.44" keep-alive(yes)
> >> localport(1999)); };
> >> 1b) destination d_loghost { syslog(ip(169.237.32.44) keep-alive(yes)
> >> localport(1999)); };
> >>
> >> 2a) destination d_loghost { syslog(ip"169.237.32.44" ; keep- 
> >> alive(yes)
> >> localport(1999)); };
> >> 2b) destination d_loghost { syslog(ip(169.237.32.44) ; keep- 
> >> alive(yes)
> >> localport(1999)); };
> >>
> >> and other combinations by removing the options keep-alive(yes) and/or
> >> localport(1999));
> >>
> >> However, each time I get a syntax error report.
> >
> > Try:
> >
> > destination d_loghost
> > {
> > 	syslog("169.237.32.44"
> > 		keep-alive(yes)
> > 		localport(1999)
> > 	);
> > };
> >
> > Note: indent is not important, just for better readability.
> >
> Tell you what, it worked ! Thanks a lot.
> What also works is
> source s_remote { syslog(ip(169.237.32.44) max-connections(50)); };
> some consistency, please.

it is consistent, but possibly with a logic different than yours.
sources and destinations are not completely symmetric. for sources the
IP address denotes the bind address, and as such it is optional (and
defaults to 0.0.0.0). For destinations it is the target IP address and
as such it is required.



-- 
Bazsi




More information about the syslog-ng mailing list