Дебаг плагинов python.d#

How to debug a python module#

# become user netdata  
sudo su -s /bin/bash netdata

Depending on where Netdata was installed, execute one of the following commands to trace the execution of a python module:

# execute the plugin in debug mode, for a specific module

/opt/netdata/usr/libexec/netdata/plugins.d/python.d.plugin \
  <module> debug trace

/usr/libexec/netdata/plugins.d/python.d.plugin \
  <module> debug trace

Where [module] is the directory name under https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin

Note

If you would like execute a collector in debug mode while it is still running by Netdata, you can pass the nolock CLI option to the above commands.

Пример для модуля web_log:#

/usr/libexec/netdata/plugins.d/python.d.plugin \
  web_log trace debug