[collectd] MySQL plugin reports wrong numbers on mysqld restart

Florian Forster octo at collectd.org
Wed Sep 29 17:56:06 CEST 2010

Hi Bostjan, Mariusz and everybody else ;)

On Wed, Sep 29, 2010 at 02:47:08PM +0200, XANi wrote:
> Dnia 2010-09-29, śro o godzinie 03:09 +0200, Bostjan Skufca pisze:
> > Maybe it's time to make a script for automated dump/change obviously
> > invalid data to NaN/import of rrds.

What's obvious to you is not obvious for a script. So I'm afraid you'll
be stuck with some manual tuning or write a script specifically suited
for your needs.

> > Do you know how  why it was not DERIVE specified at rrd creation?
> Datatype was not DERIVE probably because mysql plugin (as many other)
> is much older than actual DERIVE support in collectd :)

100% right: Support for DERIVE was added relatively late – much later
than the MySQL plugin. The next major version, version 5.0, will likely
convert most of the COUNTER data sources to DERIVE – it's the better
default in most cases.

> > Probably I should consult google and manuals for this, but: is there
> > an easy way to change from COUNTER to DERIVE or do I have to dump
> > and reload the data?
> As for changing counter to derive, simple rrdtool dump to xml file and
> find/replace should be enougth

That's too complicated. You can use "rrdtool tune" (rrdtune(1)) to do
this without much hassle:

  rrdtool tune mysql_commands-select.rrd --data-source-type value:DERIVE

Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20100929/1e10095a/attachment.pgp>

More information about the collectd mailing list