Question on Using check_disk for multiple partitions

Andreas Ericsson ae at op5.se
Thu Sep 9 02:09:52 CEST 2010


On 09/08/2010 10:54 PM, steve f wrote:
> 
> I have a need to check about 10 server partitions on 1200 servers in
> a distributed Nagios environment.  Down the road, I would probably
> use event handlers to correct known space issues for certain
> partitions.
> 
> My question is is it significantly more efficient to check all of the
> partitions in a single check or seperate checks ?

A single check is significantly more efficient. You would save 9*1200
service check executions per interval period.

OTOH, some partitions may be unimportant and not in need of checking
as often or with the same autoclean / notification setup.

I guess you'll be managing services via hostgroup directives anyway,
so configuration shouldn't be all that tricksy no matter which route
you choose.


>  All of the servers
> being checked are identical in configuration&  build and all have the
> same partitions.
> 
> If I run this service check :
> 
> check_command
> check_space!15%!10%!/opt!/tmp!/VMware!/test!/var!/work!/steve!/partition1
>
>  With this in commands.cfg :
> 
> define command {
> 
> command_name    check_space
> 
> command_line    $USER1$/check_by_ssh -H $HOSTNAME$ -C
> "/usr/local/nagios /libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
> -p $ARG4$ -p $ARG5$ -p $ARG6$ -p $ARG7$ -p $ARG8$" -q
> 
> }
> 
> This does work,  but I am wondering if I am running the check 1x for
> each partition listed or is it running 1x and giving me back all
> partition info. ( kind of like a df -h )
> 

You're running the check once and giving you all partition info at once.

> Also, if I run it like this, is there an easy way to configure event
> handlers to run for the specific partition that has alerted?  Since a
> space issue in /tmp is not due to the same issue that /work fills
> up.
> 

I think eventhandlers can get the plugin output to act on. Otherwise,
set up one check for the partitions that can be autocleaned and one for
the partitions that can't.

The docs should be useful in verifying my assumption, so sneak a peek
at them when you have time for it.

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

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
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