diff options
Diffstat (limited to 'src/collectors/python.d.plugin/README.md')
-rw-r--r-- | src/collectors/python.d.plugin/README.md | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/src/collectors/python.d.plugin/README.md b/src/collectors/python.d.plugin/README.md index 299cebc03..f8d4184e8 100644 --- a/src/collectors/python.d.plugin/README.md +++ b/src/collectors/python.d.plugin/README.md @@ -1,22 +1,13 @@ -<!-- -title: "python.d.plugin" -custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/README.md" -sidebar_label: "python.d.plugin" -learn_status: "Published" -learn_topic_type: "Tasks" -learn_rel_path: "Developers/External plugins/python.d.plugin" ---> - # 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 +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 @@ -25,7 +16,7 @@ Module configurations are written in YAML and **pyYAML is required**. Every configuration file must have one of two formats: -- Configuration for only one job: +- Configuration for only one job: ```yaml update_every : 2 # update frequency @@ -35,7 +26,7 @@ other_var1 : bla # variables passed to module other_var2 : alb ``` -- Configuration for many jobs (ex. mysql): +- Configuration for many jobs (ex. mysql): ```yaml # module defaults: @@ -55,23 +46,19 @@ other_job: ## How to debug a python module -``` +```bash # 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: -``` +```bash # 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/src/collectors/python.d.plugin> +Where `[module]` is the directory name under <https://github.com/netdata/netdata/tree/master/src/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](https://github.com/netdata/netdata/edit/master/docs/developer-and-contributor-corner/python-collector.md). |