summaryrefslogtreecommitdiffstats
path: root/plugins.d/python.d.plugin
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
committerLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
commita133c9c3b637b1dbe7b5b053f7e2572c1950cead (patch)
tree2207939a88e96bca329457f40a9d9d18ab659dc1 /plugins.d/python.d.plugin
parentNew upstream version 1.6.0+dfsg (diff)
downloadnetdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.tar.xz
netdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.zip
New upstream version 1.7.0+dfsgupstream/1.7.0+dfsg
Diffstat (limited to 'plugins.d/python.d.plugin')
-rwxr-xr-xplugins.d/python.d.plugin19
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin
index efa62cbc5..03c156f41 100755
--- a/plugins.d/python.d.plugin
+++ b/plugins.d/python.d.plugin
@@ -20,8 +20,11 @@ BASE_CONFIG = {'update_every': os.getenv('NETDATA_UPDATE_EVERY', 1),
'retries': 10}
MODULES_DIR = os.path.abspath(os.getenv('NETDATA_PLUGINS_DIR',
- os.path.dirname(__file__)) + "/../python.d") + "/"
-CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', "/etc/netdata/")
+ os.path.dirname(__file__)) + "/../python.d") + "/"
+
+CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR',
+ os.path.dirname(__file__) + "/../../../../etc/netdata")
+
# directories should end with '/'
if CONFIG_DIR[-1] != "/":
CONFIG_DIR += "/"
@@ -307,7 +310,7 @@ class PythonCharts(object):
("/" + str(name) if name is not None else "") +
": cannot start job: '" +
str(e))
- return None
+ continue
else:
# set chart_name (needed to plot run time graphs)
job.chart_name = module.__name__
@@ -460,11 +463,11 @@ def read_config(path):
config = ordered_load(stream, yaml.SafeLoader)
else:
config = yaml.load(stream)
- except (OSError, IOError):
- msg.error(str(path), "is not a valid configuration file")
+ except (OSError, IOError) as error:
+ msg.error(str(path), 'reading error:', str(error))
return None
- except yaml.YAMLError as e:
- msg.error(str(path), "is malformed:", e)
+ except yaml.YAMLError as error:
+ msg.error(str(path), "is malformed:", str(error))
return None
return config
@@ -516,7 +519,7 @@ def run():
global DEBUG_FLAG, TRACE_FLAG, BASE_CONFIG
# read configuration file
- disabled = ['nginx_log', 'gunicorn_log']
+ disabled = ['nginx_log', 'gunicorn_log', 'apache_cache']
enabled = list()
default_run = True
configfile = CONFIG_DIR + "python.d.conf"