]> arthur.barton.de Git - netdata.git/blob - python.d/README.md
7e74a28e15d7bfbb17bf536a7f8cc71743287567
[netdata.git] / python.d / README.md
1 # Disclaimer
2
3 **Python plugin support is experimental and implementation may change in the future**
4
5 Currently every plugin must be written in python3.
6 All third party libraries should be installed system-wide or in `python_modules` directory.
7 Also plugins support changing their data collection frequency by setting `update_every` variable in their configuration file.
8
9
10 The following python.d plugins are supported:
11
12 # mysql
13
14 The plugin will monitor one or more mysql servers
15
16 **Requirements:**
17  * python module [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
18
19 It will produce following charts (if data is available):
20
21 1. **Bandwidth** in kbps
22  * in
23  * out
24
25 2. **Queries** in queries/sec
26  * queries
27  * questions
28  * slow queries
29
30 3. **Operations** in operations/sec
31  * opened tables
32  * flush
33  * commit
34  * delete
35  * prepare
36  * read first
37  * read key
38  * read next
39  * read prev
40  * read random
41  * read random next
42  * rollback
43  * save point
44  * update
45  * write
46
47 4. **Table Locks** in locks/sec
48  * immediate
49  * waited
50
51 5. **Select Issues** in issues/sec
52  * full join
53  * full range join
54  * range
55  * range check
56  * scan
57
58 6. **Sort Issues** in issues/sec
59  * merge passes
60  * range
61  * scan
62
63 ### configuration
64
65 You can provide, per server, the following:
66
67 1. a name, anything you like, but keep it short
68 2. username which have access to database (deafults to 'root')
69 3. password (defaults to none)
70 4. mysql my.cnf configuration file
71 5. mysql socket (optional)
72 6. mysql host (ip or hostname)
73 7. mysql port (defaults to 3306)
74
75 Here is an example for 3 servers updating data every 10 seconds
76
77 ```js
78 update_every = 10
79
80 config=[
81     {
82         'name'     : 'local',
83         'my.cnf'   : '/etc/mysql/my.cnf'
84     },{
85         'name'     : 'local_2',
86         'user'     : 'root',
87         'password' : 'blablablabla',
88         'socket'   : '/var/run/mysqld/mysqld.sock'
89     },{
90         'name'     : 'remote',
91         'user'     : 'admin',
92         'password' : 'bla',
93         'host'     : 'example.org',
94         'port'     : '9000'
95     }]
96 ```
97
98 If no configuration is given, the plugin will attempt to connect to mysql server via unix socket at `/var/run/mysqld/mysqld.sock` without password and username `root`
99
100 ---
101