@cryptotaxi247 / netdata-1 / commits / 1f58dd308

Update python.d readme (#4905)

Add link to the example plugin. Move PR checklist to the end (better flow)

Chris Akritidis committed Dec 4, 2018 at 10:45 UTC 1f58dd308accf31fb241cc3f687de62ee66999cc
1 file changed +17 -16
collectors/python.d.plugin/README.md
+17 -16
@@ -9,21 +9,6 @@
9 5. Allows each **module** to have one or more data collection **jobs**
10 6. Each **job** is collecting one or more metrics from a single data source
11
12 -## Pull Request Checklist for Python Plugins
13 -
14 -This is a generic checklist for submitting a new Python plugin for Netdata. It is by no means comprehensive.
15 -
16 -At minimum, to be buildable and testable, the PR needs to include:
17 -
18 -* The module itself, following proper naming conventions: `python.d/<module_dir>/<module_name>.chart.py`
19 -* A README.md file for the plugin under `python.d/<module_dir>`.
20 -* The configuration file for the module: `conf.d/python.d/<module_name>.conf`. Python config files are in YAML format, and should include comments describing what options are present. The instructions are also needed in the configuration section of the README.md
21 -* A basic configuration for the plugin in the appropriate global config file: `conf.d/python.d.conf`, which is also in YAML format. Either add a line that reads `# <module_name>: yes` if the module is to be enabled by default, or one that reads `<module_name>: no` if it is to be disabled by default.
22 -* A line for the plugin in `python.d/Makefile.am` under `dist_python_DATA`.
23 -* A line for the plugin configuration file in `conf.d/Makefile.am`, under `dist_pythonconfig_DATA`
24 -* Optionally, chart information in `web/dashboard_info.js`. This generally involves specifying a name and icon for the section, and may include descriptions for the section or individual charts.
25 -
26 -
12 ## Disclaimer
13
14 Every module should be compatible with python2 and python3.
@@ -87,7 +72,9 @@ Writing new python module is simple. You just need to remember to include 5 majo
72 - **_get_data** method
73 - all code needs to be compatible with Python 2 (**≥ 2.7**) *and* 3 (**≥ 3.1**)
74
90 -If you plan to submit the module in a PR, make sure and go through the [PR checklist for new modules](#pull-request-checklist-for-python-plugins) beforehand to make sure you have updated all the files you need to.
75 +If you plan to submit the module in a PR, make sure and go through the [PR checklist for new modules](#pull-request-checklist-for-python-plugins) beforehand to make sure you have updated all the files you need to.
76 +
77 +For a quick start, you can look at the [example plugin](https://github.com/netdata/netdata/blob/master/collectors/python.d.plugin/example/example.chart.py).
78
79 ### Global variables `ORDER` and `CHART`
80
@@ -223,3 +210,17 @@ Sockets are accessed in non-blocking mode with 15 second timeout.
210 After every execution of `_get_raw_data` socket is closed, to prevent this module needs to set `_keep_alive` variable to `True` and implement custom `_check_raw_data` method.
211
212 `_check_raw_data` should take raw data and return `True` if all data is received otherwise it should return `False`. Also it should do it in fast and efficient way.
213 +
214 +## Pull Request Checklist for Python Plugins
215 +
216 +This is a generic checklist for submitting a new Python plugin for Netdata. It is by no means comprehensive.
217 +
218 +At minimum, to be buildable and testable, the PR needs to include:
219 +
220 +* The module itself, following proper naming conventions: `python.d/<module_dir>/<module_name>.chart.py`
221 +* A README.md file for the plugin under `python.d/<module_dir>`.
222 +* The configuration file for the module: `conf.d/python.d/<module_name>.conf`. Python config files are in YAML format, and should include comments describing what options are present. The instructions are also needed in the configuration section of the README.md
223 +* A basic configuration for the plugin in the appropriate global config file: `conf.d/python.d.conf`, which is also in YAML format. Either add a line that reads `# <module_name>: yes` if the module is to be enabled by default, or one that reads `<module_name>: no` if it is to be disabled by default.
224 +* A line for the plugin in `python.d/Makefile.am` under `dist_python_DATA`.
225 +* A line for the plugin configuration file in `conf.d/Makefile.am`, under `dist_pythonconfig_DATA`
226 +* Optionally, chart information in `web/dashboard_info.js`. This generally involves specifying a name and icon for the section, and may include descriptions for the section or individual charts.