Changeset 1342 for trunk/server/fedora/config/etc
- Timestamp:
- Oct 24, 2009, 12:45:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/fedora/config/etc/nagios/check_ldap_mmr.real
r1272 r1342 22 22 my $result=LDAPSearch($ldap,"objectClass=nsDS5ReplicationAgreement","",$base); 23 23 my @entries = $result->entries; 24 my $errors = 0; 25 my $errorstring = "Replication error(s): "; 24 26 foreach my $entr ( @entries ) { 25 27 my $servername=$entr->get_value($server); … … 32 34 $serverlastend =~ s/(....)(..)(..)(..)(..)(..)./$1-$2-$3\ $4:$5:$6/; 33 35 print "Replication to $servername last operation $serverlaststart "; 34 print "Status: $serverstatus. \n";36 print "Status: $serverstatus. "; 35 37 if ($statuscode) { 36 &nagios_return("ERROR", "Replication error: " . $serverstatus); 38 $errors++; 39 $errorstring = $errorstring . $serverstatus . ", "; 37 40 } 38 41 } 39 &nagios_return("OK", "All replicas are OK"); 42 if ($errors > 0) { 43 &nagios_return("WARNING", $errorstring); 44 } else { 45 &nagios_return("OK", "All replicas are OK"); 46 } 40 47 41 48 sub ConnectLdap {
Note: See TracChangeset
for help on using the changeset viewer.