Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Monitors tape volume counts in media pools with warning/critical thresholds
Current Version
1.1
Last Release Date
2015-12-22
Owner
Andrea Bolongaro
Download URL
https://gitlab.com/-/snippets/6064999
License
GPL
Compatible With
Description Simple shell script to check number of tapes in media volume pool using Netbackup. You may set thresholds to have warning and critical notifications. Check number of tapes in media volume pool you specify
Usage check_tape_pool.sh -p|–pool media_pool_name [-l lower_threshold -u upper_threshold] [-r] [-v] [-h]
Options: -p or –pool media_pool_name, media volume pool to check -u or –upper upper_threshold -l or –lower lower_threshold -r or –reverse, to reverse notification alert -v or –version, to display version -h or –help, to display this help
Option -p media_pool_name is mandatory Without thresholds, plugin returns number of tapes in media pool (without sending any notification) With thresholds, plugin notifies in following way: — plugin returns warning if counted tapes in media_pool_name are between lower_threshold and upper_threshold — plugin returns a critical if counted tapes in media_pool_name are below lower_threshold (default) — with -r option, plugin returns a critical if counted tapes in media_pool_name are above upper_threshold
Useful for: – monitoring when a volume pool is media oversizing – monitoring when scratch pool is media undersizing – monitoring number of tapes in a volume pool for statistics
Plugin provides performance data output for parsing and for graphical use. Tested under RHEL, written using bash, good for linux.
If running as nagios user – supposed nrpe – you need to configure sudo environment for using netbackup commands defined inside the plugin, i.e. – edit /etc/sudoers, running visudo
– insert the following under “# Defaults specification” section #enabling nrpe user to execute sudo commands without a TTY Defaults:nrpe !requiretty
– insert the following at end of file insert #enabling nrpe user to run netbackup commands needed nrpe ALL=(root) NOPASSWD: /usr/openv/volmgr/bin/vmquery nrpe ALL=(root) NOPASSWD: /usr/openv/volmgr/bin/vmpool
Examples: [root@netbackup]# check_tape_pool.sh -p Scratch OK – available tapes in Scratch : 35|availability=35;
[root@netbackup]# check_tape_pool.sh -p Scratch -l 10 -u 15 OK – available tapes in Scratch : 35|availability=35;
[root@netbackup]# check_tape_pool.sh -p Scratch -l 20 -u 40 WARNING – available tapes in Scratch : 35|availability=35;
[root@netbackup]# check_tape_pool.sh -p Scratch -l 40 -u 50 CRITICAL – available tapes in Scratch : 35|availability=35;
[root@netbackup]# check_tape_pool.sh -p Scratch -r -l 10 -u 15 CRITICAL – available tapes in Scratch : 35|availability=35;
You must be logged in to submit a review.
To:
From: