Thanks, but the %PROGRAMNAME%.log file is being created with the correct name, so it doesn't appear to be a case issue in the template line, which works fine, rather in the expression filter line, with the comparison '$hostname <> $myhostname' and variations always being true unless I replace the RHS with the literal 'rack1a'. Playing with the cases there doesn't change a thing. Any other ideas?
-- Brian -----Original Message----- From: [email protected] on behalf of Jonathan Sabo Sent: Sat 11/6/2010 8:41 AM To: rsyslog-users Subject: Re: [rsyslog] rsyslog conf file questions I think the properties are case sensitive in certain versions of rsyslog. I think I read that that changed in newer versions. Try %programname% On Fri, Nov 5, 2010 at 7:43 PM, Brian Rogoff <[email protected]> wrote: > Hi, > On my logging server named rack1a I have at the top of my rsyslog.conf > these lines > > $template DynaFile,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" > if $hostname <> 'rack1a' then -?DynaFile > & ~ > > the intent being that I'd like to collect messages from some services > (%PROGRAMNAME%) from other machines > and store them in their own files. I'd like the conf files to not have a > dependency on their name. However, > when I write lines like > > if $hostname <> $myhostname then -?DynaFile > > or > > if $hostname <> $fromhostname then -?DynaFile > > or even > > if $hostname <> getenv('HOSTNAME') then -?DynaFile > > rsyslogd creates /var/log/rack1a/%PROGRAMNAME%.log files in addition to the > logs for the external programs. > > What am I doing wrong here? I'm using rsyslog 5.6.0v5(stable). > > -- Brian > > > > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com > > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com
<<winmail.dat>>
_______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

