questions regarding plugins and actions

Andreas Ericsson ae at op5.se
Fri Mar 4 16:37:20 CET 2005


Russell Miller wrote:
> First question:  Is there a generic plugin framework around that I can use
> as a starting point for writing a new plugin?
> 

One exists, but I've found the functions available to be more hindrance 
than help. I'm about to write one of my own if you're interested.

> Second question:  I would like to write a plugin that monitors the last
> modified time of a file and alerts if it hasn't been modified in 60
> seconds.  Is there an existing plugin that can do this or will I need to
> write one?
> 

You'll have to write one. It shouldn't be hard though, considering 
stat(2) is SVr4, SVID, POSIX and X/OPEN compliant (i.e. ports to any os 
out of the box).

> Third question:  I would like to have nagios take an action on receiving
> such a notification in addition to alerting - I'd like it to restart a
> process (the web server process, to be exact).  Can I use one of the
> commands in the misccommands.cfg file (I think) to cause this to happen?
> 

Read up on eventhandlers.

> Essentially, my last question is more generally this:  Is there any reason
> why nagios can't be more proactive in solving problems, or is it only
> designed for notification?
>

It's a cron with rules. It runs the commands you tell it to at the time 
you want it to, if certain conditions (specified by you) are met.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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