<div dir="ltr">Thank you for helpful explanation, after I removed FNPATTERN and replaced @RRDFN@ with mysql.rrd - the graph appeared for the second machine too.<br><br>And no, I neither have other mysql*.rrd file in the /var/lib/hobbit/rrd/HOSTNAME/ directory, nor any of the existing ones had keys starting with "mysql" string.<br>

<br clear="all">--<br>Arie<br><br>
<br><br><div class="gmail_quote">On Mon, Nov 29, 2010 at 23:54, Henrik Størner <span dir="ltr"><<a href="mailto:henrik@hswn.dk">henrik@hswn.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On Sun, 28 Nov 2010 16:30:39 +0200, Arie Skliarouk wrote:<br>
<br>
> On Thu, Nov 25, 2010 at 17:59, Henrik Størner <<a href="mailto:henrik@hswn.dk">henrik@hswn.dk</a>> wrote:<br>
><br>
>> On Wed, 24 Nov 2010 16:12:07 +0200, Arie Skliarouk wrote:<br>
>><br>
>> > I created a custom mysql parameters check that shows graphs on one<br>
>> > server, but not on the other. hobbitgraph.sh (hobbitgraph.cgi?) kept<br>
>> > sending following error instead of the actual image:<br>
>> > <html><head><title>Invalid request</title></head> <body>Attempting to<br>
>> > reuse 'mysqlht'</body></html><br>
>><br>
>> This is an error from the rrdtool library. So I would suspect something<br>
>> dodgy with the graph-definition in hobbit-graphs.cfg, or the RRD file<br>
>> data is not as you would expect.<br>
>><br>
>> Could you show us the graph definition you use ?<br>
><br>
><br>
> See attached.<br>
<br>
</div>OK, the interesting part of your graph definition looks like this:<br>
<br>
[mysql]<br>
    FNPATTERN mysql.rrd<br>
    TITLE MySQL<br>
    YAXIS Number<br>
    DEF:mysqlht=@RRDFN@:mysqlht:AVERAGE<br>
    DEF:mysqlhs=@RRDFN@:mysqlhs:AVERAGE<br>
    DEF:mysqlhq=@RRDFN@:mysqlhq:AVERAGE<br>
    LINE2:mysqlht#00CCCC:MySQL threads<br>
    LINE2:mysqlhs#ff0000:Slow queries<br>
    LINE2:mysqlhq#ff00ff:Queries per sec<br>
<br>
The problem occurs because you're using an FNPATTERN definition, but you<br>
only expect one file to match. I'll bet that the problem host has another<br>
RRD file present which matches "mysql.rrd" - there is no anchor in the<br>
pattern, so a file "blablamysql.rrd" will also match this pattern. Or<br>
even "mysql.rrd.old".<br>
<br>
When you have multiple files that match FNPATTERN, the rest of the<br>
definition is repeated for each file when Xymon tells RRDtool how to<br>
generate the graph. So you'll end up with two DEF lines that define a<br>
"mysqlht" variable - one for each file that matches FNPATTERN. That<br>
is not allowed, and causes RRDtool to complain with the error you see.<br>
<br>
If you only want to use one specific RRD file, don't use FNPATTERN.<br>
Instead, put the filename where you have "@RRDFN@" now:<br>
<br>
[mysql]<br>
    TITLE MySQL<br>
    YAXIS Number<br>
    DEF:mysqlht=mysql.rrd:mysqlht:AVERAGE<br>
    DEF:mysqlhs=mysql.rrd:mysqlhs:AVERAGE<br>
    DEF:mysqlhq=mysql.rrd:mysqlhq:AVERAGE<br>
    LINE2:mysqlht#00CCCC:MySQL threads<br>
    LINE2:mysqlhs#ff0000:Slow queries<br>
    LINE2:mysqlhq#ff00ff:Queries per sec<br>
<br>
Just for the record, if you DO want to match multiple files, then you<br>
must include the index-number in the DEF and GPRINT definition. E.g.<br>
<br>
[mysql]<br>
    FNPATTERN mysql.rrd<br>
    TITLE MySQL<br>
    YAXIS Number<br>
    DEF:mysqlht@RRDIDX@=@RRDFN@:mysqlht:AVERAGE<br>
    DEF:mysqlhs@RRDIDX@=@RRDFN@:mysqlhs:AVERAGE<br>
    DEF:mysqlhq@RRDIDX@=@RRDFN@:mysqlhq:AVERAGE<br>
    LINE2:mysqlht@RRDIDX@#@COLOR@:@RRDPARAM@ MySQL threads<br>
<br>
See e.g. the [la] and [disk] definitions in the standard graphs.cfg /<br>
hobbitgraph.cfg file.<br>
<div><div></div><div class="h5"><br>
<br>
Regards,<br>
Henrik<br>
<br>
To unsubscribe from the xymon list, send an e-mail to<br>
<a href="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>