Merge branch 'er/ted'
[collectd.git] / src / collectd.conf.pod
index a6b2953..7c9c6cb 100644 (file)
@@ -1375,19 +1375,50 @@ TCP-Port to connect to. Defaults to B<11211>.
 
 =head2 Plugin C<mysql>
 
-The C<mysql plugin> requires B<mysqlclient> to be installed. It connects to the
-database when started and keeps the connection up as long as possible. When the
-connection is interrupted for whatever reason it will try to re-connect. The
-plugin will complaint loudly in case anything goes wrong.
+The C<mysql plugin> requires B<mysqlclient> to be installed. It connects to
+one or more databases when started and keeps the connection up as long as
+possible. When the connection is interrupted for whatever reason it will try
+to re-connect. The plugin will complaint loudly in case anything goes wrong.
+
+This plugin issues the MySQL C<SHOW STATUS> / C<SHOW GLOBAL STATUS> command
+and collects information about MySQL network traffic, executed statements,
+requests, the query cache and threads by evaluating the
+C<Bytes_{received,sent}>, C<Com_*>, C<Handler_*>, C<Qcache_*> and C<Threads_*>
+return values. Please refer to the B<MySQL reference manual>, I<5.1.6. Server
+Status Variables> for an explanation of these values.
+
+Optionally, master and slave statistics may be collected in a MySQL
+replication setup. In that case, information about the synchronization state
+of the nodes are collected by evaluating the C<Position> return value of the
+C<SHOW MASTER STATUS> command and the C<Seconds_Behind_Master>,
+C<Read_Master_Log_Pos> and C<Exec_Master_Log_Pos> return values of the
+C<SHOW SLAVE STATUS> command. See the B<MySQL reference manual>,
+I<12.5.5.21 SHOW MASTER STATUS Syntax> and
+I<12.5.5.31 SHOW SLAVE STATUS Syntax> for details.
 
-This plugin issues the MySQL C<SHOW STATUS> command and collects information
-about MySQL network traffic, executed statements, requests, the query cache
-and threads by evaluating the C<Bytes_{received,sent}>, C<Com_*>,
-C<Handler_*>, C<Qcache_*> and C<Threads_*> return values. Please refer to the
-B<MySQL reference manual>, I<5.1.6. Server Status Variables> for an
-explanation of these values.
+Synopsis:
+
+  <Plugin mysql>
+    <Database foo>
+      Host "hostname"
+      User "username"
+      Password "password"
+      Port "3306"
+      MasterStats true
+    </Database>
+
+    <Database bar>
+      Host "localhost"
+      Socket "/var/run/mysql/mysqld.sock"
+      SlaveStats true
+      SlaveNotifications true
+    </Database>
+  </Plugin>
 
-Use the following options to configure the plugin:
+A B<Database> block defines one connection to a MySQL database. It accepts a
+single argument which specifies the name of the database. None of the other
+options are required. MySQL will use default values as documented in the
+section "mysql_real_connect()" in the B<MySQL reference manual>.
 
 =over 4
 
@@ -1427,6 +1458,17 @@ only has any effect, if B<Host> is set to B<localhost> (the default).
 Otherwise, use the B<Port> option above. See the documentation for the
 C<mysql_real_connect> function for details.
 
+=item B<MasterStats> I<true|false>
+
+=item B<SlaveStats> I<true|false>
+
+Enable the collection of master / slave statistics in a replication setup.
+
+=item B<SlaveNotifications> I<true|false>
+
+If enabled, the plugin sends a notification if the replication slave I/O and /
+or SQL threads are not running.
+
 =back
 
 =head2 Plugin C<netlink>
@@ -1771,6 +1813,11 @@ enables you to do that: By setting B<IgnoreSelected> to I<true> the effect of
 B<Sensor> is inverted: All selected interfaces are ignored and all other
 interfaces are collected.
 
+=item B<Interval> I<Seconds>
+
+Sets the interval in which all sensors should be read. If not specified, the
+global B<Interval> setting is used.
+
 =back
 
 B<EXPERIMENTAL!> The C<onewire> plugin is experimental, because it doesn't yet