RE: [syslog-ng]$HOST $YEAR, etc not working correctly..
More Info.. Linux Kernel 2.4.20-30.9smp 1.6.0rc4 produces the same results 1.6.0rc2 ignores $HOST/$YEAR/$MONTH completely (even in the directory structure), so therefore dumps all files in /var/log/hosts with messages_24 ($DAY still works) __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools
I seem to be creating my own thread here... I was always told its ok to talk to yourself as long as you don't talk back... hhrrmmm I found the original that I downloaded and it was 1.6.0rc1, I compiled and installed that (with the latest stable libol), and it worked like a charm, just like before.. Anyone have any insight on this? --- Doug Peterson <mucknet@yahoo.com> wrote:
More Info.. Linux Kernel 2.4.20-30.9smp
1.6.0rc4 produces the same results
1.6.0rc2 ignores $HOST/$YEAR/$MONTH completely (even in the directory structure), so therefore dumps all files in /var/log/hosts with messages_24 ($DAY still works)
__________________________________ 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
__________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools
2004-02-25, sze keltezéssel 03:34-kor Doug Peterson ezt írta:
I seem to be creating my own thread here... I was always told its ok to talk to yourself as long as you don't talk back... hhrrmmm
I found the original that I downloaded and it was 1.6.0rc1, I compiled and installed that (with the latest stable libol), and it worked like a charm, just like before..
strange, the problem seems to be that you reference marcos like $YEAR_$MONTH_ which is interpeted as $YEAR_ concatenated with $MONTH_, these are undefined macros, thus are expanded to an empty string. Try escaping the underscore with a backslash, like $YEAR\_$MONTH\_ -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
strange, the problem seems to be that you reference marcos like $YEAR_$MONTH_
which is interpeted as $YEAR_ concatenated with $MONTH_, these are undefined macros, thus are expanded to an empty string.
Try escaping the underscore with a backslash, like
$YEAR\_$MONTH\_
I escaped out the _ characters, and am still getting the same results with 1.6.2.. files are being written as messages_25 (25 being $DAY) My rules now look like 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) ); }; __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools
2004-02-25, sze keltezéssel 21:16-kor Doug Peterson ezt írta:
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
strange, the problem seems to be that you reference marcos like $YEAR_$MONTH_
which is interpeted as $YEAR_ concatenated with $MONTH_, these are undefined macros, thus are expanded to an empty string.
Try escaping the underscore with a backslash, like
$YEAR\_$MONTH\_
I escaped out the _ characters, and am still getting the same results with 1.6.2.. files are being written as messages_25 (25 being $DAY)
My rules now look like 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) ); };
This definitely works here. syslog-ng uses gperf to generate a lookup hash for macro names. A generated file is shipped with syslog-ng to avoid the build dependency on gperf, but maybe it was regenerated for some reason. This area had a bug in 1.6.0rc2 (before or after this version should be ok), are you sure you are running 1.6.2? -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
2004-02-25, sze keltez�ssel 21:16-kor Doug Peterson ezt �rta:
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
strange, the problem seems to be that you reference marcos like $YEAR_$MONTH_
which is interpeted as $YEAR_ concatenated with $MONTH_, these are undefined macros, thus are expanded to an empty string.
Try escaping the underscore with a backslash, like
$YEAR\_$MONTH\_
I escaped out the _ characters, and am still getting the same results with 1.6.2.. files are being written as messages_25 (25 being $DAY)
My rules now look like 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) ); };
This definitely works here. syslog-ng uses gperf to generate a lookup hash for macro names. A generated file is shipped with syslog-ng to avoid the build dependency on gperf, but maybe it was regenerated for some reason.
This area had a bug in 1.6.0rc2 (before or after this version should be ok), are you sure you are running 1.6.2?
-- Bazsi
I am running: syslog-ng 1.6.0rc1 currently, and that is the most recent version that works (I'm not sure if I tried rc2). When I install 1.6.2 I encounter the macro problem, even when I escape the underscore. __________________________________ Do you Yahoo!? Yahoo! Search - Find what you�re looking for faster http://search.yahoo.com
I saw this as well, and replaced all the underscores with dashes. This problem started with 1.6.x. Richard -----Original Message----- From: syslog-ng-admin@lists.balabit.hu [mailto:syslog-ng-admin@lists.balabit.hu] On Behalf Of Doug Peterson Sent: Wednesday, March 03, 2004 11:08 AM To: syslog-ng@lists.balabit.hu Subject: RE: [syslog-ng]$HOST $YEAR, etc not working correctly.. --- Balazs Scheidler <bazsi@balabit.hu> wrote:
2004-02-25, sze keltezéssel 21:16-kor Doug Peterson ezt írta:
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
strange, the problem seems to be that you reference marcos like $YEAR_$MONTH_
which is interpeted as $YEAR_ concatenated with $MONTH_, these are undefined macros, thus are expanded to an empty string.
Try escaping the underscore with a backslash, like
$YEAR\_$MONTH\_
I escaped out the _ characters, and am still getting the same results with 1.6.2.. files are being written as messages_25 (25 being $DAY)
My rules now look like 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) ); };
This definitely works here. syslog-ng uses gperf to generate a lookup hash for macro names. A generated file is shipped with syslog-ng to avoid the build dependency on gperf, but maybe it was regenerated for some reason.
This area had a bug in 1.6.0rc2 (before or after this version should be ok), are you sure you are running 1.6.2?
-- Bazsi
I am running: syslog-ng 1.6.0rc1 currently, and that is the most recent version that works (I'm not sure if I tried rc2). When I install 1.6.2 I encounter the macro problem, even when I escape the underscore. __________________________________ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com _______________________________________________ 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
2004-03-03, sze keltezéssel 20:07-kor Doug Peterson ezt írta:
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
2004-02-25, sze keltezssel 21:16-kor Doug Peterson ezt rta:
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
strange, the problem seems to be that you reference marcos like $YEAR_$MONTH_
which is interpeted as $YEAR_ concatenated with $MONTH_, these are undefined macros, thus are expanded to an empty string.
Try escaping the underscore with a backslash, like
$YEAR\_$MONTH\_
I escaped out the _ characters, and am still getting the same results with 1.6.2.. files are being written as messages_25 (25 being $DAY)
My rules now look like 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) ); };
This definitely works here. syslog-ng uses gperf to generate a lookup hash for macro names. A generated file is shipped with syslog-ng to avoid the build dependency on gperf, but maybe it was regenerated for some reason.
This area had a bug in 1.6.0rc2 (before or after this version should be ok), are you sure you are running 1.6.2?
-- Bazsi
I am running: syslog-ng 1.6.0rc1 currently, and that is the most recent version that works (I'm not sure if I tried rc2).
When I install 1.6.2 I encounter the macro problem, even when I escape the underscore.
I think I now understand the nature of the problem. The lexer strips off a single '\' from strings, e.g. you need destination d_file { file("/var/log/messages/$HOST\\_$YEAR\\_" ); }; This is very similar to how the C language works. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (3)
-
Balazs Scheidler
-
Doug Peterson
-
Richard E. Perlotto II