From: Michael Howe Date: Thu, 27 Dec 2018 10:32:53 +0000 (+0000) Subject: Use Munin::Plugin X-Git-Tag: v1.0~7 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5f9a39d1020b183b7bfcef3099e2254964f1f298;p=packages%2Fm%2Fmunin-plugins-afs.git Use Munin::Plugin Also remove nagios-specific code - we can just die() if things don't look good --- diff --git a/plugins/afs_volumes b/plugins/afs_volumes index c2dbe66..c718f72 100755 --- a/plugins/afs_volumes +++ b/plugins/afs_volumes @@ -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 );