D34DC3N73R 5b676d5f91 Add Docker instructions to enable Nvidia GPUs (#14924) 1 год назад
..
adaptec_raid 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
alarms 9385b062f6 Replace hardcoded links pointing to "learn.netdata.cloud" with github absolute links (#14779) 2 лет назад
am2320 7ca95ce4cd Include troubleshooting section in the docs of python.d modules (#13721) 2 лет назад
anomalies c8b4f19013 fix python version check to work for 3.10 and above (#14616) 2 лет назад
beanstalk 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
bind_rndc 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
boinc 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
ceph a5e23e73ca fix #14841 Exception funktion call Rados.mon_command() (#14844) 1 год назад
changefinder e9af618081 Make the title metadata H1 in all markdown files (#14625) 2 лет назад
dovecot 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
example e9af618081 Make the title metadata H1 in all markdown files (#14625) 2 лет назад
exim 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
fail2ban 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
gearman 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
go_expvar 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
haproxy 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
hddtemp 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
hpssa 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
icecast 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
ipfs 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
litespeed 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
megacli 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
memcached 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
monit 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
nsd 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
nvidia_smi 5b676d5f91 Add Docker instructions to enable Nvidia GPUs (#14924) 1 год назад
openldap 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
oracledb 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
pandas d4da2994d3 Fix links in README.md (#14794) 2 лет назад
postfix 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
puppet 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
python_modules 49363f50c8 feat(python.d): respect NETDATA_INTERNALS_MONITORING (#13793) 2 лет назад
rethinkdbs 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
retroshare 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
riakkv 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
samba 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
sensors 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
smartd_log 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
spigotmc 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
squid 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
tomcat 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
tor 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
traefik 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
uwsgi 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
varnish 0ae02c9fb6 Change H1 of collector docs to separate from the website (#14715) 2 лет назад
w1sensor 1c46b32bbe Add example configuration to w1sensor collector (#14886) 1 год назад
zscores 6016c3b5cf Docs, shorten too long titles, and add a description below (#14820) 1 год назад
Makefile.am c50c34e905 remove deprecated python.d collectors announced in v1.38.0 (#14454) 2 лет назад
README.md f8a0558a94 Update learn path of python plugin readme (#14549) 2 лет назад
python.d.conf c50c34e905 remove deprecated python.d collectors announced in v1.38.0 (#14454) 2 лет назад
python.d.plugin.in c0d9b982ee chore(python.d): rename dockerd job on lock registration (#13537) 2 лет назад

README.md

python.d.plugin

python.d.plugin is a Netdata external plugin. It is an orchestrator for data collection modules written in python.

  1. It runs as an independent process ps fax shows it
  2. It is started and stopped automatically by Netdata
  3. It communicates with Netdata via a unidirectional pipe (sending data to the netdata daemon)
  4. Supports any number of data collection modules
  5. Allows each module to have one or more data collection jobs
  6. Each job is collecting one or more metrics from a single data source

Disclaimer

All third party libraries should be installed system-wide or in python_modules directory. Module configurations are written in YAML and pyYAML is required.

Every configuration file must have one of two formats:

  • Configuration for only one job:

    update_every : 2 # update frequency
    priority     : 20000 # where it is shown on dashboard
    
    other_var1   : bla  # variables passed to module
    other_var2   : alb
    
  • Configuration for many jobs (ex. mysql):

    # module defaults:
    update_every : 2
    priority     : 20000
    
    local:  # job name
    update_every : 5 # job update frequency
    other_var1   : some_val # module specific variable
    
    other_job:
    priority     : 5 # job position on dashboard
    other_var2   : val # module specific variable
    

update_every and priority are always optional.

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.

How to write a new module

See develop a custom collector in Python.