Beispiel #1
0
      public State nextStat(ServiceState state) {
        if (state.getState().equals(NAGIOSSTAT.OK)) {
          return OKAY_HARD;
        }

        state.softCount = 1;

        return State.PROBLEM_SOFT;
      }
Beispiel #2
0
 public State nextStat(ServiceState state) {
   if (state.getState().equals(NAGIOSSTAT.OK)) {
     state.softCount = 0;
     return OKAY_HARD;
   } else if ((state.getState().equals(NAGIOSSTAT.CRITICAL)
           || state.getState().equals(NAGIOSSTAT.WARNING)
           || state.getState().equals(NAGIOSSTAT.UNKNOWN))
       && state.softCount >= state.maxSoft) {
     state.softCount = 0;
     return State.PROBLEM_HARD;
   }
   state.softCount++;
   return State.PROBLEM_SOFT;
 }
Beispiel #3
0
 public State nextStat(ServiceState state) {
   if (state.getState().equals(NAGIOSSTAT.OK)) {
     return OKAY_HARD;
   }
   return State.PROBLEM_HARD;
 }