[Nagiosplug-devel] RE: nagiosplug- check_snmp

Subhendu Ghosh sghosh at sghosh.org
Thu Nov 14 20:50:14 CET 2002


On 14 Nov 2002, Karl DeBisschop wrote:

> On Thu, 2002-11-14 at 16:13, Subhendu Ghosh wrote:
> > Yes - warning state when it shouldn't be. - dropping the " }else{ "
> > clause back in seems to fix it.
> > 
> > check_snmp - should be supporting both 4.x and 5.x  - most of my testing 
> > is 4.x 
> > 
> > I'll pop the "else" clause back in tonight
> 
> I'm about to drop in a patch that includes this, plud better handling of
> units for multiple checks.
> 
> Just give my patch a once over,
> 
> I'm changing line 310 to:
> 
> 		} else if (eval_method[i] & WARN_PRESENT) {
> 
> But you refered to line 326, so I'm not 100% sure we're talking about
> the exact same solution, though the problem seems the same.
> 
> 

line 310 - (above) I don't see anything different from the current CVS.
Essentially I have a question about whether the whole if/else if statement 
covering lines 308-312 make any sense since the CRIT_PRESENT/WARN_PRESENT 
flags are not (and will not be set until after the output has been 
evaluated.  The eval does start till line 314.

Also the flags should get set in the check_num() routine when iresult is 
modified - but currently don't - so the flags are superflous at the 
moment.

My ref to line 326 was in v1.8 - current CVS line 358-360 - should be 
concatanated with an "else" clause instead of being separate if 
statements.


-- 
-sg






More information about the Devel mailing list