check_disk plugin help

Marcel Smeets mpgsmeets at gmail.com
Fri Mar 4 21:17:30 CET 2005


It checks the disk space on the local computer!

To check a disk on a remote machine define a command with the plugin
check_by_ssh with the right parameters followed by the plugin
check_disk (which must reside on the remote machine of course) with
the right parameters.

And it works!!

for example with ssh authentication from a keypair:

# 'ssh_disk1' command definition
define command{
        command_name    ssh_disk1
                command_line    /usr/lib/nagios/plugins/check_by_ssh
-H $HOSTADDRESS$ -i $KEY -l $USERNAME -C
'/usr/local/nagios/libexec/check_disk -m -w 20% -c 10%'
                        }



On Fri, 4 Mar 2005 15:05:45 -0500, sma nagios <nagiossma at gmail.com> wrote:
> 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.
> 
> I see other people using disk_check successfully, so I know it is possible.
> I just can't find any information on how to use it right.
> 
> Can someone help me get check_disk to work?
> Any advice??
> 
> Thanks,
> Dustin Patterson
> North Carolina State University
> 
> -------------------------------------------------------
> 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_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





More information about the Users mailing list