forked from pool/monitoring-plugins-sar-perf
5bd64f92b0
- update AppArmor profile for usrMerge (bash) (boo#1132350) OBS-URL: https://build.opensuse.org/request/show/694066 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=16
83 lines
2.7 KiB
RPMSpec
83 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package monitoring-plugins-sar-perf
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: monitoring-plugins-sar-perf
|
|
Summary: Get performance data from sar
|
|
License: BSD-2-Clause
|
|
Group: System/Monitoring
|
|
Version: 0.1
|
|
Release: 0
|
|
Url: https://github.com/nickanderson/check-sar-perf
|
|
Source0: nickanderson-check-sar-perf-4878d0c.tar.gz
|
|
Source1: check_iostat
|
|
Source2: usr.lib.nagios.plugins.check_iostat
|
|
Patch0: monitoring-plugins-sar-perf-output.patch
|
|
Patch1: monitoring-plugins-sar-perf-stdout.patch
|
|
BuildRequires: nagios-rpm-macros
|
|
%if 0%{?suse_version}
|
|
Recommends: apparmor-profiles
|
|
%endif
|
|
Provides: nagios-plugins-sar-perf = %{version}-%{release}
|
|
Obsoletes: nagios-plugins-sar-perf < %{version}-%{release}
|
|
Requires: python
|
|
Requires: sysstat
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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}/%{nagios_plugindir}/check_sar_perf
|
|
install -m755 %{SOURCE1} %{buildroot}/%{nagios_plugindir}/check_iostat
|
|
install -Dm0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
# avoid build dependecy of nagios - own the dirs
|
|
%dir %{nagios_libdir}
|
|
%dir %{nagios_plugindir}
|
|
%dir %{_sysconfdir}/apparmor.d
|
|
%{nagios_plugindir}/check_sar_perf
|
|
%{nagios_plugindir}/check_iostat
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat
|
|
|
|
%changelog
|