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