- add apparmor profile for check_iostat

- recommend apparmor-profiles (needed for apparmor profile, but as 
  the check itself runs without apparmor, we use a week dependency)

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=3
This commit is contained in:
Lars Vogdt 2015-08-01 19:17:32 +00:00 committed by Git OBS Bridge
parent 84ad4ad9cb
commit 0aadf20c17
3 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Aug 1 19:14:27 UTC 2015 - lars@linux-schulserver.de
- add apparmor profile for check_iostat
- recommend apparmor-profiles (needed for apparmor profile, but as
the check itself runs without apparmor, we use a week dependency)
-------------------------------------------------------------------
Wed Jul 30 19:20:45 UTC 2014 - lars@linux-schulserver.de

View File

@ -2,6 +2,7 @@
# spec file for package monitoring-plugins-sar-perf
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 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
@ -25,9 +26,11 @@ License: GPL-2.0+
Group: System/Monitoring
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
Recommends: apparmor-profiles
Provides: nagios-plugins-sar-perf = %{version}-%{release}
Obsoletes: nagios-plugins-sar-perf < %{version}-%{release}
Requires: python sysstat
@ -59,6 +62,7 @@ sar OK| DEV=sda tps=0.00 rd_sec/s=0.00 wr_sec/s=0.00 avgrq-sz=0.00
%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}
@ -68,7 +72,9 @@ rm -rf %{buildroot}
# 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

View File

@ -0,0 +1,15 @@
#include <tunables/global>
/usr/lib/nagios/plugins/check_iostat {
#include <abstractions/base>
#include <abstractions/consoles>
#include <abstractions/perl>
/usr/bin/iostat rix,
/bin/bash rix,
/usr/bin/which rix,
/sys/devices/system/cpu/ r,
/proc/meminfo r,
/proc/diskstats r,
/proc/uptime r,
/etc/sysstat/sysstat.ioconf r,
}