Monitor Disk Drive

Palle L Jensen palleje at gmail.com
Mon Feb 2 16:31:38 CET 2009


Martyn,

 

Running Nagios 3.01 - This is how I monitor different disk drives on windows
machines, using NSClient++.

 

Example C and F: drives:

 

I define a command(s) in commands.cfg, like this:

 

# Define command for disk space on C:           ---#

define command{

command_name  check_diskc

command_line  $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$ -s
$USER7$

       }

 

# Define command for disk space on F:           ---#

define command{

command_name  check_diskf

command_line  $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$ -s
$USER7$

       }

 

In services.cfg I define the checks:

 

# Monitoring Disk Usage C:\

define service {

use                  generic-service

host_name            hostname

service_description  Disk-C

servicegroups        disks

action_url
nagiosserver/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=Disk-
C

check_command        check_diskc!USEDDISKSPACE!-l c -w 95 -c 98

       }

 

# Monitoring Disk Usage F:\

define service {

use                  generic-service

host_name            hostname

service_description  Disk-F

servicegroups        disks

action_url
nagiosserver/nagios/cgi-bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=Disk-
F

check_command        check_diskf!USEDDISKSPACE!-l c -w 95 -c 98

}

 

 

Hope that helps!

 

Thanks,

PJ

 

 

 

 

  _____  

From: Martyn [mailto:martyn at chetnet.co.uk] 
Sent: Monday, February 02, 2009 9:13 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Monitor Disk Drive

 

How do I monitor another disk drive other that c:\ 

Below is the script to monitor the C:\ drive so I assumed I changed the c to
a f which is my other drive but Nagios will not restart.

define service{ 
        use                     generic-service 
        host_name                       winserver 
        service_description     C:\ Drive Space 
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90 
        } 

 

define service{ 
        use                     generic-service 
        host_name                       winserver 
        service_description     F:\ Drive Space 
        check_command           check_nt!USEDDISKSPACE!-l f -w 80 -c 90 
        } 

Thanks 

Martyn 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090202/76c6a31d/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
-------------- next part --------------
_______________________________________________
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