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