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
        <nagiosplug-de...@lists.sourceforge.net>

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 nagios-us...@lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-de...@lists.sourceforge.net


# /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:help-bounces+ralph.grothe=itdz-berlin...@monitoring-plugins.org] Im 
Auftrag von frank.schweit...@itelligence.de
Gesendet: Freitag, 11. November 2016 11:17
An: help@monitoring-plugins.org
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:image001.gif@01D23C1A.38B2E4B0]

But when trying to monitor this partion via check_disk the output is:

[cid:image002.gif@01D23C1A.38B2E4B0]

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

Reply via email to