File monitoring-plugins-multi.spec of Package monitoring-plugins-multi
#
# spec file for package monitoring-plugins-netapp
#
# 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 http://bugs.opensuse.org/
#
Name: monitoring-plugins-multi
Summary: Check Multi for Nagios
License: GPL-2.0-or-later
Group: System/Monitoring
Version: 0.2.6
Release: 0
Url: http://my-plugin.deg/
Source0: check_multi
Source1: check_multi_nrdp
%if 0%{?suse_version} > 1010
# nagios can execute the script with embedded perl
Recommends: perl
%else
Requires: perl
%endif
Requires: perl(Getopt::Long)
BuildArch: noarch
BuildRequires: nagios-rpm-macros
Provides: nagios-plugins-multi = %{version}-%{release}
Obsoletes: nagios-plugins-multi < %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
check_multi is kind of a wrapper plugin which takes benefit of the Nagios 3.x capability to display multiple lines of plugin output.
It calls multiple child plugins and displays their output in the long_plugin_output. A summary is given in the standard plugin output.
Normally the child return code with the highest severity becomes the parent (check_multi) plugin return code.
But you can influence this by specifying flexible state evaluation rules.
The configuration is very simple: a NRPE-stylish config file contains a tag for each child plugin and then the check command line.
%prep
%build
%install
install -D -m755 %{SOURCE0} %buildroot/%{nagios_plugindir}/check_multi
install -D -m755 %{SOURCE1} %buildroot/%{nagios_plugindir}/check_multi_nrdp
%clean
rm -rf %buildroot
%files
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_multi*
%changelog