Ilya Mashchenko 88d71a9755 fix hpssa handle unassigned drives (#15793) 1 год назад
..
adaptec_raid 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
alarms 9f0dfb57ad Fix name in the yaml of example python collector (#15646) 1 год назад
am2320 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
anomalies 7b094b53d9 comment out anomalies metadata and add note (#15573) 1 год назад
beanstalk 296e608d3f Fix typo in categories for beanstalk collector metadata. (#15703) 1 год назад
bind_rndc 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
boinc 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
ceph 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
changefinder fac1c251d8 Update metadata.yaml (#15688) 1 год назад
dovecot 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
example 9f0dfb57ad Fix name in the yaml of example python collector (#15646) 1 год назад
exim 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
fail2ban 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
gearman 6bab67ff6c Fixing icons in netdata/netdata repo (#15647) 1 год назад
go_expvar 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
haproxy 0fb458d1b9 remove metrics.csv files (#15593) 1 год назад
hddtemp 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
hpssa 88d71a9755 fix hpssa handle unassigned drives (#15793) 1 год назад
icecast 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
ipfs 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
litespeed 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
megacli 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
memcached 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
monit 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
nsd 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
nvidia_smi 939d29e140 fix nvidia_smi power_readings for new drivers (#15759) 1 год назад
openldap 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
oracledb 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
pandas 99cb5976f9 fix pandas category (#15654) 1 год назад
postfix 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
puppet 7a67bce0b0 Update metadata.yaml (#15684) 1 год назад
python_modules 49363f50c8 feat(python.d): respect NETDATA_INTERNALS_MONITORING (#13793) 2 лет назад
rethinkdbs 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
retroshare e2797b6398 Update metadata.yaml (#15680) 1 год назад
riakkv 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
samba 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
sensors 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
smartd_log 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
spigotmc 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
squid 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
tomcat 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
tor 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
traefik 0fb458d1b9 remove metrics.csv files (#15593) 1 год назад
uwsgi 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
varnish 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
w1sensor 44807f0dab convert collectors meta files from single to multi (#15642) 1 год назад
zscores 44807f0dab convert collectors meta files from single to multi (#15642) 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.