Xymon Mailing List Archive search

Custom test with NCV

7 messages in this thread

list Adam Goryachev · Thu, 10 Jan 2013 22:47:06 +1100 ·
I have written a couple of custom tests, and they are reporting data
back to xymon, which is then using the NCV to import into a RRD file.

However, sometimes the values wrap around, and then my graph gets a
massive negative value showing.

How can I tell hobbit to setup the RRD file such that the minimum valid
value is 0, which would at least discard the single wrong value...

Currently, one value has a minimum of -6M while all other values are
between 0 and max of 119000 but I can't see anything on the graph
because of the single massive negative value?

I did actually think rrd was smart enough to notice wraps like this, but
perhaps I've created the RRD wrong, or specified something incorrectly?

Thanks,
Adam

-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au
list Michael Beatty · Thu, 10 Jan 2013 09:04:36 -0500 ·
This is done in the xymonserver.cfg file.

You need to specify the full string to configure the RRD. By default MIN 
and MAX are unlimited.  To do so you would need to expand the NCV_slab 
command as displayed in the documentation "How to setup custom graphs"

NCV_slab="inodecache:GAUGE:600:0:U,dentrycache:GAUGE:600:0:U"

This is in the format data_set:set_type:heartbeat:min:max

If anyone on the Xymon team reads this, I would like to see this added 
to the documentation.

Michael Beatty
quoted from Adam Goryachev

On 01/10/2013 06:47 AM, Adam Goryachev wrote:
I have written a couple of custom tests, and they are reporting data
back to xymon, which is then using the NCV to import into a RRD file.

However, sometimes the values wrap around, and then my graph gets a
massive negative value showing.

How can I tell hobbit to setup the RRD file such that the minimum valid
value is 0, which would at least discard the single wrong value...

Currently, one value has a minimum of -6M while all other values are
between 0 and max of 119000 but I can't see anything on the graph
because of the single massive negative value?

I did actually think rrd was smart enough to notice wraps like this, but
perhaps I've created the RRD wrong, or specified something incorrectly?

Thanks,
Adam
list Adam Goryachev · Fri, 11 Jan 2013 01:15:39 +1100 ·
quoted from Michael Beatty
On 11/01/13 01:04, Michael Beatty wrote:
This is done in the xymonserver.cfg file.

You need to specify the full string to configure the RRD. By default
MIN and MAX are unlimited.  To do so you would need to expand the
NCV_slab command as displayed in the documentation "How to setup
custom graphs"

NCV_slab="inodecache:GAUGE:600:0:U,dentrycache:GAUGE:600:0:U"

This is in the format data_set:set_type:heartbeat:min:max

If anyone on the Xymon team reads this, I would like to see this added
to the documentation.
I'm assuming I will need to delete my rrd files to make this take
effect. Is there some way to manually adjust the rrd files so that I
don't lose my history (I have 5 months history so far)?

Also, perhaps some method to delete the negative values changing them to
unknowns would be best. I assume that will cause rrd to automatically
determine the value based on the previous and next value, or else just
put a gap on the graph (either of those would be preferable).

Thanks,
Adam
quoted from Michael Beatty
Michael Beatty

On 01/10/2013 06:47 AM, Adam Goryachev wrote:
I have written a couple of custom tests, and they are reporting data
back to xymon, which is then using the NCV to import into a RRD file.

However, sometimes the values wrap around, and then my graph gets a
massive negative value showing.

How can I tell hobbit to setup the RRD file such that the minimum valid
value is 0, which would at least discard the single wrong value...

Currently, one value has a minimum of -6M while all other values are
between 0 and max of 119000 but I can't see anything on the graph
because of the single massive negative value?

I did actually think rrd was smart enough to notice wraps like this, but
perhaps I've created the RRD wrong, or specified something incorrectly?

Thanks,
Adam
-- 
Adam Goryachev
Website Managers

Ph: +XX X XXXX XXXX                            user-eaec2ffb4cbc@xymon.invalid
Fax: +XX X XXXX XXXX                            www.websitemanagers.com.au


-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au
list Chris Morris · Thu, 10 Jan 2013 14:33:51 -0000 ·
 Look at rrdtool tune

The tune option allows you to alter some of the basic configuration
values stored in the header area of a Round Robin Database (RRD).

Such as min:max values of ds-name.


-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf
Of Adam Goryachev
Sent: 10 January 2013 14:16
To: xymon at xymon.com
Subject: Re: [Xymon] Custom test with NCV
quoted from Michael Beatty

On 11/01/13 01:04, Michael Beatty wrote:
This is done in the xymonserver.cfg file.

You need to specify the full string to configure the RRD. By default MIN and MAX are unlimited.  To do so you would need to expand the NCV_slab command as displayed in the documentation "How to setup custom graphs"

NCV_slab="inodecache:GAUGE:600:0:U,dentrycache:GAUGE:600:0:U"

This is in the format data_set:set_type:heartbeat:min:max

If anyone on the Xymon team reads this, I would like to see this added
to the documentation.
I'm assuming I will need to delete my rrd files to make this take
effect. Is there some way to manually adjust the rrd files so that I
don't lose my history (I have 5 months history so far)?

Also, perhaps some method to delete the negative values changing them to
unknowns would be best. I assume that will cause rrd to automatically
determine the value based on the previous and next value, or else just
put a gap on the graph (either of those would be preferable).

