[Xymon] Custom test with NCV

Michael Beatty Michael.Beatty at sherwin.com
Thu Jan 10 15:34:13 CET 2013


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

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
>>>
>>
>> _______________________________________________
>> Xymon mailing list
>> Xymon at xymon.com
>> http://lists.xymon.com/mailman/listinfo/xymon
>





More information about the Xymon mailing list