]> arthur.barton.de Git - netdata.git/commitdiff
notify user when sth wrong in update()
authorpaulfantom <paulfantom@gmail.com>
Sun, 12 Jun 2016 12:34:01 +0000 (14:34 +0200)
committerpaulfantom <paulfantom@gmail.com>
Sun, 12 Jun 2016 12:34:01 +0000 (14:34 +0200)
plugins.d/python.d.plugin

index 9e7c33ab80a429e6705dcb51b5cfa5cea67be28e..167e6e3db2943320d3c373cad54f8f0a7a958da6 100755 (executable)
@@ -128,7 +128,7 @@ class PythonCharts(object):
                   mod.__name__ +
                   ".conf' not found. Using defaults.")
         elif reason[:11] == "misbehaving":
-            debug(mod.__name__, "is misbeaving. Disabling it")
+            debug(mod.__name__, "is "+reason)
 
     def check(self):
         for mod in self.modules:
@@ -178,8 +178,8 @@ class PythonCharts(object):
         except AttributeError:
             self.disable_module(mod, "no update")
             return
-        except (UnboundLocalError, Exception):
-            self.disable_module(mod, "misbehaving")
+        except (UnboundLocalError, Exception) as e:
+            self.disable_module(mod, "misbehaving. Reason: " + str(e))
             return
         t_end = time.time()
         self.timetable[mod.__name__]['next'] = t_end - (t_end % self.timetable[mod.__name__]['freq']) + self.timetable[mod.__name__]['freq']