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