Monitoring capabilities question
Aaron M. Segura
aaron.segura at cabelas.com
Thu Jun 19 15:22:37 CEST 2008
Correction --
Exit Codes
0 == OK
1 == Warning
2 == Critical
On Thu, 2008-06-19 at 13:45 +0100, Matthew Macdonald-Wallace wrote:
> 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.
-------------------------------------------------------------------------
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