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

# spec file for package monitoring-plugins-bonding
# Copyright (c) 2020 SUSE LLC
# 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-bonding
Version:        0.002
Release:        0
Summary:        Nagios Network Bonding Check
License:        GPL-2.0-or-later OR Artistic-1.0
Group:          System/Monitoring
Source1:        usr.lib.nagios.plugins.check_bonding
Source2:        nrpe-check_bonding
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-bonding = %{version}-%{release}
Obsoletes:      nagios-plugins-bonding < %{version}-%{release}
%if 0%{?suse_version}
Recommends:     apparmor-profiles
# nagios can execute the script with embedded perl
Recommends:     perl
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This script attempts to read the proc interface to the Linux kernel bonding
driver, and determine if the bonded interfaces are optimal. It will warn if any
of the enslaved devices are not 'up' (exit 1), and if any bonded interfaces are
not active at all (exit 2). This script is suitable for feeding to NRPE for
Nagios (or similar) to check.



install -D -m755 %{SOURCE0} %{buildroot}%{nagios_plugindir}/check_bonding
install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_bonding
install -D -m644 %{SOURCE2} %{buildroot}%{nrpe_sysconfdir}/check_bonding.cfg

rm -rf %{buildroot}

# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{nrpe_sysconfdir}
%dir %{_sysconfdir}/apparmor.d
%config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_bonding
%config(noreplace) %{nrpe_sysconfdir}/check_bonding.cfg

openSUSE Build Service is sponsored by