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

# spec file for package monitoring-plugins-temp
# Copyright (c) 2019 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

%define pluginname check_temp
Name:           monitoring-plugins-temp
Version:        0.94
Release:        0
Summary:        Check the CPU (or M/B) temperature with lm-sensors
License:        GPL-2.0-or-later
Group:          System/Monitoring
Url:  {pluginname}
BuildRequires:  nagios-rpm-macros
BuildArch:      noarch
# PATCH-FIX-UPSTREAM add useful performance data for diagrams
Patch:          performance.patch
Requires:       awk
Requires:       bash
Requires:       sed
Requires:       sensors

A small Nagios plugin that checks the CPU (or M/B) temperature with lm-sensors.
It's written in Bash and uses *nix "sensors" and some sed & awk.
Default is to check the CPU temperature but this can be changed to, for example, 
the motherboard temperature with a "--sensor" argument. 
The plugin complies with the guidelines, for example uses -w -c -v arguments 
etc. It also does some basic sanity checks and has an exit 3 catch-all.

%setup -n %{pluginname}-%{version}
%patch -p1


install -D -m755 %{pluginname}.sh %{buildroot}%{nagios_plugindir}/%{pluginname}

# avoid build dependency of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}

openSUSE Build Service is sponsored by