summaryrefslogtreecommitdiffstats
path: root/plugins.d/python.d.plugin
diff options
context:
space:
mode:
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"