From 5e6091b955e8e4c68bcf76ac38ada2ede62af2a5 Mon Sep 17 00:00:00 2001 From: Ben Webber Date: Mon, 22 Oct 2012 01:11:51 -0400 Subject: Added database configuration to README. --- README.md | 61 ++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 19 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index c109159..e5891a5 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,23 @@ Manage rsyslog client and server via Puppet } ``` +#### Logging to a MySQL or PostgreSQL database + +Events can also be logged to a MySQL or PostgreSQL database. The database needs to be deployed separately, either locally or remotely. Schema are available from the `rsyslog` source: + + * [MySQL schema](http://git.adiscon.com/?p=rsyslog.git;a=blob_plain;f=plugins/ommysql/createDB.sql) + * [PostgreSQL schema](http://git.adiscon.com/?p=rsyslog.git;a=blob_plain;f=plugins/ompgsql/createDB.sql) + +Declare the following to configure the connection: +```` + class { 'rsyslog::database': + backend => 'mysql', + server => 'localhost', + database => 'Syslog', + username => 'rsyslog', + password => 'secret', + } +```` ### Server #### Using default values @@ -51,29 +68,35 @@ Manage rsyslog client and server via Puppet Both can be installed at the same time. - ## PARAMETERS The following lists all the class parameters this module accepts. - RSYSLOG::SERVER CLASS PARAMETERS VALUES DESCRIPTION - -------------------------------------------------------------- - enable_tcp true,false Enable TCP listener. Defaults to true. - enable_udp true,false Enable UDP listener. Defaults to true. - enable_onefile true,false Only one logfile per remote host. Defaults to false. - server_dir STRING Folder where logs will be stored on the server. Defaults to '/srv/log/' - custom_config STRING Specify your own template to use for server config. Defaults to undef. Example usage: custom_config => 'rsyslog/my_config.erb' - high_precision_timestamps true,false Whether or not to use high precision timestamps. - - RSYSLOG::CLIENT CLASS PARAMETERS VALUES DESCRIPTION - -------------------------------------------------------------- - log_remote true,false Log Remotely. Defaults to true. - remote_type 'tcp','udp' Which protocol to use when logging remotely. Defaults to 'tcp'. - log_local true,false Log locally. Defualts to false. - log_auth_local true,false Just log auth facility locally. Defaults to false. - custom_config STRING Specify your own template to use for client config. Defaults to undef. Example usage: custom_config => 'rsyslog/my_config.erb - server STRING Rsyslog server to log to. Will be used in the client configuration file. - + RSYSLOG::SERVER CLASS PARAMETERS VALUES DESCRIPTION + ------------------------------------------------------------------- + enable_tcp true,false Enable TCP listener. Defaults to true. + enable_udp true,false Enable UDP listener. Defaults to true. + enable_onefile true,false Only one logfile per remote host. Defaults to false. + server_dir STRING Folder where logs will be stored on the server. Defaults to '/srv/log/' + custom_config STRING Specify your own template to use for server config. Defaults to undef. Example usage: custom_config => 'rsyslog/my_config.erb' + high_precision_timestamps true,false Whether or not to use high precision timestamps. + + RSYSLOG::CLIENT CLASS PARAMETERS VALUES DESCRIPTION + ------------------------------------------------------------------- + log_remote true,false Log Remotely. Defaults to true. + remote_type 'tcp','udp' Which protocol to use when logging remotely. Defaults to 'tcp'. + log_local true,false Log locally. Defualts to false. + log_auth_local true,false Just log auth facility locally. Defaults to false. + custom_config STRING Specify your own template to use for client config. Defaults to undef. Example usage: custom_config => 'rsyslog/my_config.erb + server STRING Rsyslog server to log to. Will be used in the client configuration file. + + RSYSLOG::DATABASE CLASS PARAMETERS VALUES DESCRIPTION + ------------------------------------------------------------------- + backend 'mysql','pgsql' Database backend (MySQL or PostgreSQL). + server STRING Database server. + database STRING Database name. + username STRING Database username. + password STRING Database password. ### Other notes -- cgit v1.2.3