Last change
on this file since 2739 was
2668,
checked in by andersk, 10 years ago
|
check_afs: styx is more critical than cocytus
|
-
Property svn:executable set to
*
|
File size:
437 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | . /usr/lib64/nagios/plugins/utils.sh |
---|
3 | |
---|
4 | if [ $# -ge 1 ]; then |
---|
5 | CHECKS="$( |
---|
6 | /usr/bin/fs checks -cell "$1" -fast && |
---|
7 | cd "/afs/$1" && |
---|
8 | /bin/dash -c '[ "$(pwd -P)" ]' 2>&1 |
---|
9 | )" |
---|
10 | else |
---|
11 | CHECKS=`/usr/bin/fs checks -all -fast` |
---|
12 | fi |
---|
13 | |
---|
14 | STATUS=$? |
---|
15 | |
---|
16 | $ECHO "$CHECKS" |
---|
17 | |
---|
18 | if [ $STATUS -gt 0 ]; then |
---|
19 | if $ECHO "$CHECKS" | grep -i STYX >/dev/null; then |
---|
20 | exit $STATE_CRITICAL; |
---|
21 | else |
---|
22 | exit $STATE_WARNING; |
---|
23 | fi |
---|
24 | else |
---|
25 | exit $STATE_OK; |
---|
26 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.