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

Last change on this file since 2792 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
RevLine 
[757]1#!/bin/sh
2. /usr/lib64/nagios/plugins/utils.sh
3
[2152]4if [ $# -ge 1 ]; then
[2667]5    CHECKS="$(
6        /usr/bin/fs checks -cell "$1" -fast &&
7        cd "/afs/$1" &&
8        /bin/dash -c '[ "$(pwd -P)" ]' 2>&1
9    )"
[2152]10else
11    CHECKS=`/usr/bin/fs checks -all -fast`
12fi
13
[757]14STATUS=$?
15
16$ECHO "$CHECKS"
17
18if [ $STATUS -gt 0 ]; then
[2668]19    if $ECHO "$CHECKS" | grep -i STYX >/dev/null; then
[757]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.