1 # netdata python.d.plugin configuration for mysql
3 # This file is in YaML format. Generally the format is:
7 # There are 2 sections:
11 # JOBS allow you to collect values from multiple sources.
12 # Each source will have its own set of charts.
14 # JOB parameters have to be indented (using spaces only, example below).
16 # ----------------------------------------------------------------------
18 # These variables set the defaults for all JOBs, however each JOB
19 # may define its own, overriding the defaults.
21 # update_every sets the default data collection frequency.
22 # If unset, the python.d.plugin default is used.
25 # priority controls the order of charts at the netdata dashboard.
26 # Lower numbers move the charts towards the top of the page.
27 # If unset, the default for python.d.plugin is used.
30 # retries sets the number of retries to be made in case of failures.
31 # If unset, the default for python.d.plugin is used.
32 # Attempts to restore the service are made once every update_every
33 # and only if the module has collected values in the past.
36 # ----------------------------------------------------------------------
37 # JOBS (data collection sources)
39 # The default JOBS share the same *name*. JOBS with the same name
40 # are mutually exclusive. Only one of them will be allowed running at
41 # any time. This allows autodetection to try several alternatives and
42 # pick the one that works.
44 # Any number of jobs is supported.
46 # All python.d.plugin JOBS (for all its modules) support a set of
47 # predefined parameters. These are:
50 # name: myname # the JOB's name as it will appear at the
51 # # dashboard (by default is the job_name)
52 # # JOBs sharing a name are mutually exclusive
53 # update_every: 1 # the JOB's data collection frequency
54 # priority: 60000 # the JOB's order on the dashboard
55 # retries: 5 # the JOB's number of restoration attempts
57 # Additionally to the above, mysql also supports the following:
59 # socket: 'path/to/mysql.sock'
62 # host: 'IP or HOSTNAME' # the host to connect to
63 # port: PORT # the port to connect to
65 # in all cases, the following can also be set:
67 # user: 'username' # the mysql username to use
68 # pass: 'password' # the mysql password to use
71 # ----------------------------------------------------------------------
74 # netdata does not need any privilege - only the ability to connect
75 # to the mysql server (netdata will not be able to see any data).
77 # Execute these commands to give the local user 'netdata' the ability
78 # to connect to the mysql server on localhost, without a password:
80 # > create user 'netdata'@'localhost';
81 # > grant usage on *.* to 'netdata'@'localhost' with grant option;
84 # with the above statements, netdata will be able to gather mysql
85 # statistics, without the ability to see or alter any data or affect
86 # mysql operation in any way. No change is required below.
88 # ----------------------------------------------------------------------
90 # only one of them will run (they have the same name)
94 'my.cnf' : '/etc/my.cnf'
98 'my.cnf' : '/etc/mysql/my.cnf'
102 'my.cnf' : '/etc/mysql/debian.cnf'
108 socket : '/var/run/mysqld/mysqld.sock'
114 socket : '/var/run/mysqld/mysql.sock'
120 socket : '/var/lib/mysql/mysql.sock'
126 socket : '/tmp/mysql.sock'
134 # keep in mind port might be ignored by mysql, if host = 'localhost'
135 # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
152 # Now we try the same as above with user: root
153 # A few systems configure mysql to accept passwordless
159 'my.cnf' : '/etc/my.cnf'
164 'my.cnf' : '/etc/mysql/my.cnf'
170 socket : '/var/run/mysqld/mysqld.sock'
176 socket : '/var/run/mysqld/mysql.sock'
182 socket : '/var/lib/mysql/mysql.sock'
188 socket : '/tmp/mysql.sock'
196 # keep in mind port might be ignored by mysql, if host = 'localhost'
197 # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
214 # Now we try the same as above with user: netdata
219 'my.cnf' : '/etc/my.cnf'
224 'my.cnf' : '/etc/mysql/my.cnf'
230 socket : '/var/run/mysqld/mysqld.sock'
236 socket : '/var/run/mysqld/mysql.sock'
242 socket : '/var/lib/mysql/mysql.sock'
248 socket : '/tmp/mysql.sock'
256 # keep in mind port might be ignored by mysql, if host = 'localhost'
257 # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844