123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- # netdata python.d.plugin configuration for mysql
- #
- # This file is in YaML format. Generally the format is:
- #
- # name: value
- #
- # There are 2 sections:
- # - global variables
- # - one or more JOBS
- #
- # JOBS allow you to collect values from multiple sources.
- # Each source will have its own set of charts.
- #
- # JOB parameters have to be indented (using spaces only, example below).
- # ----------------------------------------------------------------------
- # Global Variables
- # These variables set the defaults for all JOBs, however each JOB
- # may define its own, overriding the defaults.
- # update_every sets the default data collection frequency.
- # If unset, the python.d.plugin default is used.
- # update_every: 1
- # priority controls the order of charts at the netdata dashboard.
- # Lower numbers move the charts towards the top of the page.
- # If unset, the default for python.d.plugin is used.
- # priority: 60000
- # penalty indicates whether to apply penalty to update_every in case of failures.
- # Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
- # penalty: yes
- # autodetection_retry sets the job re-check interval in seconds.
- # The job is not deleted if check fails.
- # Attempts to start the job are made once every autodetection_retry.
- # This feature is disabled by default.
- # autodetection_retry: 0
- # ----------------------------------------------------------------------
- # JOBS (data collection sources)
- #
- # The default JOBS share the same *name*. JOBS with the same name
- # are mutually exclusive. Only one of them will be allowed running at
- # any time. This allows autodetection to try several alternatives and
- # pick the one that works.
- #
- # Any number of jobs is supported.
- #
- # All python.d.plugin JOBS (for all its modules) support a set of
- # predefined parameters. These are:
- #
- # job_name:
- # name: myname # the JOB's name as it will appear at the
- # # dashboard (by default is the job_name)
- # # JOBs sharing a name are mutually exclusive
- # update_every: 1 # the JOB's data collection frequency
- # priority: 60000 # the JOB's order on the dashboard
- # penalty: yes # the JOB's penalty
- # autodetection_retry: 0 # the JOB's re-check interval in seconds
- #
- # Additionally to the above, mysql also supports the following:
- #
- # socket: 'path/to/mysql.sock'
- #
- # or
- # host: 'IP or HOSTNAME' # the host to connect to
- # port: PORT # the port to connect to
- #
- # in all cases, the following can also be set:
- #
- # user: 'username' # the mysql username to use
- # pass: 'password' # the mysql password to use
- #
- # ssl connection parameters
- #
- # ssl:
- # key: 'key' # the path name of the client private key file.
- # cert: 'cert' # the path name of the client public key certificate file.
- # ca: 'ca' # the path name of the Certificate Authority (CA) certificate file. This option, if used, must specify the same certificate used by the server.
- # capath: 'capath' # the path name of the directory that contains trusted SSL CA certificate files.
- # cipher: [ciphers] # the list of permitted ciphers for SSL encryption.
- # ----------------------------------------------------------------------
- # mySQL CONFIGURATION
- #
- # netdata does not need any privilege - only the ability to connect
- # to the mysql server (netdata will not be able to see any data).
- #
- # Execute these commands to give the local user 'netdata' the ability
- # to connect to the mysql server on localhost, without a password:
- #
- # > create user 'netdata'@'localhost';
- # > grant usage on *.* to 'netdata'@'localhost';
- # > flush privileges;
- #
- # with the above statements, netdata will be able to gather mysql
- # statistics, without the ability to see or alter any data or affect
- # mysql operation in any way. No change is required below.
- #
- # If you need to monitor mysql replication too, use this instead:
- #
- # > create user 'netdata'@'localhost';
- # > grant replication client on *.* to 'netdata'@'localhost';
- # > flush privileges;
- #
- # ----------------------------------------------------------------------
- # AUTO-DETECTION JOBS
- # only one of them will run (they have the same name)
- mycnf1:
- name : 'local'
- 'my.cnf' : '/etc/my.cnf'
- mycnf2:
- name : 'local'
- 'my.cnf' : '/etc/mysql/my.cnf'
- debiancnf:
- name : 'local'
- 'my.cnf' : '/etc/mysql/debian.cnf'
- socket1:
- name : 'local'
- # user : ''
- # pass : ''
- socket : '/var/run/mysqld/mysqld.sock'
- socket2:
- name : 'local'
- # user : ''
- # pass : ''
- socket : '/var/run/mysqld/mysql.sock'
- socket3:
- name : 'local'
- # user : ''
- # pass : ''
- socket : '/var/lib/mysql/mysql.sock'
- socket4:
- name : 'local'
- # user : ''
- # pass : ''
- socket : '/tmp/mysql.sock'
- tcp:
- name : 'local'
- # user : ''
- # pass : ''
- host : 'localhost'
- port : '3306'
- # keep in mind port might be ignored by mysql, if host = 'localhost'
- # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
- tcpipv4:
- name : 'local'
- # user : ''
- # pass : ''
- host : '127.0.0.1'
- port : '3306'
- tcpipv6:
- name : 'local'
- # user : ''
- # pass : ''
- host : '::1'
- port : '3306'
- # Now we try the same as above with user: root
- # A few systems configure mysql to accept passwordless
- # root access.
- mycnf1_root:
- name : 'local'
- user : 'root'
- 'my.cnf' : '/etc/my.cnf'
- mycnf2_root:
- name : 'local'
- user : 'root'
- 'my.cnf' : '/etc/mysql/my.cnf'
- socket1_root:
- name : 'local'
- user : 'root'
- # pass : ''
- socket : '/var/run/mysqld/mysqld.sock'
- socket2_root:
- name : 'local'
- user : 'root'
- # pass : ''
- socket : '/var/run/mysqld/mysql.sock'
- socket3_root:
- name : 'local'
- user : 'root'
- # pass : ''
- socket : '/var/lib/mysql/mysql.sock'
- socket4_root:
- name : 'local'
- user : 'root'
- # pass : ''
- socket : '/tmp/mysql.sock'
- tcp_root:
- name : 'local'
- user : 'root'
- # pass : ''
- host : 'localhost'
- port : '3306'
- # keep in mind port might be ignored by mysql, if host = 'localhost'
- # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
- tcpipv4_root:
- name : 'local'
- user : 'root'
- # pass : ''
- host : '127.0.0.1'
- port : '3306'
- tcpipv6_root:
- name : 'local'
- user : 'root'
- # pass : ''
- host : '::1'
- port : '3306'
- # Now we try the same as above with user: netdata
- mycnf1_netdata:
- name : 'local'
- user : 'netdata'
- 'my.cnf' : '/etc/my.cnf'
- mycnf2_netdata:
- name : 'local'
- user : 'netdata'
- 'my.cnf' : '/etc/mysql/my.cnf'
- socket1_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- socket : '/var/run/mysqld/mysqld.sock'
- socket2_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- socket : '/var/run/mysqld/mysql.sock'
- socket3_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- socket : '/var/lib/mysql/mysql.sock'
- socket4_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- socket : '/tmp/mysql.sock'
- tcp_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- host : 'localhost'
- port : '3306'
- # keep in mind port might be ignored by mysql, if host = 'localhost'
- # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
- tcpipv4_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- host : '127.0.0.1'
- port : '3306'
- tcpipv6_netdata:
- name : 'local'
- user : 'netdata'
- # pass : ''
- host : '::1'
- port : '3306'
|