Mailing List Archive

Use of $HOSTNAME in Expression-based filter
When I try to use $HOSTNAME in an expression-based filter, I get
"INVALID PROPERTY" errors logged by the system. From the documentation,
I'm lead to believe that expression-based filters use the same
properties as expression-based filters, which are documented in the
property replacer documentation. Okay. But it seems that maybe $HOSTNAME
has been changed to $source in the expression-based filters, but I can't
seem to find any evidence of this in the man or HTML documentation.
Use of $HOSTNAME in Expression-based filter [ In reply to ]
Ah, good report. I see where the problem is stemming from. We use the
same code for property access no matter which method is used
(expression-based, property-based, ...). That's good. The bad thing is
that property names were case-sensitive (a really bad idea). We were in
the discussion to remove that. The RainerScript engine already is
case-insensitive and consequently converts all variable names to lower
case. However, the message object property access method has not yet
been converted, so it expects it in upper case. The result is the mess
that you see...

I'll initiate a quick discussion, but I think we'll now drop
case-sensitivity at all. That shouldn't hurt any existing installations
but instead make life easier.

Thanks for bringing this up. For the same reason "$source" is the
solution and I have seen in the forum that it works for you.

Rainer

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Ben Lentz
> Sent: Wednesday, April 02, 2008 11:11 PM
> To: rsyslog at lists.adiscon.com
> Subject: [rsyslog] Use of $HOSTNAME in Expression-based filter
>
> When I try to use $HOSTNAME in an expression-based filter, I get
> "INVALID PROPERTY" errors logged by the system. From the
documentation,
> I'm lead to believe that expression-based filters use the same
> properties as expression-based filters, which are documented in the
> property replacer documentation. Okay. But it seems that maybe
> $HOSTNAME
> has been changed to $source in the expression-based filters, but I
> can't
> seem to find any evidence of this in the man or HTML documentation.
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog