mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-22 01:11:47 -05:00
* maint: check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer fixed tests when there is no direct internet connection NEWS: Mention fix for check_http's -S option Fix for SSL Versioning when multiple options are used. Fix #1217 spec file fails to build due to duplicate files and unused files check_http: Don't let "-N" expect an argument README: Change GitHub URL README: Clarify license notice Update URLs and mailing list addresses Just using the posix conform extended regular expression grep check_oracle: --db +ASM bad string matching check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*. -- Just turning attached patch of github issue #1207 into a push request. (Closes #1207) Update web site URLs Conflicts: FAQ NEWS README SUPPORT configure.in monitoring-plugins.spec.in pkg/solaris/pkginfo.in plugins-root/check_dhcp.c plugins-root/check_icmp.c plugins-scripts/check_ifoperstatus.pl plugins-scripts/check_mssql.pl plugins/check_apt.c plugins/check_by_ssh.c plugins/check_cluster.c plugins/check_dbi.c plugins/check_dig.c plugins/check_disk.c plugins/check_dns.c plugins/check_dummy.c plugins/check_fping.c plugins/check_game.c plugins/check_hpjd.c plugins/check_http.c plugins/check_ide_smart.c plugins/check_ldap.c plugins/check_load.c plugins/check_mrtg.c plugins/check_mrtgtraf.c plugins/check_mysql.c plugins/check_mysql_query.c plugins/check_nagios.c plugins/check_nt.c plugins/check_ntp.c plugins/check_ntp_peer.c plugins/check_ntp_time.c plugins/check_nwstat.c plugins/check_overcr.c plugins/check_pgsql.c plugins/check_ping.c plugins/check_procs.c plugins/check_radius.c plugins/check_real.c plugins/check_smtp.c plugins/check_snmp.c plugins/check_ssh.c plugins/check_swap.c plugins/check_tcp.c plugins/check_time.c plugins/check_ups.c plugins/check_users.c plugins/negate.c plugins/urlize.c plugins/utils.h po/Makevars po/de.po po/fr.po po/monitoring-plugins.pot
201 lines
6.3 KiB
RPMSpec
201 lines
6.3 KiB
RPMSpec
# Macros
|
|
%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0")
|
|
%define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0")
|
|
%define isredhatfamily %(test -f /etc/redhat-release && echo "1" || echo "0")
|
|
|
|
%if %{isaix}
|
|
%define _prefix /opt/nagios
|
|
# %define _defaultdocdir %{_datadir}/doc
|
|
%else
|
|
%define _libexecdir %{_exec_prefix}/lib/nagios/plugins
|
|
%endif
|
|
%define _sysconfdir /etc/nagios
|
|
|
|
%define npusr nagios
|
|
%define nphome /opt/nagios
|
|
%define npgrp nagios
|
|
|
|
Name: monitoring-plugins
|
|
Version: @PACKAGE_VERSION@
|
|
Release: @RELEASE@
|
|
Summary: Host/service/network monitoring program plugins for Nagios and compatible
|
|
|
|
Group: Applications/System
|
|
License: GPL
|
|
URL: https://www.monitoring-plugins.org/
|
|
Source0: https://www.monitoring-plugins.org/download/%{name}-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
%define npdir %{_builddir}/%{name}-%{version}
|
|
|
|
%if %{isaix}
|
|
Prefix: %{_prefix}
|
|
%else
|
|
Prefix: %{_prefix}/lib/nagios/plugins
|
|
%endif
|
|
Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
|
Vendor: Monitoring Plugins Development Team
|
|
Provides: monitoring-plugins
|
|
|
|
%{!?custom:%global custom 0}
|
|
Obsoletes: monitoring-plugins-custom monitoring-plugins-extras
|
|
|
|
|
|
# Requires
|
|
%if %{isaix}
|
|
Requires: fping
|
|
Requires: gawk
|
|
Requires: net-snmp
|
|
Requires: net-snmp-perl
|
|
Requires: net-snmp-utils
|
|
Requires: openldap
|
|
Requires: openssl
|
|
Requires: perl
|
|
Requires: python
|
|
Requires: openssl
|
|
BuildRequires: fping
|
|
BuildRequires: gawk
|
|
BuildRequires: net-snmp
|
|
BuildRequires: net-snmp-perl
|
|
BuildRequires: net-snmp-utils
|
|
BuildRequires: openldap-devel
|
|
%endif
|
|
%if %{isredhatfamily}
|
|
Requires: bind-utils
|
|
Requires: coreutils
|
|
Requires: fping
|
|
Requires: gawk
|
|
Requires: grep
|
|
Requires: iputils
|
|
Requires: mysql
|
|
Requires: net-snmp-utils
|
|
Requires: ntp
|
|
Requires: openldap
|
|
Requires: openssl
|
|
Requires: openssh-clients
|
|
Requires: perl
|
|
Requires: postgresql-libs
|
|
Requires: procps
|
|
Requires: python
|
|
Requires: samba-client
|
|
Requires: shadow-utils
|
|
Requires: traceroute
|
|
Requires: /usr/bin/mailq
|
|
BuildRequires: bind-utils
|
|
BuildRequires: coreutils
|
|
BuildRequires: iputils
|
|
BuildRequires: mysql-devel
|
|
BuildRequires: net-snmp-utils
|
|
BuildRequires: net-tools
|
|
BuildRequires: ntp
|
|
BuildRequires: openldap-devel
|
|
BuildRequires: openssh-clients
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: postgresql-devel
|
|
BuildRequires: procps
|
|
BuildRequires: samba-client
|
|
BuildRequires: /usr/bin/mailq
|
|
%endif
|
|
|
|
|
|
%description
|
|
|
|
Nagios is a program that will monitor hosts and services on your
|
|
network, and to email or page you when a problem arises or is
|
|
resolved. Nagios runs on a unix server as a background or daemon
|
|
process, intermittently running checks on various services that you
|
|
specify. The actual service checks are performed by separate "plugin"
|
|
programs which return the status of the checks to the monitoring
|
|
system. This package contains those plugins.
|
|
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
|
|
%build
|
|
%{?isaix: MAKE=gmake} ./configure \
|
|
--prefix=%{_prefix} \
|
|
--exec-prefix=%{_exec_prefix} \
|
|
--libexecdir=%{_libexecdir} \
|
|
--sysconfdir=%{_sysconfdir} \
|
|
--datadir=%{_datadir} \
|
|
--with-cgiurl=/nagios/cgi-bin
|
|
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before
|
|
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before
|
|
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before
|
|
make %{?_smp_mflags}
|
|
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after
|
|
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after
|
|
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after
|
|
|
|
%pre
|
|
# Create `nagios' group on the system if necessary
|
|
%if %{isaix}
|
|
lsgroup %{npgrp} > /dev/null 2> /dev/null
|
|
if [ $? -eq 2 ] ; then
|
|
mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
|
|
fi
|
|
%endif
|
|
%if %{islinux}
|
|
getent group %{npgrp} > /dev/null 2> /dev/null
|
|
if [ $? -ne 0 ] ; then
|
|
groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
|
|
fi
|
|
%endif
|
|
|
|
# Create `nagios' user on the system if necessary
|
|
%if %{isaix}
|
|
lsuser %{npusr} > /dev/null 2> /dev/null
|
|
if [ $? -eq 2 ] ; then
|
|
useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
|
|
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
|
|
fi
|
|
%endif
|
|
%if %{islinux}
|
|
getent passwd %{npusr} > /dev/null 2> /dev/null
|
|
if [ $? -ne 0 ] ; then
|
|
useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
|
|
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
|
|
fi
|
|
%endif
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
|
|
%find_lang %{name}
|
|
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
|
|
comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
echo "%defattr(755,root,root)" >> %{name}.lang
|
|
comm -13 %{npdir}/ls-plugins-root-before %{npdir}/ls-plugins-root-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
|
|
comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
|
|
echo "%{_libexecdir}/utils.pm" >> %{name}.lang
|
|
echo "%{_libexecdir}/utils.sh" >> %{name}.lang
|
|
echo "%{_libexecdir}/check_ldaps" >> %{name}.lang
|
|
|
|
sed -i '/libnpcommon/d' %{name}.lang
|
|
sed -i '/monitoring-plugins.mo/d' %{name}.lang
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files -f %{name}.lang
|
|
%config(missingok,noreplace) %{_sysconfdir}/command.cfg
|
|
%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
|
|
%doc ChangeLog command.cfg
|
|
%if ! %{isaix}
|
|
%{_datadir}/locale/de/LC_MESSAGES/monitoring-plugins.mo
|
|
%{_datadir}/locale/fr/LC_MESSAGES/monitoring-plugins.mo
|
|
%endif
|
|
|
|
%changelog
|
|
* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head
|
|
- just include the nagios plugins directory, which will automatically include
|
|
all generated plugins (which keeps the build from failing on systems that
|
|
don't have all build-dependencies for every plugin)
|
|
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
|
|
- extensive rewrite to facilitate processing into various distro-compatible specs
|
|
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
|
|
- extensive rewrite to facilitate processing into various distro-compatible specs
|