mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2026-02-05 22:55:17 +01:00
moved plugins from subversion-style trunk/ directories
This commit is contained in:
37
check_dataprotector/check_dp_idb
Executable file
37
check_dataprotector/check_dp_idb
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2010, Pall Sigurdsson <palli@opensource.is>
|
||||
#
|
||||
# This script is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This script is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# About this script
|
||||
#
|
||||
# This script checks for the latest IDB backup of HP Dataprotector
|
||||
# If latest backup is more than $WARNING days old, issue a warning
|
||||
|
||||
WARNING=5
|
||||
CRITICAL=2
|
||||
|
||||
|
||||
/opt/omni/bin/omnirpt -tab -report obj_lastbackup -days -$WARNING | grep -w IDB > /dev/null
|
||||
RESULT=$?
|
||||
|
||||
|
||||
if [ $RESULT -gt 0 ]; then
|
||||
echo "Warning, Last Dataprotector backup is more than $WARNING days old"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Last Dataprotector backup is less than $WARNING days old"
|
||||
|
||||
Reference in New Issue
Block a user