monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit-dev] Feature suggestion: SNMP support in Monit


From: Martin Pala
Subject: Re: [monit-dev] Feature suggestion: SNMP support in Monit
Date: Sun, 4 Sep 2011 16:08:40 +0200

Hi Lior,

thank you for explaining the plan, we see the point and undestand that better SNMP support can be useful in SNMP-oriented environments.

At this point however, we prefer not to integrate Monit with Net-SNMP - our approach is to keep Monit simple with minimum dependencies on 3rd party libraries, so if everything fail, monit will keep running and will be able to report and fix problems.

To provide support for integrating monit with other systems (like SNMP), we plan to add general framework for custom actions, so it will be possible to use plugins like sending SNMP trap, SMS gateway plugin, tex-to-speach, etc. This way the plugins will be isolated and if there will be some bug let's say in Net-SNMP, it won't make Monit vulnerable nor crash it.

The user will setup the action like this:

    set action snmptrap "/usr/bin/snmptrap <options> <agent> <trap parameters>"
    set action say "/usr/bin/say $MONIT_SERVICE $MONIT_EVENT $MONIT_ACTION"

and the custom action can be used in the testing rules like this:

    if failed … then restart, snmptrap, say # note: this will restart the service, send SNMP trap and say loud what happened

The Monit MIB based OID for the given event will be available for the plugin in the environment variable like $MONIT_OID.


Best regards,

Martin



On Sep 4, 2011, at 11:46 AM, Lior Okman wrote:




On Sun, Sep 4, 2011 at 12:32 PM, Michael Shigorin <address@hidden> wrote:
It's nice in general, but when packaging, it tends to result
in "alternative builds".  I do understand that it's probably
not your objective, but knowing this can make further work
in this direction easier.


The problem is that as far as I can tell, the 5.2.x branch doesn't have any sort of plugins infrastructure, and adding one to Monit is really not in the scope of what I intend to do.

An IPC infrastructure is also problematic for me, since it means I can't use the IPC infrastructure already written by the NetSNMP project (the AgentX code), and instead I have to roll my own.
 
> Is this sufficient?

For me to enable it in ALT Linux package by default, no.
But I'll make a build-time %define knob too, of course.

That would be great. I'll set the default to disable SNMP support, so existing packages would not be affected.
 
Guess Debian or OpenWall folks might think similarly.

In Debian, there are source packages that generate multiple binary packages that are configured and built a bit differently. It should be possible for the source package to generate a "monit" binary package that is compiled without snmp, and a "monit-snmp" binary package that does provide snmp support. The user would have to choose the required package according to the deployment needs.
 
Lior
_______________________________________________
monit-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/monit-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]