[collectd] Mysql plugin works very strange
Sebastian Harl
sh at tokkee.org
Thu Mar 21 21:54:54 CET 2013
Hi,
On Thu, Mar 21, 2013 at 02:48:35PM +0000, Benjamin Wang (gendwang) wrote:
> When I setup collectd and mysql, there are 5 rrd files generated for mysql_commands as following:
> mysql_commands-admin_commands.rrd
> mysql_commands-select.rrd
> mysql_commands-show_databases.rrd
> mysql_commands-show_master_status.rrd
> mysql_commands-show_status.rrd
>
> Then I reboot the machine, two strange things happen:
>
> 1. mysql_commands-show_master_status.rrd will not be updated
>
> 2. There are 3 more rrd files generated(mysql_commands-change_db.rrd, mysql_commands-show_fields.rrd, mysql_commands-show_tables.rrd)
I haven't looked into MySQL in detail recently but this could be
expected. The plugin will slurp in all Com_stmt_* rows returned from
"SHOW GLOBAL STATUS" and submit all values that are not zero. According
to that, if there are any commands that have not been issued then the
respective data-sets will not be stored by collectd (meaning: the files
won't be created or updated).
According to the mysql plugin code, these values are counter values,
that is, I suppose they are reset whenever MySQL restarts. Thus, a value
of zero actually means the respective command has not been used at all
and, thus, I think it's fine to ignore them.
HTH,
Sebastian
--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20130321/5a2f41c2/attachment.pgp>
More information about the collectd
mailing list