Help on check_disk using the -p option.

McCann, Brian bmccann at andmore.com
Wed Apr 6 18:43:34 CEST 2005


In the nrpe config, you need to name each of your commands differently.
For example, don't use "check_disk" for them all.  Use "check_disk1",
"check_disk2", or whatever convention you want to follow.  On the newer
systems I'm building, I use "check_disk_mlxd0s1_a",
"check_disk"mlxd0s1_d" for example (I'm running FreeBSD, so if you are
unfamiliar with it, "mlxd0" is the device, "s1" and "a" is the slice and
partition.)

Hope that helps,
--Brian

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Mukarram
Syed
Sent: Wednesday, April 06, 2005 12:33
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Help on check_disk using the -p option.


Hi Nagios gurus.

Have a problem using check_disk with the -p option.
When I use the check_disk command in the nrpe.cfg file on the client as
shown below:

command[check_disk]=/usr/local/etc/nagios/libexec/check_disk
-w 10% -c 5% -p /dev/sda[1-6]

and when I run the check_disk command from the nagios
server:

# /usr/local/etc/nagios/libexec/check_nrpe -H pegasus -c check_disk I
get the output as:

DISK OK [74748 kB (77%) free on /dev/sda1]

It does not show the rest of the partitions (2 through 6).  It only
takes sda1.
Anything else I may be missing on this.

I tried to specify individual disk partitons like so:
# Disk Checking:

# sda
command[check_disk]=/usr/local/etc/nagios/libexec/check_disk
-w 10% -c 5% -p /dev/sda1
command[check_disk]=/usr/local/etc/nagios/libexec/check_disk
-w 10% -c 5% -p /dev/sda2
command[check_disk]=/usr/local/etc/nagios/libexec/check_disk
-w 10% -c 5% -p /dev/sda3
command[check_disk]=/usr/local/etc/nagios/libexec/check_disk
-w 10% -c 5% -p /dev/sda5
command[check_disk]=/usr/local/etc/nagios/libexec/check_disk
-w 10% -c 5% -p /dev/sda6

but the check_disk only looks at the last partiton like so:
# /usr/local/etc/nagios/libexec/check_nrpe -H pegasus -c check_disk I
get the output as:

DISK OK [104748 kB (66%) free on /dev/sda6]

Anything I might be missing on this or is there a better way to use the
-p option in the check_disk.  
Or should I specify more options in the
checkcommands.cfg file.  My check_nrpe portion in the checkcommands.cfg
file is shown below:
# 'check_nrpe' command definition
define command{
        command_name    check_nrpe
        command_line   
/usr/local/etc/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

If I add more arguments in the check_nrpe portion of my
checkcommands.cfg file, all nrpe checks fail (for load and disk).  I
tried that once a few days ago.

Or should I do something in the services.cfg file?
Here is a clipping of the check_disk portion of my services.cfg file:
# Service definition
define service{
        use                            
generic-service         ; Name of service template to
use
        hostgroup_name                 
computer-distopias
        service_description             Disk
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  unix-team
        notification_interval           240
        notification_period             24x7
        notification_options            w,c,r
        check_command                  
check_nrpe!check_disk
        }

Thanks for the help in advance.
-Mukarram Syed.



		
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide Read honest & candid
reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list