information about `enabled: no` in `python.d.conf`
paulfantom committed
Jun 21, 2016 at 13:13 UTC
7f47cb1caee9c844500d9b0609cb4e6829135825
2 files changed
+6
-3
conf.d/python.d.conf
+3
@@ -1,5 +1,8 @@
1
# This is the configuration for python.d.plugin
2
3
+# Disable all python modules
4
+enabled: no
5
+
6
# By default python.d.plugin enables all modules stored in python.d
7
# Modules can be disabled with setting "module_name = no"
8
example: no
plugins.d/python.d.plugin
+3
-3
@@ -117,7 +117,6 @@ class PythonCharts(object):
117
modules_configs='../conf.d/',
118
modules_disabled=None):
119
"""
120
- :param update_every: int
120
:param modules: list
121
:param modules_path: str
122
:param modules_configs: str
@@ -532,8 +531,8 @@ def run():
531
conf = read_config(configfile)
532
if conf is not None:
533
try:
535
- # exit the whole plugin when 'enable: no' is set in 'python.d.conf'
536
- if str(conf['enable']) is False:
534
+ # exit the whole plugin when 'enabled: no' is set in 'python.d.conf'
535
+ if str(conf['enabled']) is False:
536
fatal('disabled in configuration file.\n')
537
except (KeyError, TypeError):
538
pass
@@ -560,6 +559,7 @@ def run():
559
", ONLY_MODULES=" + str(modules))
560
561
# run plugins
562
+ modules = ['phpfpm']
563
charts = PythonCharts(modules, MODULES_DIR, CONFIG_DIR + "python.d/", disabled)
564
charts.check()
565
charts.create()