configurable "chart_cleanup" option added (default is 10)
lgz committed
Nov 3, 2017 at 11:50 UTC
b39c182087c11f2ef484dc4f0577bdad2bf2588b
1 file changed
+4
-5
plugins.d/python.d.plugin
+4
-5
@@ -41,6 +41,7 @@ BASE_CONFIG = {'update_every': os.getenv('NETDATA_UPDATE_EVERY', 1),
41
'retries': 60,
42
'priority': 60000,
43
'autodetection_retry': 0,
44
+ 'chart_cleanup': 10,
45
'name': str()}
46
47
@@ -173,16 +174,14 @@ class Module(object):
174
initialized_job = self.service.Service(configuration=job_config)
175
except Exception as error:
176
Logger.error("job initialization: '{module_name} {job_name}' "
176
- "=> [{status}] ({error})".format(status='FAILED',
177
- module_name=self.name,
177
+ "=> ['FAILED'] ({error})".format(module_name=self.name,
178
job_name=job_name,
179
error=error))
180
continue
181
else:
182
Logger.debug("job initialization: '{module_name} {job_name}' "
183
- "=> [{status}]".format(status='OK',
184
- module_name=self.name,
185
- job_name=job_name or self.name))
183
+ "=> ['OK']".format(module_name=self.name,
184
+ job_name=job_name or self.name))
185
self.jobs[job_id] = Job(initialized_job=initialized_job,
186
job_id=job_id)
187
del self.config