~vcs-imports/mysql-mmm/2.0

« back to all changes in this revision

Viewing changes to lib/Monitor/Checker.pm

  • Committer: mail at pascalhofmann
  • Date: 2009-02-06 17:46:25 UTC
  • Revision ID: vcs-imports@canonical.com-20090206174625-6xdbldxussq9mx0f
ph:
- illustrations for documentation 
- Documentation update (requirements, logging configuration, ...)
- Log message if check enters unknown state
- change version to 2.0.0 instead of 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                                $failures->{$host_name}->{state}        = 1;
69
69
                                next;
70
70
                        }
 
71
 
 
72
                        # If unknown
 
73
                        if ($res =~ /^UNKNOWN/) {
 
74
                                next if ($failures->{$host_name}->{state} == -3);
 
75
                                $failures->{$host_name}->{time} = time();
 
76
                                $failures->{$host_name}->{state}= -3;
 
77
                                WARN "Check '$check_name' on '$host_name' is in unknown state! Message: $res";
 
78
                                next;
 
79
                        }
71
80
                        
72
81
                        # If failed
73
82
                        if ($res =~ /^ERROR/) {
81
90
                                
82
91
                                next if ($failure_age < $options->{trap_period});
83
92
 
84
 
                                ERROR "Check '$check_name' on '$host_name' has failed for $failure_age seconds!";
 
93
                                ERROR "Check '$check_name' on '$host_name' has failed for $failure_age seconds! Message: $res";
85
94
                                $queue->enqueue(new MMM::Monitor::CheckResult::($host_name, $check_name, 0));
86
95
                                $failures->{$host_name}->{state}        = 0;
87
96
                                next;