Shyam Sreevalsan ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
..
adaptec_raid ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
alarms ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
am2320 ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
anomalies ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
beanstalk ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
bind_rndc ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
boinc ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
ceph ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
changefinder ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
dovecot ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
example e9af618081 Make the title metadata H1 in all markdown files (#14625) 2 years ago
exim ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
fail2ban ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
gearman ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
go_expvar ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
haproxy ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
hddtemp ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
hpssa ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
icecast ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
ipfs ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
litespeed ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
megacli ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
memcached ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
monit ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
nsd ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
nvidia_smi ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
openldap ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
oracledb ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
pandas d4da2994d3 Fix links in README.md (#14794) 1 year ago
postfix ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
puppet ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
python_modules 49363f50c8 feat(python.d): respect NETDATA_INTERNALS_MONITORING (#13793) 2 years ago
rethinkdbs ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
retroshare ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
riakkv ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
samba ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
sensors ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
smartd_log ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
spigotmc ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
squid ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
tomcat ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
tor ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
traefik ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
uwsgi ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
varnish ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
w1sensor ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
zscores ff15cc2a00 Updates to metadata.yaml (#15452) 1 year ago
Makefile.am c50c34e905 remove deprecated python.d collectors announced in v1.38.0 (#14454) 2 years ago
README.md f8a0558a94 Update learn path of python plugin readme (#14549) 2 years ago
python.d.conf c50c34e905 remove deprecated python.d collectors announced in v1.38.0 (#14454) 2 years ago
python.d.plugin.in c0d9b982ee chore(python.d): rename dockerd job on lock registration (#13537) 2 years ago

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.