3 **Python plugin support is experimental and implementation may change in the future**
5 Every plugin should be compatible with python2 and python3.
6 All third party libraries should be installed system-wide or in `python_modules` directory.
7 Module configurations are written in YAML and **pyYAML is required**.
9 Every configuration file must have one of two formats:
11 - Configuration for only one job:
14 update_every : 2 # update frequency
15 retries : 1 # how many failures in update() is tolerated
16 priority : 20000 # where it is shown on dashboard
18 other_var1 : bla # variables passed to module
22 - Configuration for many jobs (ex. mysql):
31 update_every : 5 # job update frequency
32 retries : 2 # job retries
33 other_var1 : some_val # module specific variable
36 priority : 5 # job position on dashboard
37 retries : 20 # job retries
38 other_var2 : val # module specific variable
41 `update_every`, `retries`, and `priority` are always optional.
45 The following python.d plugins are supported:
49 The plugin will monitor one or more mysql servers
52 * python module [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
54 It will produce following charts (if data is available):
56 1. **Bandwidth** in kbps
60 2. **Queries** in queries/sec
65 3. **Operations** in operations/sec
82 4. **Table Locks** in locks/sec
86 5. **Select Issues** in issues/sec
93 6. **Sort Issues** in issues/sec
100 You can provide, per server, the following:
102 1. a name, anything you like, but keep it short
103 2. username which have access to database (deafults to 'root')
104 3. password (defaults to none)
105 4. mysql my.cnf configuration file
106 5. mysql socket (optional)
107 6. mysql host (ip or hostname)
108 7. mysql port (defaults to 3306)
110 Here is an example for 3 servers:
118 'my.cnf' : '/etc/mysql/my.cnf'
123 password : 'blablablabla'
124 socket : '/var/run/mysqld/mysqld.sock'
135 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 with username `root`