From 7f43af08fec0824c30c5bb1ddb9b96427828c987 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 6 Mar 2009 15:12:29 +0100 Subject: doc enhance: enhance ommysql documentation provide standard template for MySQL module and instructions on how to modify schema --- doc/ommysql.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ommysql.html b/doc/ommysql.html index 79d913eb..e81ce532 100644 --- a/doc/ommysql.html +++ b/doc/ommysql.html @@ -26,6 +26,17 @@ you know the server is running on a non-standard listen port.
:ommysql:database-server,database-name,database-userid,database-password
All parameters should be filled in for a successful connect. +

Note rsyslog contains a canned default template to write to the MySQL +database. It works on the MonitorWare schema. This template is: +

+ +

As you can see, the template is an actual SQL statement. Note the ",SQL" option: it tells the +template processor that the template is used for SQL processing, thus quote characters are quoted +to prevent security issues. You can not assign a template without ",SQL" to a MySQL output action. +

If you would like to change fields contents or add or delete your own fields, you +can simply do so by modifying the schema (if required) and creating your own custom +template.

Sample:

The following sample writes all syslog messages to the database "syslog_db" on mysqlsever.example.com. The server is @@ -40,7 +51,7 @@ $ActionOmmysqlServerPort 1234 # use non-standard port

This documentation is part of the rsyslog project.
-Copyright © 2008 by Rainer Gerhards and +Copyright © 2008, 2009 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.

-- cgit