[syslog-ng]$HOST $YEAR, etc not working correctly..

Doug Peterson syslog-ng@lists.balabit.hu
Wed, 25 Feb 2004 12:19:37 -0800 (PST)


Hi Chuck --

How do you specify your options then if the only entry in destination is file() ?

I tried doing this:

destination messages.network {
file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages\_$HOST\_$YEAR\_$MONTH\_$DAY" );
                                owner(root) group(sysadmin) perm(0640) dir_perm(0700)
create_dirs(yes) };

but got syntax errors. 

--- "Kelly, Chuck" <chuckk@qualcomm.com> wrote:
> My point being try separating the lines out, I do a similar thing with
> no issues, but keep destinations within their own set of {} 
> 
> 
> --
> Chuck
> 
> -----Original Message-----
> From: syslog-ng-admin@lists.balabit.hu
> [mailto:syslog-ng-admin@lists.balabit.hu] On Behalf Of Doug Peterson
> Sent: Tuesday, February 24, 2004 2:43 PM
> To: syslog-ng@lists.balabit.hu
> Subject: [syslog-ng]$HOST $YEAR, etc not working correctly..
> 
> Howdy, I recently installed the same config file I had in 1.6.0rc1(or
> rc2?) on redhat 7.3 to a system with syslog-ng 1.6.2 with redhat 9...
> 
> My log files are not being written in the format that I would expect (or
> that they WERE on the old box).. 
> 
> I would expect the following rule to write to the
> file:
> /var/log/hosts/webserver1/2004/02/24/webserver1_messages_2004_02_24
> 
> Instead I get:
> /var/log/hosts/webserver1/2004/02/24/messsages_24
> 
> The rule: destination messages.network {
> file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$HOST_messages_$YEAR_$MONTH
> _$DAY"
>                                 owner(root)
> group(sysadmin) perm(0640) dir_perm(0700)
> create_dirs(yes) ); };
> 
> This happens with all similar destination rules. The $year, $month,
> $host, etc work fine in the first portion of the destination, but they
> don't all work in the filename.. but $day does for some strange reason. 
> 
> I can provide my full 164 line config file on request, but all
> destinations are setup the same as this one, and all get the same
> result. 
> 
> What am I missing here? :)
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
> 
> 
> 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools