]> git.michaelhowe.org Git - packages/m/munin-plugins-afs.git/commitdiff
Use Munin::Plugin
authorMichael Howe <michael@michaelhowe.org>
Thu, 27 Dec 2018 10:32:53 +0000 (10:32 +0000)
committerMichael Howe <michael@michaelhowe.org>
Thu, 27 Dec 2018 10:32:53 +0000 (10:32 +0000)
Also remove nagios-specific code - we can just die() if things don't
look good

plugins/afs_volumes

index c2dbe6613370901b218374350c30c8e1963a9be2..c718f72adff116f178c96a69114fdebe4284e6fd 100755 (executable)
@@ -23,6 +23,7 @@ use warnings;
 
 use v5.14.0;
 
+use Munin::Plugin;
 use Net::Domain;
 
 my $VOS = $ENV{vos} // "/usr/bin/vos";
@@ -48,8 +49,7 @@ sub serverinfo {
         if( $return_not_die ){
             return undef;
         } else {
-            print "AFS CRITICAL - cannot contact server\n";
-            exit 2;
+            die "$Munin::Plugin::me: cannot contact server\n";
         }
     }
     my( $volume, $size, %results );