diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2014-04-15 09:57:46 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2014-04-15 09:57:46 +0000 |
commit | b2035580d8c99607399a046d688a111e4f6e189b (patch) | |
tree | 1042fbc023b6b35cfc0706e3fb3c08d43135d54d /net-mgmt/nagios-plugins | |
parent | 8e2a5bdc232258b38429f043591635ae64dd65d9 (diff) | |
download | ports-b2035580d8c99607399a046d688a111e4f6e189b.tar.gz ports-b2035580d8c99607399a046d688a111e4f6e189b.zip |
Notes
Diffstat (limited to 'net-mgmt/nagios-plugins')
-rw-r--r-- | net-mgmt/nagios-plugins/Makefile | 52 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff | 13 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/pkg-help | 16 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/pkg-plist | 4 |
4 files changed, 65 insertions, 20 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile index f2bb66c156fb..e06932e87bd1 100644 --- a/net-mgmt/nagios-plugins/Makefile +++ b/net-mgmt/nagios-plugins/Makefile @@ -3,6 +3,7 @@ PORTNAME= nagios-plugins PORTVERSION= 2.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= https://www.nagios-plugins.org/download/ @@ -18,7 +19,9 @@ ACLOCAL_ARGS= -I m4 -I gl/m4 AUTOMAKE_ARGS= --add-missing OPTIONS_DEFINE= QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 JAIL NLS DBI EXTRAOPTS -OPTIONS_DEFAULT=IPV6 EXTRAOPTS +OPTIONS_SINGLE= DNS +OPTIONS_SINGLE_DNS= DNS_BASE DNS_BINDTOOLS DNS_BIND98 DNS_BIND99 DNS_BIND910 +OPTIONS_DEFAULT=IPV6 EXTRAOPTS DNS_BASE OPTIONS_SUB= yes QSTAT_DESC= Game server query support (check_game) @@ -32,6 +35,14 @@ JAIL_DESC= Compilation within jail(8) (see help) DBI_DESC= Check database using DBI EXTRAOPTS_DESC= Parsing of plugins ini config files for extra options +DNS_DESC= Configuration of check_dig and check_dns (see help) + +DNS_BASE_DESC= >= 10 means drill for check_dig and no check_dns +DNS_BINDTOOLS_DESC= Use dig and nslookup from dns/bind-tools +DNS_BIND98_DESC= Use dig and nslookup from dns/bind98 +DNS_BIND99_DESC= Use dig and nslookup from dns/bind99 +DNS_BIND910_DESC= Use dig and nslookup from dns/bind910 + EXTRAOPTS_CONFIGURE_ENABLE= extra-opts GNU_CONFIGURE= yes @@ -47,13 +58,11 @@ NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin NAGIOSPOLLIP?= 127.0.0.1 NAGIOSPOLLIP6?= ::1 -PLUGINS_DIR= ${PREFIX}/libexec/nagios - CONFIGURE_ARGS+=--with-nagios-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} \ --with-cgiurl=${NAGIOSCGIURL} \ --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \ - --libexecdir=${PLUGINS_DIR} \ + --libexecdir=${PREFIX}/libexec/nagios \ --datadir=${PREFIX}/share \ --sysconfdir=${PREFIX}/etc/nagios \ --localstatedir=${NAGIOSDIR} \ @@ -100,15 +109,31 @@ NLS_CONFIGURE_ENABLE= nls DBI_LIB_DEPENDS= libdbi.so:${PORTSDIR}/databases/libdbi DBI_CONFIGURE_WITH= dbi +DNS_BINDTOOLS_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind-tools +DNS_BINDTOOLS_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup +DNS_BIND98_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind98 +DNS_BIND98_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup +DNS_BIND99_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind99 +DNS_BIND99_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup +DNS_BIND910_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind910 +DNS_BIND910_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup + .include <bsd.port.options.mk> -.if ${OSVERSION} > 1000055 -BUILD_DEPENDS+= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind-tools -CONFIGURE_ARGS+= --with-dig-command=${PLUGINS_DIR}/nagios-dig \ - --with-nslookup-command=${PLUGINS_DIR}/nagios-nslookup -PLIST_SUB+= BIND="" +.if ${OSVERSION} > 1000055 && ${PORT_OPTIONS:MDNS_BASE} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dig-to-drill.diff +CONFIGURE_ARGS+=--with-dig-command=/usr/bin/drill +PLIST_SUB+= CHECK_DNS="@comment " .else -PLIST_SUB+= BIND="@comment " +. if ${PORT_OPTIONS:MDNS_BASE} +CONFIGURE_ARGS+= --with-dig-command=/usr/bin/dig \ + --with-nslookup-command=/usr/bin/nslookup +. endif +PLIST_SUB+= CHECK_DNS="" .endif .if !exists(/usr/bin/ssh) @@ -130,11 +155,4 @@ post-patch: @${REINPLACE_CMD} -e 's# ::1 # ${NAGIOSPOLLIP6} #g' ${WRKSRC}/configure.ac .endif -.if ${OSVERSION} > 1000055 -post-install: -.for f in dig nslookup - ${INSTALL_PROGRAM} ${LOCALBASE}/bin/${f} ${STAGEDIR}${PLUGINS_DIR}/nagios-${f} -.endfor -.endif - .include <bsd.port.mk> diff --git a/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff b/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff new file mode 100644 index 000000000000..a855c6217f1a --- /dev/null +++ b/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff @@ -0,0 +1,13 @@ +--- ./plugins/check_dig.c.orig 2014-03-04 20:21:36.000000000 +0100 ++++ ./plugins/check_dig.c 2014-04-15 11:42:41.000000000 +0200 +@@ -94,8 +94,8 @@ + timeout_interval_dig = ceil((double) timeout_interval / (double) number_tries); + + /* get the command to run */ +- xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d", +- PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport, number_tries, timeout_interval_dig); ++ xasprintf (&command_line, "%s %s @%s -z -p %d %s %s %s", ++ PATH_TO_DIG, dig_args, dns_server, server_port, query_address, record_type, query_transport); + + alarm (timeout_interval); + gettimeofday (&tv, NULL); diff --git a/net-mgmt/nagios-plugins/pkg-help b/net-mgmt/nagios-plugins/pkg-help index e39bffe55475..9cf9d3a6ea91 100644 --- a/net-mgmt/nagios-plugins/pkg-help +++ b/net-mgmt/nagios-plugins/pkg-help @@ -5,3 +5,19 @@ doesn't have 127.0.0.1 and ::1, and you want check_ping to be built, you have to set NAGIOSPOLLIP and NAGIOSPOLLIP6 to an IPV4 and an IPV6 address that can be pinged from the jail. + + ** DNS ** +Starting from FreeBSD 10.0, BIND has been replaced in base +by unbound. This means that there are no dig and nslookup +utilities for check_dig and check_dns to use. If you choose +DNS_BASE, check_dig will be built using drill instead of +dig, if you use -A the dig options will generally not work, +check drill(1) for the correct ones, also, timeout and retry +will be ignored, and check_dns won't be installed. If you +check any other option, the installed dig and nslookup will +be used. + +If you run FreeBSD < 10, you can still use the DNS_BIND* +options to have check_dig and check_dns use the newer dig +and nslookup utilities. + diff --git a/net-mgmt/nagios-plugins/pkg-plist b/net-mgmt/nagios-plugins/pkg-plist index 7fb865a30457..177bc1d42dfe 100644 --- a/net-mgmt/nagios-plugins/pkg-plist +++ b/net-mgmt/nagios-plugins/pkg-plist @@ -8,7 +8,7 @@ libexec/nagios/check_dhcp libexec/nagios/check_dig libexec/nagios/check_disk libexec/nagios/check_disk_smb -libexec/nagios/check_dns +%%CHECK_DNS%%libexec/nagios/check_dns libexec/nagios/check_dummy libexec/nagios/check_file_age libexec/nagios/check_flexlm @@ -64,8 +64,6 @@ libexec/nagios/check_ups libexec/nagios/check_users libexec/nagios/check_wave libexec/nagios/negate -%%BIND%%libexec/nagios/nagios-dig -%%BIND%%libexec/nagios/nagios-nslookup libexec/nagios/urlize libexec/nagios/utils.pm libexec/nagios/utils.sh |