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