monitoring-plugins-sar-perf/nagios-plugins-sar-perf.spec

73 lines
2.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package nagios-plugins-sar-perf
#
# 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/
#
# norootforbuild
Name: nagios-plugins-sar-perf
Summary: NRPE plugin to get performance data from sar
Version: 0.1
Release: 1
Url: https://github.com/nickanderson/check-sar-perf
License: GPL
Group: System/Monitoring
Source0: nickanderson-check-sar-perf-4878d0c.tar.gz
Source1: check_iostat
Patch0: nagios-plugins-sar-perf-output.patch
Patch1: nagios-plugins-sar-perf-stdout.patch
Requires: python sysstat
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define libexecdir %_prefix/lib/nagios/plugins
%description
This plug-in was written to get performance data from sar. It was developed for
use with Zenoss but should work with other NRPE compatible NMS.
Example output:
check_sar_perf cpu
sar OK| CPU=all user=59.90 nice=0.00 system=4.46 iowait=0.00 steal=0.00
idle=35.64
check_sar_perf disk sda
sar OK| DEV=sda tps=0.00 rd_sec/s=0.00 wr_sec/s=0.00 avgrq-sz=0.00
avgqu-sz=0.00 await=0.00 svctm=0.00 util=0.00
%prep
%setup -q -n nickanderson-check-sar-perf-4878d0c
%patch0 -p0
%patch1 -p0
%build
%install
install -D -m755 check_sar_perf.py %{buildroot}/%{libexecdir}/check_sar_perf
install -m755 %{SOURCE1} %{buildroot}/%{libexecdir}/check_iostat
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %{_prefix}/lib/nagios
%dir %{libexecdir}
%{libexecdir}/check_sar_perf
%{libexecdir}/check_iostat
%changelog