Dieses Plugin zeigt den benutzen Plattenplatz in Prozent an. Die Parameter für WARNING und CRITICAL sind variabel.
etc/services
# Service definition
define service{
use template-gow-service ; Name of service template to use
host_name localhost
service_description HDD.root
check_command check_local_disk!20%!10%!"/dev/hda2"
}
etc/checkcommands.cfg
# 'check_local_disk' command definition
define command{
command_name check_local_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
Look and Feel
etc/services.cfg
# Service definition
define service{
use template-gow-service ; Name of service template to use
host_name host1,host2
service_description HDD.root
check_command check_nrpe!check_disk1
}
etc/checkcommands.cfg
# 'check_nrpe' command defintion
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
/etc/nagios/nrpe.cfg
command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda2 -M
Look and Feel
./libexec/check_disk -h
check_disk (nagios-plugins 1.4.2) 1.57
Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>
Copyright (c) 1999-2004 Nagios Plugin Development Team
<nagiosplug-devel@lists.sourceforge.net>
This plugin checks the amount of used disk space on a mounted file system
and generates an alert if free space is less than one of the threshold values.
Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]
[-v] [-q]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-w, --warning=INTEGER
Exit with WARNING status if less than INTEGER --units of disk are free
-w, --warning=PERCENT%
Exit with WARNING status if less than PERCENT of disk space is free
-c, --critical=INTEGER
Exit with CRITICAL status if less than INTEGER --units of disk are free
-c, --critical=PERCENT%
Exit with CRITCAL status if less than PERCENT of disk space is free
-C, --clear
Clear thresholds
-u, --units=STRING
Choose bytes, kB, MB, GB, TB (default: MB)
-k, --kilobytes
Same as '--units kB'
-m, --megabytes
Same as '--units MB'
-l, --local
Only check local filesystems
-p, --path=PATH, --partition=PARTITION
Path or partition (may be repeated)
-x, --exclude_device=PATH <STRING>
Ignore device (only works if -p unspecified)
-X, --exclude-type=TYPE <STRING>
Ignore all filesystems of indicated type (may be repeated)
-M, --mountpoint
Display the mountpoint instead of the partition
-e, --errors-only
Display only devices/mountpoints with errors
-w, --warning=DOUBLE
Response time to result in warning status (seconds)
-c, --critical=DOUBLE
Response time to result in critical status (seconds)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)
Examples:
check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /
Checks /tmp and /var at 10%,5% and / at 100MB, 50MB
Send email to nagios-users@lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-devel@lists.sourceforge.net