FreeBSD Bugzilla – Attachment 113573 Details for
Bug 155145
[NEW PORT] net-mgmt/p5-Nagios-Plugin-LDAP: perl module to check ldap replication state
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 7.33 KB, created by
Alexander Kriventsov
on 2011-03-01 09:00:23 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
Alexander Kriventsov
Created:
2011-03-01 09:00:23 UTC
Size:
7.33 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># net-mgmt/p5-Nagios-Plugin-LDAP ># net-mgmt/p5-Nagios-Plugin-LDAP/files ># net-mgmt/p5-Nagios-Plugin-LDAP/files/patch-bind-master-server.patch ># net-mgmt/p5-Nagios-Plugin-LDAP/files/patch-correct-csn-compare-multimaster.patch ># net-mgmt/p5-Nagios-Plugin-LDAP/Makefile ># net-mgmt/p5-Nagios-Plugin-LDAP/distinfo ># net-mgmt/p5-Nagios-Plugin-LDAP/pkg-descr ># net-mgmt/p5-Nagios-Plugin-LDAP/pkg-plist ># >echo c - net-mgmt/p5-Nagios-Plugin-LDAP >mkdir -p net-mgmt/p5-Nagios-Plugin-LDAP > /dev/null 2>&1 >echo c - net-mgmt/p5-Nagios-Plugin-LDAP/files >mkdir -p net-mgmt/p5-Nagios-Plugin-LDAP/files > /dev/null 2>&1 >echo x - net-mgmt/p5-Nagios-Plugin-LDAP/files/patch-bind-master-server.patch >sed 's/^X//' >net-mgmt/p5-Nagios-Plugin-LDAP/files/patch-bind-master-server.patch << 'b905e3388d81c5a0f7b7a3928602d15e' >X--- lib/Nagios/Plugin/LDAP.pm 2009-01-14 02:29:40.000000000 +0000 >X+++ lib/Nagios/Plugin/LDAP.pm 2009-01-15 02:17:56.000000000 +0000 >X@@ -257,6 +257,7 @@ >X return 1 unless $warning or $critical; >X >X my $src_ldap = $self->_ldap_connect($master) or return; >X+ $self->_ldap_bind($src_ldap); >X >X my $src_entry = >X $self->_ldap_do_search($src_ldap, '(&(objectClass=*)(contextCSN=*))', 'contextCSN') >X >b905e3388d81c5a0f7b7a3928602d15e >echo x - net-mgmt/p5-Nagios-Plugin-LDAP/files/patch-correct-csn-compare-multimaster.patch >sed 's/^X//' >net-mgmt/p5-Nagios-Plugin-LDAP/files/patch-correct-csn-compare-multimaster.patch << '6b2409badfa6c4ac5151251382333d6d' >X--- lib/Nagios/Plugin/LDAP.pm 2010-12-10 15:57:47.000000000 +0000 >X+++ lib/Nagios/Plugin/LDAP.pm 2010-12-10 15:58:13.000000000 +0000 >X@@ -266,44 +266,67 @@ >X $self->_ldap_do_search($dst_ldap, '(&(objectClass=*)(contextCSN=*))', 'contextCSN') >X or return; >X >X- my $src_csn = $src_entry->get_value('contextCSN'); >X- my $dst_csn = $dst_entry->get_value('contextCSN'); >X+ foreach my $src_current_csn (@{$src_entry->{'asn'}->{'attributes'}->[0]->{'vals'}}) { >X+ my @csn=split('#',$src_current_csn); >X+ my $src_server_id=$csn[2]; >X+ >X+ my $dst_current_csn; >X+ my $dst_server_id; >X+ foreach my $dst_temp_csn (@{$dst_entry->{'asn'}->{'attributes'}->[0]->{'vals'}}) { >X+ my @temp_csn=split('#',$dst_temp_csn); >X+ $dst_server_id=$temp_csn[2]; >X+ if ($dst_server_id eq $src_server_id){ >X+ $dst_current_csn=$dst_temp_csn; >X+ last; >X+ } >X+ } >X+ >X+ print "Host csn id: $src_server_id \n" if $verbose; >X+ print "Master csn id: $dst_server_id \n" if $verbose; >X+ print "Host csn: $src_current_csn \n" if $verbose; >X+ print "Master csn: $dst_current_csn \n" if $verbose; >X+ >X+ my $src_csn = $src_current_csn; >X+ my $dst_csn = $dst_current_csn; >X+ >X+ print "Master CSN = $src_csn\n" if $verbose; >X+ print "Slave CSN = $dst_csn\n" if $verbose; >X+ >X+ my ($YYYY, $MM, $DD, $hh, $mm, $ss); >X+ ($YYYY, $MM, $DD, $hh, $mm, $ss) = $src_csn =~ /^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/; >X+ my $src_dt = DateTime->new( >X+ year => $YYYY, >X+ month => $MM, >X+ day => $DD, >X+ hour => $hh, >X+ minute => $mm, >X+ second => $ss >X+ ); >X+ ($YYYY, $MM, $DD, $hh, $mm, $ss) = $dst_csn =~ /^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/; >X+ my $dst_dt = DateTime->new( >X+ year => $YYYY, >X+ month => $MM, >X+ day => $DD, >X+ hour => $hh, >X+ minute => $mm, >X+ second => $ss >X+ ); >X+ >X+ my $delta = abs($src_dt->epoch - $dst_dt->epoch); >X+ >X+ $self->add_message( >X+ $self->check_threshold(check => $delta, warning => $warning, critical => $critical), >X+ sprintf("csn id %s: %d seconds replication delta", $src_server_id,$delta)); >X+ >X+ $self->add_perfdata( >X+ label => "repl$src_server_id", >X+ value => $delta, >X+ uom => 's', >X+ threshold => $self->threshold >X+ ); >X >X- print "Master CSN = $src_csn\n" if $verbose; >X- print "Slave CSN = $dst_csn\n" if $verbose; >X- >X- my ($YYYY, $MM, $DD, $hh, $mm, $ss); >X- ($YYYY, $MM, $DD, $hh, $mm, $ss) = $src_csn =~ /^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/; >X- my $src_dt = DateTime->new( >X- year => $YYYY, >X- month => $MM, >X- day => $DD, >X- hour => $hh, >X- minute => $mm, >X- second => $ss >X- ); >X- ($YYYY, $MM, $DD, $hh, $mm, $ss) = $dst_csn =~ /^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/; >X- my $dst_dt = DateTime->new( >X- year => $YYYY, >X- month => $MM, >X- day => $DD, >X- hour => $hh, >X- minute => $mm, >X- second => $ss >X- ); >X- >X- my $delta = abs($src_dt->epoch - $dst_dt->epoch); >X- >X- $self->add_message( >X- $self->check_threshold(check => $delta, warning => $warning, critical => $critical), >X- sprintf("%d seconds replication delta", $delta)); >X- >X- $self->add_perfdata( >X- label => 'repl', >X- value => $delta, >X- uom => 's', >X- threshold => $self->threshold >X- ); >X+ print "\n" if $verbose; >X+ } >X >X } >X >6b2409badfa6c4ac5151251382333d6d >echo x - net-mgmt/p5-Nagios-Plugin-LDAP/Makefile >sed 's/^X//' >net-mgmt/p5-Nagios-Plugin-LDAP/Makefile << 'bb02953f0187777996c730d0bab4f4f1' >X# New ports collection makefile for: p5-Nagios-Plugin-LDAP >X# Date created: 01 Mar 2011 >X# Whom: Alexander Kriventsov <avk@vl.ru> >X# >X# $FreeBSD$ >X# >X >XPORTNAME= Nagios-Plugin-LDAP >XPORTVERSION= 0.04 >XCATEGORIES= net-mgmt >XMASTER_SITES= CPAN >XPKGNAMEPREFIX= p5- >X >XMAINTAINER= avk@vl.ru >XCOMMENT= Nagios plugin to observe LDAP >X >XPERL_CONFIGURE= yes >X >XBUILD_DEPENDS= \ >X ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap \ >X ${SITE_PERL}/Nagios/Plugin.pm:${PORTSDIR}/net-mgmt/p5-Nagios-Plugin \ >X ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ >X ${SITE_PERL}/${PERL_ARCH}/DateTime.pm:${PORTSDIR}/devel/p5-DateTime >X >XRUN_DEPENDS= ${BUILD_DEPENDS} >X >XMAN3=Nagios::Plugin::LDAP.3 >X >Xpost-patch: >X @${FIND} ${WRKSRC} -name "*.orig" -delete >X >X.include <bsd.port.mk> >bb02953f0187777996c730d0bab4f4f1 >echo x - net-mgmt/p5-Nagios-Plugin-LDAP/distinfo >sed 's/^X//' >net-mgmt/p5-Nagios-Plugin-LDAP/distinfo << '9ab90b81734c54897e5f8a85e0b26ebd' >XMD5 (Nagios-Plugin-LDAP-0.04.tar.gz) = baf9e28701e7020fcdf752f41309cb7e >XSHA256 (Nagios-Plugin-LDAP-0.04.tar.gz) = 7f720b3ef24b763d9828abf96f780b110e3976de6974b40651f3da434c82f756 >XSIZE (Nagios-Plugin-LDAP-0.04.tar.gz) = 22131 >9ab90b81734c54897e5f8a85e0b26ebd >echo x - net-mgmt/p5-Nagios-Plugin-LDAP/pkg-descr >sed 's/^X//' >net-mgmt/p5-Nagios-Plugin-LDAP/pkg-descr << '0b2ce3647c5d0ad79f9fa3eca7fca10b' >XNagios plugin to observe LDAP >0b2ce3647c5d0ad79f9fa3eca7fca10b >echo x - net-mgmt/p5-Nagios-Plugin-LDAP/pkg-plist >sed 's/^X//' >net-mgmt/p5-Nagios-Plugin-LDAP/pkg-plist << 'ddce63b736a7cd9c63a8feba501d034a' >X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Nagios/Plugin/LDAP/.packlist >Xbin/check_ldap_repl >X%%SITE_PERL%%/Nagios/Plugin/LDAP.pm >X@dirrmtry %%SITE_PERL%%/Nagios/Plugin >X@dirrmtry %%SITE_PERL%%/Nagios >X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Nagios/Plugin/LDAP >X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Nagios/Plugin >X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Nagios >ddce63b736a7cd9c63a8feba501d034a >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 155145
: 113573