Hello community,

here is the log from the commit of package monitoring-plugins-sar-perf for 
openSUSE:Factory checked in at 2019-12-21 12:29:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-sar-perf (Old)
 and      /work/SRC/openSUSE:Factory/.monitoring-plugins-sar-perf.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "monitoring-plugins-sar-perf"

Sat Dec 21 12:29:55 2019 rev:6 rq:757911 version:0.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/monitoring-plugins-sar-perf/monitoring-plugins-sar-perf.changes
  2019-04-17 10:07:59.650754066 +0200
+++ 
/work/SRC/openSUSE:Factory/.monitoring-plugins-sar-perf.new.6675/monitoring-plugins-sar-perf.changes
        2019-12-21 12:30:01.731324646 +0100
@@ -1,0 +2,16 @@
+Wed Dec 11 18:10:48 CET 2019 - [email protected]
+
+- check_iostat: sanitize dev name to properly match iostat output 
+
+-------------------------------------------------------------------
+Thu Dec  5 16:34:19 CET 2019 - [email protected]
+
+- check_iostat: exit with OK if running on tmpfs
+- check_iostat: fix apparmor profile to allow stat call 
+
+-------------------------------------------------------------------
+Thu Dec  5 14:40:38 CET 2019 - [email protected]
+
+- check_iostat: allow to just specify a directory 
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ monitoring-plugins-sar-perf.spec ++++++
--- /var/tmp/diff_new_pack.aaHntb/_old  2019-12-21 12:30:02.471324998 +0100
+++ /var/tmp/diff_new_pack.aaHntb/_new  2019-12-21 12:30:02.475324999 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package monitoring-plugins-sar-perf
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,7 +22,7 @@
 Group:          System/Monitoring
 Version:        0.1
 Release:        0
-Url:            https://github.com/nickanderson/check-sar-perf 
+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

++++++ check_iostat ++++++
--- /var/tmp/diff_new_pack.aaHntb/_old  2019-12-21 12:30:02.779325144 +0100
+++ /var/tmp/diff_new_pack.aaHntb/_new  2019-12-21 12:30:02.795325152 +0100
@@ -71,14 +71,36 @@
 my ($warn_tps,$warn_read,$warn_written) = split(',',$warning);
 
 # Checking parameters:
+if (-d "$disk") {
+    # directory specified ...
+    my $mp = `stat --format '\%m' $disk`;
+    chomp($mp);
+    my $fstype = `stat --file-system --format '\%T' $mp`;
+    chomp($fstype);
+    if ($fstype eq "tmpfs") {
+        print "OK - $disk (mountpoint $mp is tmpfs)\n";
+        exit 0;
+    }
+    open(MOUNTS,"/proc/mounts");
+    while(<MOUNTS>) {
+        chomp($_);
+        my @line = split('\s+',$_);
+        $disk = $line[0] if $mp eq $line[1]; 
+    }
+    close(MOUNTS);
+}
+
+$disk =~ s/^\/dev\/mapper\///;
+$disk =~ s/^\/dev\///;
+
 if (! -b "/dev/$disk") {
     if (-b "/dev/mapper/$disk") {
         my @f = stat("/dev/mapper/$disk");
-       $f[6] %= 256;
-       $disk = "dm-$f[6]";
+        $f[6] %= 256;
+        $disk = "dm-$f[6]";
     } else {
-       warn "ERROR: Device incorrectly specified\n";
-       HELP_MESSAGE();
+        warn "ERROR: Device incorrectly specified\n";
+        HELP_MESSAGE();
     }
 }
 

++++++ usr.lib.nagios.plugins.check_iostat ++++++
--- /var/tmp/diff_new_pack.aaHntb/_old  2019-12-21 12:30:03.063325279 +0100
+++ /var/tmp/diff_new_pack.aaHntb/_new  2019-12-21 12:30:03.075325285 +0100
@@ -5,9 +5,11 @@
    #include <abstractions/perl>
    /usr/bin/iostat rix,
    /{usr/,}bin/bash rix,
+   /{usr/,}bin/stat rix,
    /usr/bin/which rix,
    /sys/devices/system/cpu/ r,
    /proc/meminfo r,
+   @{PROC}/[0-9]*/mounts r,
    /proc/diskstats r,
    /proc/uptime r,
    /etc/sysstat/sysstat.ioconf r,


Reply via email to