[syslog-ng] syslog-ng help: how can I use function in double quotes?

Henry Xu xkb.surfing at gmail.com
Tue Jul 5 17:17:02 CEST 2011


Hi All,

 

How can I use a function in double quote? I want to record the IP address of
the syslog-ng server.

Since there's no available macro that represent the IP of syslog-ng
server(only have macros indicate where the message sent to syslog-ng
server,like $HOST). So I want to use ip() function and record it to
database.

 

The configuration part is:

 

            columns(  "datetime varchar2(24)",

                                "server_ip varchar2(24)",

                                "host varchar2(32)",

                                ...)

            values(     "${R_YEAR}-${R_MONTH}-${R_DAY}
${R_HOUR}:${R_MIN}:${R_SEC}",

                                "ip()",

                                "$HOST",

                                ...)


When I started syslog-ng,it gave error message that said expecting double
quotes.

How can I use a function in double quotes? Or are there any other ways to
get the syslog-ng server IP address and record them?

Thanks,

Henry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20110705/5ad6708b/attachment.htm 


More information about the syslog-ng mailing list