Hello,

On Wed, Feb 09, 2011 at 08:11:29AM +0100, nap wrote:
> I think it's an interesting idea. Why not put just an "on_error :
> 'kill|restart|bypass' state for the module configuration ?
> 
> If it's in internal, the standard is kill. External can take this parameter
> and manage it if they want.
> 
> restart mean that if it crash (exception raised on internal, or process die
> on external) it just call quit() of the module (so it close files and co)
> and then re-init it.
> 
> By pass should be available only for internal ones (bypass is non sense for
> externals), it means that it will just do as the exception was not here (and
> pray :p ).
> 
> We can add another property too :
> * optionnal = 0|1 (0 by default?)

optional, please.

> If it's optionnal, the killing of the module or the no-instanciation will
> make the whole module in error. If it's the livestatus for example, you
> don't care if the broker is still alive or not, it's not useless for you
> (maybe only for logs, so you wait a little before put you in no
> configuration acceptance).
> 
> I think we cover all cases with theses 2 parameters, and they are both on
> the modules, so on the global configuration part, it's more easy to manage
> :)

Sounds good, especialy having the params in the module config.

Generally, when external libraries are included, you will also have things
like increasing resource utilisation (eating up of memory or filedescriptors
etc.), so an apache like "restart after processing n requests" is
probably a nice to have. 

This is also needed for inlining checks with python modules (a very good 
thing btw.).

Attached is a patch for a few typos I found during code reading.

Thanks,
  Hermann

-- 
Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres 
Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg
IWR; INF 368; 69120 Heidelberg; Tel: (06221)54-8236 Fax: -5224
Email: hermann.la...@iwr.uni-heidelberg.de
# HG changeset patch
# User hermann.la...@iwr.uni-heidelberg.de
# Date 1296582125 -3600
# Node ID 7e5638a314e3c6ac0794e8994a505b5480d52c7d
# Parent  ec8b7867b9dc2625dc5f474d10ed3ee422d584c2
minor typos

diff --git a/shinken/modules/host_perfdata_broker/__init__.py 
b/shinken/modules/host_perfdata_broker/__init__.py
--- a/shinken/modules/host_perfdata_broker/__init__.py
+++ b/shinken/modules/host_perfdata_broker/__init__.py
@@ -35,7 +35,7 @@
     try:
         from host_perfdata_broker import Host_perfdata_broker
     except ImportError , exp:
-        print "Warning : the plugin type %s is unavalable : %s" % (get_type(), 
exp)
+        print "Warning : the plugin type %s is unavailable : %s" % 
(get_type(), exp)
         return None
 
 
diff --git a/shinken/scheduler.py b/shinken/scheduler.py
--- a/shinken/scheduler.py
+++ b/shinken/scheduler.py
@@ -687,14 +687,14 @@
     # Called every 1sec to consume every result in services or hosts
     # with theses results, they are OK, CRITCAL, UP/DOWN, etc...
     def consume_results(self):
-        # All results are in self.waiting_results
-        # We need to get thems first
+        #All results are in self.waiting_results
+        #We need to get them first
         for c in self.waiting_results:
             self.put_results(c)
         self.waiting_results = []
 
-        # Then we consume thems
-        # print "**********Consume*********"
+        #Then we consume them
+        #print "**********Consume*********"
         for c in self.checks.values():
             if c.status == 'waitconsume':
                 item = c.ref
diff --git a/shinken/worker.py b/shinken/worker.py
--- a/shinken/worker.py
+++ b/shinken/worker.py
@@ -199,7 +199,7 @@
             msg = None
             cmsg = None
 
-            # If we are diyin (big problem!) we do not
+            # If we are dying (big problem!) we do not
             # take new jobs, we just finished the current one
             if not self.i_am_dying:
                 #REF: doc/shinken-action-queues.png (3)
@@ -213,13 +213,13 @@
             try:
                 cmsg = c.get(block=False)
                 if cmsg.get_type() == 'Die':
-                    print "[%d]Dad say we are diing..." % self.id
+                    print "[%d]Dad say we are dying..." % self.id
                     break
             except :
                 pass
 
             if self._mortal == True and self._idletime > 2 * self._timeout:
-                print "[%d]Timeout, Arakiri" % self.id
+                print "[%d]Timeout, Harakiri" % self.id
                 #The master must be dead and we are loonely, we must die
                 break
 
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to