/[pdpsoft]/trunk/nl.nikhef.ndpf.tools/nagios-ndpf-sensors/scripts/check_cluster_resources
ViewVC logotype

Annotation of /trunk/nl.nikhef.ndpf.tools/nagios-ndpf-sensors/scripts/check_cluster_resources

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2601 - (hide annotations) (download)
Thu Feb 21 14:32:25 2013 UTC (9 years, 2 months ago) by ronalds
File size: 464 byte(s)
0.3.32: added check_gluster and check_cluster_resources
1 ronalds 2601 #!/bin/sh
2    
3     OK=0
4     WARN=1
5     CRITICAL=2
6     UNKNOWN=3
7    
8     retval=$UNKNWON
9    
10     CL_STATUS=/usr/bin/cl_status
11     if [ ! -f "$CL_STATUS" ]; then
12     msg="CRITICAL: cannot determine cluster status"
13     retval=$CRITICAL
14     else
15     out=`$CL_STATUS rscstatus`
16    
17     case $out in
18     all|local)
19     msg="OK: $out"
20     ;;
21     none)
22     msg="WARNING: having none of the resource addresses"
23     ;;
24     *) retval=$UNKNOWN
25     msg="UNKNOWN: unexpected return value $out"
26     ;;
27     esac
28     fi
29    
30     echo -e "$msg"
31     exit $retval
32    

Properties

Name Value
svn:executable *

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28