|
NAMEnagios-stat - nagios-statd clientSYNOPSISnagios-stat [OPTION] check serverDESCRIPTIONnagios-stat (nagios-stat client) is the client program for nagios-statd(8). These programs together comprise a systems monitoring tool for various platforms. It is designed to be integrated with the Nagios monitoring tool, although this is not a requirement.nagios-stat is the client that connects to the nagios-statd server. It then sends the daemon which check it wants to run, parses the data, prints a result, and then exits appropriately. OPTIONS-c, --critical=LEVELLEVEL is the what level of data will cause the client program to exit with a critical error. The defaults are dependent upon the check below, and are documented below. -d, --disk=DISK
-D, --ignoredisk=DISK
-l, --lt
-m, --mount=MOUNT
-M, --ignoremount=MOUNT
-n, --processname=NAME
-P, --perfdata
-p, --port=PORT
-s, --state=STATE
-v, --verbose
-w, -warning=LEVEL
-V, --version
-x, --debug
-h, --help
CHECKSdisk (warning: 90%; critical: 95%)The disk check allows you to check to see if a disks' utilization is above a specified percentage. You can use the -d/-m to check a specific disk/mount, or you can use the -D/-M options to ignore certain disks/mount points (like /cdrom). By default, the disk check will check all disks on a machine. Note that -d/-m and (-D/-M) are exclusive options, although -D and -M are not. Also, if you specify a disk/mount and it isn't found, then nagios-stat(1) will exit at a critical level. load (warning: 2; critical: 5)
proc (warning: 100; critical: 200) / (warning: -1;
critical: 1 if using -l/--lt)
swap (warning: 75%; critical: 90%)
user (warning: 20; critical: 30)
version (warning: nagios-stat(1) version - .01;
critical: none)
EXAMPLESCheck to see if /dev/hda is under 60%/80% full on server.domain.net:nagios-stat -d /dev/hda -w 60 -c 80 disk
server.domain.net
Check to see if all mounts except /cdrom and /tmp are under
75%/85% full:
nagios-stat -M /cdrom,/tmp -w 75 -c 85 disk
server.domain.net
Check to see if the load average is below 2.5/10:
nagios-stat -w 2.5 -c 10 load server.domain.net
Check and warn if load is above 1 (only):
nagios-stat -w 1 -c 10000 load server.domain.net
Check to see if there are more than 5/10 zombie processes:
nagios-stat -w 5 -c 10 -s Z proc server.domain.net
Check and critical if more than 20 Z or N or W processes:
nagios-stat -w 10000 -c 20 -s NWZ proc
server.domain.net
Check to see if cron is running - critical if it isn't:
nagios-stat -l -n '/usr/sbin/cron' proc
server.domain.net
Check 'oracle' processes running, critical if less than 3, warn
less than 5:
nagios-stat -l -n 'oracle' -c 3 -w 5 proc
server.domain.net
Check if swap utilization is above 50%/75%:
nagios-stat -w 50 -c 75 swap server.domain.net
Check to see if there are more than 250/500 users connected:
nagios-stat -w 250 -c 500 user server.domain.net
Check and critical if server is running nagios-statd 3.05 or
lower:
nagios-stat -w 10000 -c 3.05 version
server.domain.net
EXIT CODESTo comply with Nagios specifications, the following exit codes are used:0 : OK 1 : Warning 2 : Critical 3 : Invalid command line options, unable to check status (Unknown) BUGSThere is a general lack of feedback for the more obscure platforms. As such their behavior might not always be particularly deterministic. Feedback is always welcome. Redhat Linux contains Python 1.x as /usr/bin/python. This program requires Python 2.x to function. Either change the shebang at the top of the program to point to /usr/bin/python2, or change /usr/bin/python to be Python 2.x.AUTHORApril King http://www.twoevils.orgE-mail: april at twoevils dot org COPYRIGHTCopyright (C) 2002-2005 April King.This is free software, there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is licensed under the BSD license. More information is available in the LICENSE file included with this program. Nagios is a trademark of Ethan Galstad. SEE ALSOnagios-statd(8)
Visit the GSP FreeBSD Man Page Interface. |