Subscribe to Mailing Lists     FAQFAQ    SearchSearch      Register  Log in to check your private messagesLog in to check your private messages    Log inLog in 
These forums brought to you by Backup Central, where we also have the Mr. Backup Blog, Mailing Lists, FAQs,
and Directories of Backup Software and Hardware
Nagios Plugin for Tape Libraries...

 
Post new topic   Reply to topic    Backup Central Forums Forum Index -> EMC NetWorker
View previous topic :: View next topic  
Author Message
anacreo



Joined: 21 Aug 2008
Posts: 95

PostPosted: Tue Mar 09, 2010 11:38 pm    Post subject: Nagios Plugin for Tape Libraries... Reply with quote

So I'm stuck at the office and this plugin we wrote has been such a
lifesaver, I figured I'd give it out to the community...

Here is our GroundWork GDMA external command, you may have to use your own
mechanism for running this on a vanilla Nagios environment...

Check_networker_edl[1]_Enable="ON"
Check_networker_edl[1]_Service="check_networker_edl"
Check_networker_edl[1]_Command="check_networker_edl.pl full 10 5"

Basically run the command...

"check_networker_edl.pl full 10 5"

10TB left is a WARNING
5TB left is a CRITICAL


Here is the check command we use (note that the EDL name is hard coded into
the program, please feel free to improve it):
cat check_networker_edl.pl
#!/usr/bin/perl
use strict;
use warnings;
my $pool = $ARGV[0];
my $warnvalue = $ARGV[1];
my $critvalue = $ARGV[2];

my < at > info = qx(/bin/echo "show current capacity\nprint type: NSR jukebox
; name: *EDL*" | /usr/sbin/nsradmin -i -);
my $lista = join ('', < at > info);
my < at > pools = split(',',$lista);
#print "$pools[0] \n";
if ($#ARGV < 2) {
die "Usage: check_networker_edl.pl pool warnvalue
critvalue \n";
}#end if


if ($pool eq "full")
{
my < at > full_s = split(' ',$pools[0]);
my $full_v = $full_s[2];
for ($full_s[3])
{
if ($full_s[3] eq "GB") { $full_v = ($full_v/1024);
$full_s[3]='TB';}
elsif ($full_s[3] eq "KB") { $full_v = (($full_v/1024)/1024);
$full_s[3]='TB'; }
else { $full_v = $full_s[2] }

}
for ($full_v)
{
if ($full_v < $critvalue) { print "CRITICAL - Storage space on
the *EDL* lower than the critical value of $critvalue $full_s[3] Free:
$full_v $full_s[3] \n"; exit 2; }
if ($full_v < $warnvalue) { print "WARNING - Storage space on
the *EDL* lower than the warning value of $warnvalue $full_s[3] Free:
$full_v $full_s[3] \n"; exit 1; }
else { print "OK - Storage space is OK for the* EDL* Free:
$full_v $full_s[3]\n"; exit 0; }
}

}

Here is the output from the running plugin:
# ./check_networker_edl.pl full 10 5
WARNING - Storage space on the EDL lower than the warning value of 10 TB
Free: 6.013671875 TB


via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Backup Central Forums Forum Index -> EMC NetWorker All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Magic SEO URL for phpBB