[syslog-ng]Regular Expressions with Syslog-nt

Leon Oosterwijk leon@isdn.net
Wed, 30 Jan 2002 13:50:18 -0600


All, 

I'm trying to use Regular Expressions for my hostname. I'm running into
somewhat of a problem with finding out what I can match on. Here are my
questions. 

I appears that the logging only matches on the host portion of the hostname
unless you turn on use_fqdn(yes); in the options section. However, if I turn
this on, it will start writing the entries to the log file as:

> Jan 30 13:19:15 gw03-bna.isdn.net/gw03-bna.isdn.net

I wish it to only write 

> Jan 30 13:19:15 gw03-bna/gw03-bna

But still be able to match on FQDN. 

(BTW, what is the deal with the hostname/hostname. Can I make it just be
"hostname" no slashes, and name duplication)

The second issue is the RegEx Syntax. I'm trying this:
filter f_rtr_bna { host("^.*rtr.nrep.bna.isdn.net$");   };
filter f_rtr_mem { host("^.*mem.isdn.net$");   };

Which is obviously not working. What do need to do here?