Per the documentation, one can specify 'n' instead of a
minimum or maximum threshold value in order to skip
checking it. It works fine for minimum, but when
specifying 'n' for the maximum it causes the maximum
alarm to always trigger. In my case, a line such as:
monitor-thresholds = "ifHCInOctets : value : 12500 :
n : SNMP"
will reproduce the problem such as:
[08-Jul-2004 13:13:59 ] Value is 8814135.83904847; min
is 12500; max is n
[08-Jul-2004 13:13:59 ] /tree/device/interface1_1 -
ifHCInOctets : value : 12500 : n : SNMP failed.
[08-Jul-2004 13:13:59 ] Triggering alarm for
ifHCInOctets : value : 12500 : n : SNMP.
After troubleshooting, I determined that the "n" is
being picked up with its trailing space as "n " (which
of course does not equate to 'n' in the comparison in
lib/Monitor.pm line 81). I have verified this in both
1.0.3 and 1.0.5. I believe the problem to be in
lib/Common/HandleTarget.pm on lines 172 and 182:
if ( $args =~
/^(.*)\s*:\s*(FUNC|EXEC|FILE|MAIL|META)\s*:\s*(.*)$/ ) {
and
} elsif ( $args =~
/^(.*)\s*:\s*(SNMP|META)\s*$/ ) {
The (.*) is picking up the trailing space before the :
(despite the \s*). It should be changed to (.*\w) in
both cases. This fixed the issue for me.