<div dir="ltr">Hello,<div><br></div><div>As the *--syntax-only* suggest, it only does check for syntactic errors.</div><div>A common way to find such issues to start the process in foreground:</div><div>* stop syslog-ng systemd service (so it won't get in the way)</div><div>* start syslog-ng as the systemd would do, plus include the -F (foreground) option and -e (print internal logs to the stderr); optionally you may also use -d (debug) -v (verbose); but in this case probably the -Fe would suffice</div><div><br></div><div>I just tried your config (with additional @version: 3.18), and it started just fine.</div><div><br></div><div>About the second part. You already using template in your configuration for the date column ( ${R_DATE} ); in the values you should be able to use any template (not template function due).</div><div><br></div><div>--</div><div>Kokan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 14, 2019 at 10:54 PM N. Max Pierson <<a href="mailto:nmaxpierson@gmail.com">nmaxpierson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi List,<div><br></div><div>I have 2 questions about the sql driver. First, I am trying to get messages into sql using the sql driver but I get an error when I try and restart syslog-ng when I enable the log statement with the sql destination. The syslog-ng --syntax-only command runs without any issues but systemd throws and error that it cannot restart the service but doesn't give a clear reason. My config is below, doesn't anyone know where in a log I can see why it won't restart??</div><div><br></div><div>source s_network { udp(ip(0.0.0.0) port(514)); };<br></div><div><br></div><div><div>destination d_mysql {</div><div> sql(type(mysql)</div><div> host("127.0.0.1")</div><div> username("syslog-ng")</div><div> password("password")</div><div> database("syslog")</div><div> table("messages_${HOST}")</div><div> columns("date", "host", "message")</div><div> values("${R_DATE}", "${HOST}", "${MESSAGE}")</div><div> indexes("date", "host") );</div><div>};</div></div><div><br></div><div>log { source(s_network); destination(d_mysql); };<br></div><div><br></div><div><br></div><div>My second question is can you use a template with the sql destination driver? I need to reformat some Cisco Nexus logs because of how it formats the date (looks to be non RFC compliant) and if so, can someone give me a sample of config with the template in the sql destination driver? I cannot seem to find in the docs if this is even possible much less and example of how to do it.</div><div><br></div><div>TIA,</div><div>Max</div></div></div></div></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>