Monitoring capabilities question

Matthew Macdonald-Wallace lists at truthisfreedom.org.uk
Thu Jun 19 14:45:49 CEST 2008


On Thu, 19 Jun 2008 05:34:26 -0700 (PDT)
Jim Miller <jim.miller74 at yahoo.com> wrote:

> Does anyone know, is Nagios capable of monitoring object counts
> within a folder?

If you can provide it with that data then yes, I can't see why not.

Write a script similar to the following:



===============================================
count the objects in this folder

if the number of objects is higher than "a" then Return the number of
objects found and exitcode = 1
if the number of objects is higher than "b" then Return the number of
objects found and exitcode = 2
if the number of objects is higher than "c" then Return the number of
objects found and exitcode = 3
==============================================

This will allow you to set OK, critical and warning levels for the
number of files if you wish.  If not, ensure that your app exits with
an exit code of 1 and it will always show as OK.

HTH,

M.
-- 
Matthew Macdonald-Wallace
matthew at truthisfreedom.org.uk
http://www.truthisfreedom.org.uk

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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