check_disk plugin help

Marc Powell marc at ena.com
Fri Mar 4 21:16:04 CET 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of sma nagios
> Sent: Friday, March 04, 2005 2:06 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_disk plugin help
> 
> I am running the newest version of nagios (v2.0b2) on slackware 10.1
with
> plugins v1.4.
> 
> I have had most of the simple plugins working ok for weeks now
(check_ssh,
> check_http, check_imap, ...), yet I am having trouble getting
check_disk
> to work.  It always returns "DISK OK - free space: / 10687 MB (85%):"
no
> matter what valid disk I check.  That value (10687 MB) is not correct.
It
> returns the same number when I check any disk on any server.  I'm
guessing
> it's some default number.
> 
> I define the command like this:
> define command{
>         command_name    check_disk
>         command_line    $USER1$/check_disk -p $ARG1$ -w $ARG2$ -c
$ARG3$
> }
> 
> And I use the service like this:
> define service{
>         host_name                       linuxserver
>         service_description             /dev/hda2
>         check_command                   check_disk!/dev/hda2!10%!5%
>         max_check_attempts              5
>         normal_check_interval           5
>         retry_check_interval            3
>         check_period                    24x7
>         notification_interval           30
>         notification_period             24x7
>         contact_groups                  admins
>         notification_options            w,u,c,r
> }
> 
> I'm pretty sure I have to do something at the other end (the server I
am
> trying to check).  Because you can't just check a certain port to
check
> the about of space left on disk.  It seem like nagios would have to
log
> into the server or have some sort of privilege on the remote server.
The
> servers I am check are mine, so I have user access to all of them.
> 

Your assumption is correct. check-disk is a local plugin meaning it only
checks disks on the machine it's run on. You'll need to copy the plugin
to the machine you're wanting to check and use either NRPE or
check-by-ssh to actually run the plugin and return the results to
Nagios.

--
Marc



-------------------------------------------------------
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