AW: Monitoring SwapSpace on SLES systems

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Fri Nov 11 12:51:32 CET 2016


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-devel at 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-users at lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-devel at 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.de at monitoring-plugins.org] Im Auftrag von Frank.Schweitzer at itelligence.de
Gesendet: Freitag, 11. November 2016 11:17
An: help at 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 at 01D23C1A.38B2E4B0]

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

[cid:image002.gif at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20161111/1e52a8ab/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2746 bytes
Desc: image001.gif
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20161111/1e52a8ab/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 3426 bytes
Desc: image002.gif
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20161111/1e52a8ab/attachment-0003.gif>


More information about the Help mailing list