Well, that is odd. I am using a similar destination line destination pika.comp { tcp("pika.comp.uvic.ca" localip("syslog2.uvic.ca") log_fifo_size(50000) ); }; and am running version 2.0.2 on linux however, when I add in the localport or the destport a syntax error occurs. I ahve also noticed that if I have a template_escape first on a line that has a template on it, I still get the error of template_escape can only be used on inline templates. Syntax checker needs a little work :-( Over to the author for this. Evan. simonst@wellsfargo.com wrote:
Localip() and localport() parms still causing a syntax error, after straightening out semicolons (thanks to Evan Rempel).
# syslog-ng -V syslog-ng 2.0.2
# cat -n syslog-ng.test #Show syslog-ng.test without localip() & localport() 1 options { long_hostnames(off); sync(0); }; 2 source src { unix-stream("/dev/log"); internal(); }; 3 source kernsrc { file("/proc/kmsg"); }; 4 destination logger { tcp("10.11.12.13" port(5678) template("$UNIXTIME $HOST $MESSAGE\n") ); }; 5 log { source(src); source(kernsrc); destination(logger); }; # syslog-ng -dFsf syslog-ng.test # No syntax error without localip() & localport()
# cat -n syslog-ng.test #Add localip() & localport() to syslog-ng.test 1 options { long_hostnames(off); sync(0); }; 2 source src { unix-stream("/dev/log"); internal(); }; 3 source kernsrc { file("/proc/kmsg"); }; 4 destination logger { tcp("10.11.12.13" port(5678) localip(10.9.8.7) localport(5678) template("$UNIXTIME $HOST $MESSAGE\n") ); }; 5 log { source(src); source(kernsrc); destination(logger); }; # syslog-ng -dFsf syslog-ng.test syntax error at 4 # SYNTAX ERROR with localip() & localport()
------------------------------------------------------------------------
_______________________________________________ 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
-- Evan Rempel erempel@uvic.ca Senior Programmer Analyst 250.721.7691 Computing Services University of Victoria