- Timestamp:
- Sep 23, 2010, 5:33:29 PM (14 years ago)
- Location:
- trunk/server/fedora/config/etc/nagios
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/fedora/config/etc/nagios/check_ldap_mmr
r1272 r1670 1 1 #!/bin/sh 2 2 3 exec /usr/bin/sudo -u signup /etc/nagios/check_ldap_mmr.real3 exec /usr/bin/sudo -u signup USE_NEWLINES=$USE_NEWLINES /etc/nagios/check_ldap_mmr.real -
trunk/server/fedora/config/etc/nagios/check_ldap_mmr.real
r1579 r1670 6 6 use Net::LDAP; 7 7 use strict; 8 9 my $nl = $ENV{'USE_NEWLINES'} ? "\n" : ""; 10 my $tab = $ENV{'USE_NEWLINES'} ? " " : ""; 8 11 9 12 # Nagios codes … … 25 28 my $replicaErrors = 0; 26 29 my $conflictErrors = 0; 27 my $errorstring = "Replication error(s): ";30 my $errorstring = "Replication error(s): $nl"; 28 31 foreach my $entr ( @entries ) { 29 32 my $servername=$entr->get_value($server); … … 35 38 $serverlaststart =~ s/(....)(..)(..)(..)(..)(..)./$1-$2-$3\ $4:$5:$6/; 36 39 $serverlastend =~ s/(....)(..)(..)(..)(..)(..)./$1-$2-$3\ $4:$5:$6/; 37 print "Replication to $servername last operation $serverlaststart ";38 print "Status: $serverstatus.";40 print "Replication to $servername last operation $serverlaststart $nl"; 41 print $tab . "Status: $serverstatus. $nl"; 39 42 if ($statuscode) { 40 43 $replicaErrors++; … … 42 45 } 43 46 } 47 print "$nl"; 44 48 45 49 $result=LDAPSearch($ldap,"nsds5ReplConflict=*",["nsds5ReplConflict"],$replicatedBase); … … 48 52 my $conflictingDN=$entr->dn(); 49 53 my $conflictDesc=$entr->get_value("nsds5ReplConflict"); 50 print "Conflict found for DN $conflictingDN ";51 print "Reason: $conflictDesc.";54 print "Conflict found for DN $conflictingDN $nl"; 55 print $tab . "Reason: $conflictDesc. $nl"; 52 56 $conflictErrors++; 53 57 $errorstring = $errorstring . $conflictDesc . ", "; 54 58 } 59 print "$nl"; 55 60 56 61 if ($conflictErrors > 0) {
Note: See TracChangeset
for help on using the changeset viewer.