Page 1 of 1

Gauge Dashlet and perfdata thresholds

Posted: Mon Jul 28, 2014 10:53 am
by jwelch
I'm seeing some strangeness with the Gauge Dashlets in cases where the perfdata has lower boundaries.
For example, a UPS check includes battery_capacity, load, battemp, and remaining_minutes perfdata.
The battery_capacity and remaining_minutes use lower boundaries and the gauge value and displayed
thresholds seem to be fubar. Perhaps I misread the plugins perfdata guidelines, but everything else seems
to be working as it should (alerts, notifications, etc...)

Note: I added battery_capacity after the fact, which confused rrd to no end so I had to delete the .rrd file for the check
to get the regular graphs to display correctly, but I don't know much about the gauges and I didn't notice if they were
all working correctly before the addition.

<blah><blah><blah>|'battery_capacity'=100%;65:;35:;0; 'load'=29%;70;80;; 'battemp'=34C;36;40;; 'remaining_minutes'=59min;;5:;0;
gauges.png

Re: Gauge Dashlet and perfdata thresholds

Posted: Mon Jul 28, 2014 1:20 pm
by sreinhardt
I believe, but will have to check to be sure, that the gauges use the plugins warning and critical limits for what 100% is, if that is not available I would expect it to use the highest value found that is available. Are these checks that should return a higher than threshold value to be an OK state? Much like when checking free disk space, where you might warn if less than 15% is free but 30% is just fine?

Re: Gauge Dashlet and perfdata thresholds

Posted: Mon Jul 28, 2014 2:34 pm
by jwelch
Yes, in the case of battery_capacity, it should range from 0-100% (not absolutely sure it *can't'* go over 100%) and we want warnings at 35-65% and critical at 0-35%. I didn't put the max scale in the check since the normal graphs seem to autorange. I do notice that the warning/critical thresholds are not marked on the regular graphs in the case of lower boundaries either. Neither case is particularly critical to us, I just wanted to point it out in case it was an easy fix.

Re: Gauge Dashlet and perfdata thresholds

Posted: Mon Jul 28, 2014 2:45 pm
by jwelch
Changing the perfdata from:
'battery_capacity'=100%;65:;35:;0;
to:
'battery_capacity'=100%;65:;35:;0;100

*does* cause the gauge to show the correct scale (0-100), but the thresholds are still inverted. It thinks anything above 35% is critical.
(not properly parsing the ':' in the threshold definition...assuming I'm using it correctly)

In the case of minutes_remaining, there is no fixed upper limit, it varies with the UPS load (typically from 40-120min), so forcing a range isn't a good option.

Re: Gauge Dashlet and perfdata thresholds

Posted: Mon Jul 28, 2014 2:52 pm
by sreinhardt
OK I thought that would be the case, refering to the inversion of warn\crit thresholds within it. I will open a bug report and we will see what can be done.

Re: Gauge Dashlet and perfdata thresholds

Posted: Mon Jul 28, 2014 4:54 pm
by jwelch
Thanks!

Re: Gauge Dashlet and perfdata thresholds

Posted: Wed Aug 06, 2014 5:00 pm
by tmcdonald
Devs are still working on this, updates to come.

Re: Gauge Dashlet and perfdata thresholds

Posted: Tue Oct 28, 2014 3:22 pm
by jomann
I have added the ability to specify ranges in the gauges dashlet which should fix the issue you are having. I've attached version 1.1.0 of the dashlet which will be in the next version of Nagios XI. It hasn't been fully tested yet but if there are issues please don't hesitate to let me know!

Re: Gauge Dashlet and perfdata thresholds

Posted: Thu Oct 30, 2014 9:06 am
by jwelch
I installed the new gauges.zip and for the UPS perfdata I have, it works very well.
Thanks for the chance to test this fix!
<Jim>

Re: Gauge Dashlet and perfdata thresholds

Posted: Thu Oct 30, 2014 9:42 am
by cmerchant
Glad that fix worked for you. That fix will be incorporated into the next release. We'll go ahead and close the thread. Thanks.