]> arthur.barton.de Git - netdata.git/commitdiff
fix issues with jobs not showing in dashboard
authorpaulfantom <paulfantom@gmail.com>
Wed, 6 Jul 2016 19:33:14 +0000 (21:33 +0200)
committerpaulfantom <paulfantom@gmail.com>
Wed, 6 Jul 2016 19:33:14 +0000 (21:33 +0200)
python.d/python_modules/base.py

index c025f16dae4cb298633e83d7ac5d2bec95256ae5..d2015711c3903eadf7630dafdcfa9b78abd89472 100644 (file)
@@ -330,11 +330,7 @@ class SimpleService(BaseService):
         idx = 0
         for name in self.order:
             options = self.definitions[name]['options'] + [self.priority + idx, self.update_every]
-            if self.name == "":
-                type_id = self.__module__
-            else:
-                type_id = self.__module__ + "_" + self.name
-            self.chart(type_id + "." + name, *options)
+            self.chart(self.chart_name + "." + name, *options)
             # check if server has this datapoint
             for line in self.definitions[name]['lines']:
                 if line[0] in data:
@@ -356,11 +352,7 @@ class SimpleService(BaseService):
 
         updated = False
         for chart in self.order:
-            if str(self.name) == "":
-                type_id = self.__module__
-            else:
-                type_id = self.__module__ + "_" + self.name
-            if self.begin(type_id + "." + chart, interval):
+            if self.begin(self.chart_name + "." + chart, interval):
                 updated = True
                 for dim in self.definitions[chart]['lines']:
                     try:
@@ -417,6 +409,7 @@ class UrlService(SimpleService):
             self.name = 'local'
         else:
             self.name = str(self.name)
+        self.chart_name += "_" + self.name
         try:
             self.url = str(self.configuration['url'])
         except (KeyError, TypeError):