3 **Python support is experimental and implementation may change in the future**
5 Every module 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 other_var1 : some_val # module specific variable
35 priority : 5 # job position on dashboard
36 retries : 20 # job retries
37 other_var2 : val # module specific variable
40 `update_every`, `retries`, and `priority` are always optional.
44 The following python.d modules are supported:
48 This module will monitor one or more apache servers depending on configuration.
51 * apache with enabled `mod_status`
53 It produces following charts:
55 1. **Requests** in requests/s
61 3. **Async Connections**
66 4. **Bandwidth** in kilobytes/s
73 6. **Lifetime Avg. Requests/s** in requests/s
76 7. **Lifetime Avg. Bandwidth/s** in kilobytes/s
79 8. **Lifetime Avg. Response Size** in bytes/request
84 Needs only `url` to server's `server-status?auto`
86 Here is an example for 2 servers:
93 url : 'http://localhost/server-status?auto'
97 url : 'http://www.apache.org/server-status?auto'
102 Without configuration, module attempts to connect to `http://localhost/server-status?auto`
108 Module monitors apache mod_cache log and produces only one chart:
110 **cached responses** in percent cached
123 log_path : '/var/log/apache2/cache.log'
126 If no configuration is given, module will attempt to read log file at `/var/log/apache2/cache.log`
132 Module monitors disk temperatures from one or more hddtemp daemons
135 Running `hddtemp` in daemonized mode with access on tcp port
137 It produces one chart **Temperature** with dynamic number of dimensions (one per disk)
149 If no configuration is given, module will attempt to connect to hddtemp daemon on `127.0.0.1:7634` address
155 Module monitors one or more mysql servers
158 * python library [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
160 It will produce following charts (if data is available):
162 1. **Bandwidth** in kbps
166 2. **Queries** in queries/sec
171 3. **Operations** in operations/sec
188 4. **Table Locks** in locks/sec
192 5. **Select Issues** in issues/sec
199 6. **Sort Issues** in issues/sec
206 You can provide, per server, the following:
208 1. username which have access to database (deafults to 'root')
209 2. password (defaults to none)
210 3. mysql my.cnf configuration file
211 4. mysql socket (optional)
212 5. mysql host (ip or hostname)
213 6. mysql port (defaults to 3306)
215 Here is an example for 3 servers:
223 'my.cnf' : '/etc/mysql/my.cnf'
228 password : 'blablablabla'
229 socket : '/var/run/mysqld/mysqld.sock'
240 If no configuration is given, module will attempt to connect to mysql server via unix socket at `/var/run/mysqld/mysqld.sock` without password and with username `root`
246 This module will monitor one or more nginx servers depending on configuration.
249 * nginx with configured `stub_status`
251 It produces following charts:
253 1. **Active Connections**
256 2. **Requests** in requests/s
259 3. **Active Connections by Status**
264 4. **Connections Rate** in connections/s
270 Needs only `url` to server's `stub_status`
272 Here is an example for local server:
279 url : 'http://localhost/stub_status'
283 Without configuration, module attempts to connect to `http://localhost/stub_status`
289 This module will monitor one or more php-fpm instances depending on configuration.
292 * php-fpm with enabled `status` page
293 * access to `status` page via web server
295 It produces following charts:
297 1. **Active Connections**
302 2. **Requests** in requests/s
311 Needs only `url` to server's `status`
313 Here is an example for local instance:
320 url : 'http://localhost/status'
324 Without configuration, module attempts to connect to `http://localhost/status`
330 This module will monitor one or more squid instances depending on configuration.
332 It produces following charts:
334 1. **Client Bandwidth** in kilobits/s
339 2. **Client Requests** in requests/s
344 3. **Server Bandwidth** in kilobits/s
348 4. **Server Requests** in requests/s
358 request : 'cache_object://localhost:3128/counters'
363 Without any configuration module will try to autodetect where squid presents its `counters` data