<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">For some reason I cannot seem to get my log messages to go to the mysql database. I get the following error when I attempt to start the syslog-ng service…<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>jryburn@ryburn-server:/etc/syslog-ng$ sudo service syslog-ng restart</div></div><div><div> * Stopping system logging syslog-ng</div></div><div><div> ...done.</div></div><div><div> * Starting system logging syslog-ng</div></div><div><div>Unable to initialize database access (DBI); rc='-1', error='No such file or directory (2)'</div></div><div><div>Error initializing dest driver; dest='d_mysql', id='d_mysql#0'</div></div><div><div>Error initializing message pipeline;</div></div><div><div> ...fail!</div></div></blockquote><div><br></div><div>The relevant pieces of syslog-ng.conf…<div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><div>source s_net { udp(); };</div></div></div><div><div><div>source s_tcp { tcp(ip(0.0.0.0) port(1999)); };</div></div></div><div><div><br></div></div><div><div><div># Desitations for remote devices</div></div></div><div><div><div>destination d_routers { file("/var/log/routers.log"); };</div></div></div><div><div><br></div></div><div><div><div># Send logs to the mysql database</div></div></div><div><div><div>destination d_mysql {</div></div></div><div><div><div> sql(</div></div></div><div><div><div> type(mysql)</div></div></div><div><div><div> host("localhost")</div></div></div><div><div><div> username("syslogadmin")</div></div></div><div><div><div> password("syslogadmin")</div></div></div><div><div><div> database("syslog")</div></div></div><div><div><div> table("logs")</div></div></div><div><div><div> columns("host", "facility", "priority", "level", "tag", "datetime", "program", "msg")</div></div></div><div><div><div> values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$LEVEL", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "$MSG")</div></div></div><div><div><div> indexes("host", "facility", "priority", "datetime", "program")</div></div></div><div><div><div> );</div></div></div><div><div><div>};</div></div></div><div><div><div><br></div></div></div><div><div><div><div>log { source(s_net); source(s_tcp); destination(d_routers); destination(d_mysql); };</div></div></div></div></blockquote><div><div><div><br></div><div>I have verified the username and password are correct and have access to the syslog database. If I remove the "d_mysql" destination, my log statement works correctly and the log files get dumped in to the /var/log/routers.log file just fine. I have gone through the documentation on the website, FAQs, etc. and come up empty. It has me stumped. Any help would be greatly appreciated.</div><div><br></div><div>Thanks,</div><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-Justin</div><div><br></div></div></div></div></div></body></html>