<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Table name (macros) are not the issue, here is how I’m currently creating a table:</div><div class=""><br class=""></div><div class=""><div class="">destination mysql {</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>sql(type(mysql)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>host("localhost") username("syslog") password("xxx")</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>database("syslog")</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>table("syslog_${R_YEAR}${R_MONTH}${R_DAY}")</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>columns("id int(11) unsigned not null auto_increment primary key", "host varchar(40) not null", "facility varchar(20)", "priority varchar(10)", "level varchar(10)", "program text", "date date not null", "time time not null", "message text not null")</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>values("", "$FULLHOST", "$FACILITY", "$PRIORITY", "$LEVEL", "$PROGRAM", "$R_YEAR-$R_MONTH-$R_DAY", "$R_HOUR:$R_MIN:$R_SEC", "$MSG")</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>indexes("id","host","priority"));</div><div class="">};</div></div><div class=""><br class=""></div><div class="">This creates a table like this:</div><div class=""><br class=""></div><div class=""><div class="">syslog_20170306 | CREATE TABLE `syslog_20170306` (</div><div class=""> `id` int(11) unsigned NOT NULL AUTO_INCREMENT,</div><div class=""> `host` varchar(40) NOT NULL,</div><div class=""> `facility` varchar(20) DEFAULT NULL,</div><div class=""> `priority` varchar(10) DEFAULT NULL,</div><div class=""> `level` varchar(10) DEFAULT NULL,</div><div class=""> `program` text,</div><div class=""> `date` date NOT NULL,</div><div class=""> `time` time NOT NULL,</div><div class=""> `message` text NOT NULL,</div><div class=""> PRIMARY KEY (`id`),</div><div class=""> KEY `syslog_20170306_id_idx` (`id`),</div><div class=""> KEY `syslog_20170306_host_idx` (`host`),</div><div class=""> KEY `syslog_20170306_priority_idx` (`priority`)</div><div class="">) ENGINE=MyISAM AUTO_INCREMENT=10485923 DEFAULT CHARSET=latin1</div></div><div class=""><br class=""></div><div class="">That is the output from my old syslog server, the new will be using InnoDB tables, not MyISAM, as listed. If you notice the last parameters, starting with “ENGINE” - that is where the additional parameters can be added. in a compressed table you would append a ROW_FORMAT variable. Here is a little information if you’re curious:</div><div class=""><br class=""></div><div class=""><a href="https://dev.mysql.com/doc/refman/5.7/en/innodb-row-format-dynamic.html" class="">https://dev.mysql.com/doc/refman/5.7/en/innodb-row-format-dynamic.html</a></div><div class=""><a href="https://signalvnoise.com/posts/3571-scaling-your-database-via-innodb-table-compression" class="">https://signalvnoise.com/posts/3571-scaling-your-database-via-innodb-table-compression</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 6, 2017, at 1:46 PM, Fekete, Róbert <<a href="mailto:robert.fekete@balabit.com" class="">robert.fekete@balabit.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class="">Hi, <br class=""><br class=""></div>syslog-ng can automatically create tables if you use macros in the table names. <br class=""></div>As for additional options, newer syslog-ng versions have a dbd-option() that can be used to set database options when syslog-ng connects the database (it might or might not be enough for your needs), see <a href="https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/reference-destination-sql.html" class="">https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/reference-destination-sql.html</a><br class=""><br class=""></div>HTH, <br class=""><br class=""></div>Robert</div></div></blockquote></div></body></html>