If I remember correctly the check_disk plug-in can only be used for checking
devices with filesystems on them.
I would suggest that you resort to the check_swap plug-in instead.
e.g.
# /usr/lib64/nagios/plugins/check_swap -h
check_swap (nagios-plugins 1.4.9) 1.59
Copyright (c) 2000-2006 Nagios Plugin Development Team
<[email protected]>
Check swap space on local machine.
Usage:check_swap [-av] -w <percent_free>% -c <percent_free>%
check_swap [-av] -w <bytes_free> -c <bytes_free>
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-w, --warning=INTEGER
Exit with WARNING status if less than INTEGER bytes of swap space are free
-w, --warning=PERCENT%%
Exit with WARNING status if less than PERCENT of swap space is free
-c, --critical=INTEGER
Exit with CRITICAL status if less than INTEGER bytes of swap space are free
-c, --critical=PERCENT%%
Exit with CRITCAL status if less than PERCENT of swap space is free
-a, --allswaps
Conduct comparisons for all swap partitions, one by one
-v, --verbose
Verbose output. Up to 3 levels
Notes:
On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.
Send email to [email protected] if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to [email protected]
# /usr/lib64/nagios/plugins/check_swap -w 10% -c 5%
SWAP OK - 100% free (2047 MB out of 2047 MB) |swap=2047MB;204;102;0;2047
Von: Help
[mailto:[email protected]] Im
Auftrag von [email protected]
Gesendet: Freitag, 11. November 2016 11:17
An: [email protected]
Betreff: Monitoring SwapSpace on SLES systems
Hi,
I have a question regarding monitoring of swap files / swap partitions on Linux
servers.
I'd like to get information about swap files / swap partitions via the
check_disk command.
Like shown in the example below there exists a swap partition on the server as
/dev/sda2:
[cid:[email protected]]
But when trying to monitor this partion via check_disk the output is:
[cid:[email protected]]
Is there any error in the syntax and is it possible in general to get
information about the (physical) usage of swap files / partitions via
check_disk or does this command not support these kind of files / partitions ?
Do I have any other options to get the required information with one of the
Nagios plugins ?
Thanks in advance for your help.
Kind regards
Frank Schweitzer