File monitoring-plugins-apachestatus_auto.spec of Package monitoring-plugins-apachestatus_auto

# spec file for package monitoring-plugins-apachestatus_auto
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           monitoring-plugins-apachestatus_auto
Version:        1.2
Release:        100
Summary:        Parses the status page of an apache or lighttpd server
License:        GPL-3.0+
Group:          System/Monitoring
Source0:        check_apachestatus_auto.tar.gz
Source1:        check_apachestatus_auto.php.tar.gz
Source3:        monitoring-plugins-apachestatus_auto-rpmlintrc
# nagios can execute the script with embedded perl
Recommends:     perl
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-apachestatus_auto = %{version}-%{release}
Obsoletes:      nagios-plugins-apachestatus_auto < %{version}-%{release}
Requires:       monitoring-plugins-common
Requires:       perl(Getopt::Long)
Requires:       perl(LWP::UserAgent)
Requires:       perl(Time::HiRes)
Requires:       perl(Digest::MD5)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

A Nagios plugin that parses the status page of an apache or lighttpd server,
the plugin returns the response time, the amount of idle, busy, open (apache
only) and total slots. The perfdata returns the status of all slots including
Requests/sec, Bytes/Request and Bytes/sec. Optionally you can specify how much
slots should be available. Use http(s) and basic user authentication with non
standard server-status urls. This is an enhanced version of an enhanced version
of Lieven De Bodt’s

%setup -q -T -c %name -a0 -a1


mkdir -p %{buildroot}/%{nagios_plugindir}
sed -e "s|/usr/local/nagios/libexec|%{nagios_plugindir}|g" \ \
	> %{buildroot}/%{nagios_plugindir}/check_apachestatus_auto
chmod +x %{buildroot}/%{nagios_plugindir}/check_apachestatus_auto
install -D -m644 check_apachestatus_auto.php %{buildroot}/%{pnp4nagios_templatedir}/check_apachestatus_auto.php

rm -rf %{buildroot}

# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{pnp4nagios_datarootdir}
%dir %{pnp4nagios_templatedir}
%config(noreplace) %{pnp4nagios_templatedir}/check_apachestatus_auto.php

openSUSE Build Service is sponsored by