[Mon-commit] mon mon,1.26,1.27
Brought to you by:
trockij
From: Jim T. <tr...@us...> - 2011-06-20 17:26:28
|
Update of /cvsroot/mon/mon In directory vz-cvs-4.sog:/tmp/cvs-serv11291 Modified Files: mon Log Message: added configerr state Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mon 18 Apr 2011 03:12:06 -0000 1.26 --- mon 20 Jun 2011 17:26:25 -0000 1.27 *************** *** 186,190 **** $STAT_WARMSTART, $STAT_LINKDOWN, $STAT_UNKNOWN, $STAT_TIMEOUT, ! $STAT_UNTESTED, $STAT_DEPEND, $STAT_WARN); my ($FL_MONITOR, $FL_UPALERT, # alert type flags --- 186,191 ---- $STAT_WARMSTART, $STAT_LINKDOWN, $STAT_UNKNOWN, $STAT_TIMEOUT, ! $STAT_UNTESTED, $STAT_DEPEND, $STAT_WARN, ! $STAT_CONFIGERR); my ($FL_MONITOR, $FL_UPALERT, # alert type flags *************** *** 2827,2831 **** if ($sref->{"_op_status"} == $STAT_OK || ! $sref->{"_op_status"} == $STAT_UNTESTED) { sock_write ($fh, "520 service is in a non-failure state\n"); --- 2828,2833 ---- if ($sref->{"_op_status"} == $STAT_OK || ! $sref->{"_op_status"} == $STAT_UNTESTED || ! $sref->{"_op_status"} == $STAT_CONFIGERR) { sock_write ($fh, "520 service is in a non-failure state\n"); *************** *** 3290,3294 **** if ($sref->{"_op_status"} == $STAT_OK || $sref->{"_op_status"} == $STAT_UNKNOWN || ! $sref->{"_op_status"} == $STAT_UNTESTED) { $sref->{"_first_failure"} = $tmnow; --- 3292,3297 ---- if ($sref->{"_op_status"} == $STAT_OK || $sref->{"_op_status"} == $STAT_UNKNOWN || ! $sref->{"_op_status"} == $STAT_UNTESTED || ! $sref->{"_op_status"} == $STAT_CONFIGERR) { $sref->{"_first_failure"} = $tmnow; *************** *** 3501,3504 **** --- 3504,3508 ---- if (!defined $MONITORHASH{$monitor} || ! -f $MONITORHASH{$monitor}) { syslog ('err', "no monitor found while trying to run [$monitor]"); + set_op_status ($group, $service, $STAT_CONFIGERR); return undef; } else { *************** *** 3566,3569 **** --- 3570,3574 ---- syslog ('err', "monitor for $group/$service" . " not called because of no host arguments\n"); + set_op_status ($group, $service, $STAT_CONFIGERR); reset_timer ($group, $service); } *************** *** 3613,3616 **** --- 3618,3622 ---- { syslog ('err', "could not exec '@args': $!"); + set_op_status ($group, $service, $STAT_CONFIGERR); exit (1); } *************** *** 4586,4589 **** --- 4592,4596 ---- if (!$found) { syslog ('err', "$monitor not found in one of (\@scriptdirs[@scriptdirs])"); + set_op_status ($group, $service, $STAT_CONFIGERR); } } *************** *** 4810,4814 **** # ($STAT_FAIL, $STAT_OK, $STAT_COLDSTART, $STAT_WARMSTART, $STAT_LINKDOWN, ! $STAT_UNKNOWN, $STAT_TIMEOUT, $STAT_UNTESTED, $STAT_DEPEND, $STAT_WARN) = (0..9); %FAILURE = ( --- 4817,4822 ---- # ($STAT_FAIL, $STAT_OK, $STAT_COLDSTART, $STAT_WARMSTART, $STAT_LINKDOWN, ! $STAT_UNKNOWN, $STAT_TIMEOUT, $STAT_UNTESTED, $STAT_DEPEND, $STAT_WARN, ! $STAT_CONFIGERR) = (0..10); %FAILURE = ( *************** *** 4831,4834 **** --- 4839,4843 ---- $STAT_UNKNOWN => 1, $STAT_WARN => 1, + $STAT_CONFIGERR => 1, ); *************** *** 4836,4840 **** "warmstart" => $STAT_WARMSTART, "linkdown" => $STAT_LINKDOWN, "unknown" => $STAT_UNKNOWN, "timeout" => $STAT_TIMEOUT, ! "untested" => $STAT_UNTESTED); # --- 4845,4849 ---- "warmstart" => $STAT_WARMSTART, "linkdown" => $STAT_LINKDOWN, "unknown" => $STAT_UNKNOWN, "timeout" => $STAT_TIMEOUT, ! "untested" => $STAT_UNTESTED, "configerr" => $STAT_CONFIGERR); # |