source: trunk/server/fedora/config/etc/nagios/check_afs @ 2742

Last change on this file since 2742 was 2668, checked in by andersk, 9 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
4if [ $# -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    )"
10else
11    CHECKS=`/usr/bin/fs checks -all -fast`
12fi
13
14STATUS=$?
15
16$ECHO "$CHECKS"
17
18if [ $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
24else
25    exit $STATE_OK;
26fi
Note: See TracBrowser for help on using the repository browser.