File monitoring-plugins-apache_status.spec of Package monitoring-plugins-apache_status
#
# spec file for package monitoring-plugins-apache_status
#
# Copyright (c) 2020 SUSE LINUX 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 http://bugs.opensuse.org/
#
Name: monitoring-plugins-apache_status
Version: 1.4.2
Release: 0
Summary: Plugin for Icinga, Nagios and Shinken to check the apache status
License: GPL-2.0-or-later
Group: System/Monitoring
Url: https://github.com/lbetz/check_apache_status
Source: check_apache_status-%{version}.tar.gz
BuildRequires: nagios-rpm-macros
Requires: perl(Monitoring::Plugin)
Requires: perl(Monitoring::Plugin::Getopt)
Requires: perl(Monitoring::Plugin::Threshold)
Requires: perl(LWP::UserAgent)
Requires: perl(HTTP::Status)
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Plugin for Icinga, Nagios and Shinken to check the Apache httpd status.
If the Apache httpd status page is accessible then this plugin checks for
following metrics:
* open slots
* busy workers
* idle workers
* requests per second
* bytes per second
* bytes per request
%prep
%setup -q -n check_apache_status-%{version}
%build
#
%install
install -Dm0755 check_apache_status.pl %{buildroot}%{nagios_plugindir}/check_apache_status.pl
mkdir -p %{buildroot}%{nrpe_sysconfdir}
cat >> %{buildroot}%{nrpe_sysconfdir}/check_apache_status.cfg << EOL
# The following example sets the threshold for busy workers to WARNING for at
# least 10 busy workers and CRITICAL to at least of 25 busy workers:
command[check_apache_status]=%{nagios_plugindir}/check_apache_status.pl -H localhost -w ,10,,,, -c ,25,,,,
# To additionally set the threshold for open_slots to WARNING when at or below
# 10 and CRITICAL when at or below 5:
# command[check_apache_status]=%{nagios_plugindir}/check_apache_status.pl -H localhost -w 10:,10,,,, -c 5:,25,,,,
EOL
%files
%defattr(-,root,root)
%doc README.md
%license LICENSE
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{nrpe_sysconfdir}
%{nagios_plugindir}/check_apache_status.pl
%config(noreplace) %{nrpe_sysconfdir}/check_apache_status.cfg
%changelog