[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Negative spikes in rrd graphs
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Negative spikes in rrd graphs
- From: Buchan Milne <bgmilne (at) staff.telkomsa.net>
- Date: Tue, 10 Mar 2009 12:50:56 +0200
- Cc: Iain M Conochie <iain (at) shihad.org>
- References: <49B63888.2060208 (at) shihad.org>
- User-agent: KMail/1.10.3 (Linux/2.6.27.10-desktop-1mnb; KDE/4.1.3; x86_64; ; )
On Tuesday 10 March 2009 11:53:12 Iain M Conochie wrote:
> Good morning Xymonners!
>
> I have an issue I was hoping someone could help me with. I have
> created an NCV definition for a mysql script to graphs slow queries and
> also queries per second. The definition is here:
>
> [mysql]
> TITLE MySQL Queries
> YAXIS Amount
> DEF:questions=mysql.rrd:questions:AVERAGE
> DEF:slow=mysql.rrd:slowqueries:AVERAGE
> LINE2:questions#0000FF:Queries
> GPRINT:questions:LAST: \: %5.1lf (cur)
> GPRINT:questions:MAX: \: %5.1lf (max)
> GPRINT:questions:MIN: \: %5.1lf (min)
> GPRINT:questions:AVERAGE: \: %5.1lf (avg)\n
> LINE2:slow#00FF00:Slow Queries
> GPRINT:slow:LAST: \: %5.1lf (cur)
> GPRINT:slow:MAX: \: %5.1lf (max)
> GPRINT:slow:MIN: \: %5.1lf (min)
> GPRINT:slow:AVERAGE: \: %5.1lf (avg)\n
>
>
> This is all well and good. Here is a shortened output of the script:
>
> threads: 4
> questions: 681188
> slow queries: 2
>
> Now Questions is ALWAYS increasing; so i felt that the average statement
> would be the correct one. However, if i restart the mysql service or even
> the box and Questions drops to 0 then bad things happen to the graphs. The
> spike downwards to large negative numbers. Now rrd is doing what it should
> be doing i.e. giving me an average of the range of numbers. Is there
> another definition I can use to not have this effect?
This is determined by the actual DS definition the RRD tool library uses,
which for the NCV collector is set by the NCV_<testname> environment variable,
which is typically set in hobbitserver.cfg. Show us what you have for
NCV_mysql in hobbitserver.cfg, and please read the sections on DERIVE and
COUNTER in the rrdcreate man page.
Regards,
Buchan