Thanks,
Adam
Michael Beatty

On 01/10/2013 06:47 AM, Adam Goryachev wrote:
I have written a couple of custom tests, and they are reporting data back to xymon, which is then using the NCV to import into a RRD file.

However, sometimes the values wrap around, and then my graph gets a massive negative value showing.

How can I tell hobbit to setup the RRD file such that the minimum valid value is 0, which would at least discard the single wrong
value...

Currently, one value has a minimum of -6M while all other values are between 0 and max of 119000 but I can't see anything on the graph because of the single massive negative value?

I did actually think rrd was smart enough to notice wraps like this, but perhaps I've created the RRD wrong, or specified something
incorrectly?

Thanks,
Adam
--
Adam Goryachev
Website Managers
Ph: +XX X XXXX XXXX
user-eaec2ffb4cbc@xymon.invalid
Fax: +XX X XXXX XXXX
www.websitemanagers.com.au


-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au


**************************************************************************** The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited. If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither the RWE Group of Companies nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any). 
*****************************************************************************
list Michael Beatty · Thu, 10 Jan 2013 09:34:13 -0500 ·
No, you do not need to delete your rrd's, you can "tune" them using rrdtool.  Quite simply,

rrdtool tune myfile.rrd --minimum 0

Read the man page for rrdtool, online version is here http://oss.oetiker.ch/rrdtool/doc/rrdtune.en.html

The not-so-quite-simply part is that you have to do it manually to ever rrd file.  If you have a lot of hosts, you will probably want to write a script to do it.  If you aren't familiar with it, xymongrep will come in pretty handy here.  You can use xymongrep to get a list of hostnames that have the "test" tag that you are looking to tune.  Then you can just loop through that list to tune your rrd's.  Some pseduo code:

@my_array = xymongrep my_test   #This gets an array of all hosts in your hosts.cfg file that have a tag my_test, you will need to clean up the results a little

for each $host in @my_array
     rrdtool tune /home/xymon/data/rrd/$host/my_test.rrd tune --minimum 0   #loop through all of the hosts and update the rrd file
next

Now, I'm not sure if this will clean up all of your existing data with negative data points, (I kind of doubt it will).  But it'll prevent new ones from showing up.

Michael Beatty
quoted from Adam Goryachev

On 01/10/2013 09:15 AM, Adam Goryachev wrote:
On 11/01/13 01:04, Michael Beatty wrote:
This is done in the xymonserver.cfg file.

You need to specify the full string to configure the RRD. By default
MIN and MAX are unlimited.  To do so you would need to expand the
NCV_slab command as displayed in the documentation "How to setup
custom graphs"

NCV_slab="inodecache:GAUGE:600:0:U,dentrycache:GAUGE:600:0:U"

This is in the format data_set:set_type:heartbeat:min:max

If anyone on the Xymon team reads this, I would like to see this added
to the documentation.
I'm assuming I will need to delete my rrd files to make this take
effect. Is there some way to manually adjust the rrd files so that I
don't lose my history (I have 5 months history so far)?

Also, perhaps some method to delete the negative values changing them to
unknowns would be best. I assume that will cause rrd to automatically
determine the value based on the previous and next value, or else just
put a gap on the graph (either of those would be preferable).

Thanks,
Adam
Michael Beatty

On 01/10/2013 06:47 AM, Adam Goryachev wrote:
I have written a couple of custom tests, and they are reporting data
back to xymon, which is then using the NCV to import into a RRD file.

However, sometimes the values wrap around, and then my graph gets a
massive negative value showing.

How can I tell hobbit to setup the RRD file such that the minimum valid
value is 0, which would at least discard the single wrong value...

Currently, one value has a minimum of -6M while all other values are
between 0 and max of 119000 but I can't see anything on the graph
because of the single massive negative value?

I did actually think rrd was smart enough to notice wraps like this, but
perhaps I've created the RRD wrong, or specified something incorrectly?

Thanks,
Adam
list Thomas Kähn · Tue, 15 Jan 2013 14:18:46 +0100 ·
Hi,

On Thu, Jan 10, 2013 at 09:34:13AM -0500, Michael Beatty wrote:
rrdtool tune myfile.rrd --minimum 0
quoted from Michael Beatty
Now, I'm not sure if this will clean up all of your existing data
with negative data points, (I kind of doubt it will).  But it'll
prevent new ones from showing up.
after tuning one can dump and restore the rrd file to remove invalid
data.

Best regards
Thomas Kähn
list Adam Goryachev · Wed, 16 Jan 2013 01:48:18 +1100 ·
quoted from Thomas Kähn
On 16/01/13 00:18, Thomas Kähn wrote:
Hi,

On Thu, Jan 10, 2013 at 09:34:13AM -0500, Michael Beatty wrote:
rrdtool tune myfile.rrd --minimum 0
Now, I'm not sure if this will clean up all of your existing data
with negative data points, (I kind of doubt it will).  But it'll
prevent new ones from showing up.
after tuning one can dump and restore the rrd file to remove invalid
data.
I can confirm that the following worked (as opposed to the syntax above):
for i in ds1 ds2 ds3 etc..
do
    rrdtool tune myfile.rrd --minimum ${i}:0
done
rrdtool dump myfile.rrd myfile.xml
rrdtool restore myfile.xml myfile.rrd -r

Thanks for your suggestions.

Regards,
Adam

-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au