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

# spec file for package monitoring-plugins-nwc_health
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2014-2021, Martin Hauke <>
# 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

%define         realname check_nwc_health
Name:           monitoring-plugins-nwc_health
Release:        0
Summary:        This plugin checks the health of network components and interfaces
License:        GPL-2.0-or-later
Group:          System/Monitoring
Source1:        check_nwc_health.php
BuildRequires:  make
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-nwc_health = %{version}-%{release}
Obsoletes:      nagios-plugins-nwc_health < %{version}-%{release}
Requires:       perl-Nagios-Plugin
Requires:       perl-Net-SNMP
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This plugin checks the hardware health and various interface metrics of
network components like switches and routers.

%setup -q -n %{realname}-%{version}

%configure \
	--libexecdir=%{nagios_plugindir} \
	--with-nagios-user=%{nagios_user} \
	--with-nagios-group=%{nagios_group} \
	--with-perl=%{_bindir}/perl \
	--with-degrees=celsius \
	--enable-perfdata \
make %{?_smp_mflags}

mkdir -p %{buildroot}/%{nagios_plugindir}
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -D -m644 %{SOURCE1} %{buildroot}/%{pnp4nagios_templatedir}/check_nwc_health.php

%license COPYING
# avoid build dependency of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{pnp4nagios_datadir}
%dir %{pnp4nagios_templatedir}

openSUSE Build Service is sponsored by