With user netdata, if I want to test a python module, I run: netdata@kazoo:/usr/lib/x86_64-linux-gnu/netdata$ ./plugins.d/python.d.plugin 1 debug trace mdstat Traceback (most recent call last): File "./plugins.d/python.d.plugin", line 31, in <module> from bases.loaders import ModuleAndConfigLoader File "/usr/lib/x86_64-linux-gnu/netdata/python.d/python_modules/bases/loaders.py", line 15, in <module> from pyyaml2 import SafeLoader as YamlSafeLoader ImportError: No module named pyyaml2
According the file "/usr/lib/x86_64-linux-gnu/netdata/python.d/python_modules/bases/loaders.py", python2 module require pyyaml2 and python3 module require pyyaml3. Import thing, I modified "/usr/lib/x86_64-linux-gnu/netdata/plugins.d/python.d.plugin" in order to fix the path of "PLUGIN_CONFIG_DIR". Le mardi 6 février 2018, 17:41:24 CET Lennart Weller a écrit : > It does depend on pyyaml3. > > Quote from your submitted bugreport: > > Versions of packages netdata depends on: > > ii python3-yaml 3.12-1+b1 > > On 05/02/2018 11:53, Guillaume Clercin wrote: > > Package: netdata > > Version: 1.9.0+dfsg-1 > > Severity: important > > > > Dear Maintainer, > > > > After upgrading netdata, no python modules were enabled. Python modules > > required pyyaml2 or (pyyaml3 maybe) in order to run. These packages > > should be provided by netdata. They are available here: > > https://github.com/firehol/netdata/tree/v1.9.0/python.d/python_modules > > > > Please, package them into netdata packages. > > > > > > -- System Information: > > Debian Release: buster/sid > > > > APT prefers testing > > APT policy: (500, 'testing'), (500, 'stable') > > > > Architecture: amd64 (x86_64) > > > > Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores) > > Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE= > > (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash > > Init: systemd (via /run/systemd/system) > > > > Versions of packages netdata depends on: > > ii adduser 3.117 > > ii libc6 2.26-6 > > ii libcap2-bin 1:2.25-1.2 > > ii libuuid1 2.30.2-0.3 > > ii lsb-base 9.20170808 > > ii netdata-data 1.9.0+dfsg-1 > > ii python3 3.6.4-1 > > ii python3-urllib3 1.22-1 > > ii python3-yaml 3.12-1+b1 > > ii zlib1g 1:1.2.8.dfsg-5 > > > > Versions of packages netdata recommends: > > ii curl 7.58.0-2 > > pn fping <none> > > ii nodejs 4.8.4~dfsg-1 > > > > netdata suggests no packages. > > > > -- Configuration Files: > > /etc/netdata/health_alarm_notify.conf changed [not included] > > /etc/netdata/netdata.conf changed [not included] > > /etc/netdata/python.d/postgres.conf changed [not included] > > > > -- no debconf information
--- /usr/lib/x86_64-linux-gnu/netdata/plugins.d/python.d.plugin 2018-02-07 12:08:20.280526465 +0100 +++ /usr/lib/x86_64-linux-gnu/netdata/plugins.d/python.d.plugin 2018-01-27 22:30:16.630789251 +0100 @@ -21,7 +21,7 @@ from time import time PY_VERSION = version_info[:2] -PLUGIN_CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', os.path.dirname(__file__) + '/../../../../etc/netdata') + '/' +PLUGIN_CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', os.path.dirname(__file__) + '/../../../../../etc/netdata') + '/' CHARTS_PY_DIR = os.path.abspath(os.getenv('NETDATA_PLUGINS_DIR', os.path.dirname(__file__)) + '/../python.d') + '/' CHARTS_PY_CONFIG_DIR = PLUGIN_CONFIG_DIR + 'python.d/' PYTHON_MODULES_DIR = CHARTS_PY_DIR + 'python_modules'
signature.asc
Description: This is a digitally signed message part.