Check diskspace on remote machines

Andreas Ericsson ae at op5.se
Thu Oct 13 16:19:58 CEST 2005


Max wrote:
> Tedman Eng wrote:
> 
>> FAQ # F0059: How do I monitor services on remote hosts?
>>
>> http://www.nagios.org/faqs/viewfaq.php?faq_id=59&expand=false&showdesc=false 
>>
>>
>>
>> As for pointers:
>> 1. SNMP is easiest if you have it installed
> 
> 
> Is it possible using check_snmp, to have the command query the remote 
> machine, return the list of disks, and then automatically have those 
> checked for disk space?
> 

Nopes, but you should be able to write either a fairly simple wrapper 
script to do it automagically on each check, or an autoconfiguration 
tool that does it for you. sed is your friend (well, it's my friend, but 
you can borrow it if you like. ;) )

> Meaning, say I have / /home /var /opt that I would like to monitor. As 
> it stands now, I have a command defined below:
> 
> define command{
>         command_name    snmp_disk
>         command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C public -o 
> UCD-SNMP-MIB::dskAvail.$ARG1$,UCD-SNMP-MIB::dskPercent.$ARG1$ -w 90:,:90 
> -c 95:,:95 -u 'kB free (','% used)' -l 'Disk space' -o 
> UCD-SNMP-MIB::dskPath.$ARG1$
> 
> This works great and returns "Disk space OK - 2868624 kB free ( 27 % 
> used) /", which is reading the snmpd.conf file where "/" is my first 
> disk to be listed as sysroot.
> 
> Basically, I want to be able to add a host, tell Nagios to check the 
> host's disks automatically by polling the remote machine, and then 
> return it's information back with all of the disks and space used. The 
> reason for this is because I have a ton of machines with a not so 
> standard disk and partition layout. One machine might have it's usual 
> /home /opt /var, one might have things being mounted and used on 
> different things.
> 
> Max
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> 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
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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