From 7f47cb1caee9c844500d9b0609cb4e6829135825 Mon Sep 17 00:00:00 2001 From: paulfantom Date: Tue, 21 Jun 2016 13:13:35 +0200 Subject: [PATCH] information about `enabled: no` in `python.d.conf` --- conf.d/python.d.conf | 3 +++ plugins.d/python.d.plugin | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf.d/python.d.conf b/conf.d/python.d.conf index b4672211..e8f6e892 100644 --- a/conf.d/python.d.conf +++ b/conf.d/python.d.conf @@ -1,5 +1,8 @@ # This is the configuration for python.d.plugin +# Disable all python modules +enabled: no + # By default python.d.plugin enables all modules stored in python.d # Modules can be disabled with setting "module_name = no" example: no diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin index cbbcf9ea..5c6a55c2 100755 --- a/plugins.d/python.d.plugin +++ b/plugins.d/python.d.plugin @@ -117,7 +117,6 @@ class PythonCharts(object): modules_configs='../conf.d/', modules_disabled=None): """ - :param update_every: int :param modules: list :param modules_path: str :param modules_configs: str @@ -532,8 +531,8 @@ def run(): conf = read_config(configfile) if conf is not None: try: - # exit the whole plugin when 'enable: no' is set in 'python.d.conf' - if str(conf['enable']) is False: + # exit the whole plugin when 'enabled: no' is set in 'python.d.conf' + if str(conf['enabled']) is False: fatal('disabled in configuration file.\n') except (KeyError, TypeError): pass @@ -560,6 +559,7 @@ def run(): ", ONLY_MODULES=" + str(modules)) # run plugins + modules = ['phpfpm'] charts = PythonCharts(modules, MODULES_DIR, CONFIG_DIR + "python.d/", disabled) charts.check() charts.create() -- 2.39.2