Hi,

2011/1/24 Grégory Starck <g.sta...@gmail.com>

>
>
> 1) possibility to have nagios plugins  in python and import them instead of
> subprocess:
>
> so that the pollers/workers( or at action level ?) could simply import the
> plugin (and only once at startup) and run the check/plugin without having to
> subprocess every time so a quite big win in efficiency/performance no ?  or
> am I missing something about how it's going on ??
> already if only the ping/host checks were done like this then would'nt this
> bring a "noticable" good impact in performance ??
>
> and what about the same for the most common services ??
>

Yes, ti's a good thing, especially for pople that do mostly nrpe for
example. there is the idea
http://shinken.ideascale.com/a/dtd/Use-builtin-plugin-for-eavily-used-plugin-instead-of-fork/99531-10373for
this :) (there also a ticket in the trac).

>
>
> 2) the shinken modules (in shinken/modules/*) :
>
> I think there is possibility to factorize quite a lot also :  what about
> defining a base class for these modules ; like something like this:
>
> ### there is already a class named Module (in shinken/module.py) but I see
> it's apparently only used for "default" and undefined modules..
> ### maybe some renaming would be good then ??
> class ModuleTemplate():
>    def __init__(s,...):
>          self.interrupted = False
>           ...
>
>    def manage_brok:
>           type, manager = ...
>           f = getattr(self, manager, None)
>           if not f:
>                print(self.get_name(), "has not a manager for type", type)
>                return
>           f(b)
>
>    def manage_signal:
>          self.interrupted = True
>
>    def do_loop_turn:
>          raise UnimplementedError()
>
>    def main:
>          while not self.interrupted:
>                self.do_loop_turn()  ## like with Daemon
>
>
> and then the different modules just subclass this  and implement at least
> do_loop_turn (could reimplement "main" also if it's not good to do like
> this)..
>
> I could try to begin this work ; normally it's doable easily without
> breaking things : I begin by writing the "template" module class ; then I
> transform only one by one each module to use this base class, every time by
> checking all would be still good after a module has been so changed.
>
> Yes, it's a very good idea too. From now we have dummy modules that help
guys to start with it, but a common class with help even more :)
Maybe with a CommonModule and a module class for each daemon type.


Jean


>
> greg.
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Shinken-devel mailing list
> Shinken-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/shinken-devel
>
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to