mysql.conf 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. # netdata python.d.plugin configuration for mysql
  2. #
  3. # This file is in YaML format. Generally the format is:
  4. #
  5. # name: value
  6. #
  7. # There are 2 sections:
  8. # - global variables
  9. # - one or more JOBS
  10. #
  11. # JOBS allow you to collect values from multiple sources.
  12. # Each source will have its own set of charts.
  13. #
  14. # JOB parameters have to be indented (using spaces only, example below).
  15. # ----------------------------------------------------------------------
  16. # Global Variables
  17. # These variables set the defaults for all JOBs, however each JOB
  18. # may define its own, overriding the defaults.
  19. # update_every sets the default data collection frequency.
  20. # If unset, the python.d.plugin default is used.
  21. # update_every: 1
  22. # priority controls the order of charts at the netdata dashboard.
  23. # Lower numbers move the charts towards the top of the page.
  24. # If unset, the default for python.d.plugin is used.
  25. # priority: 60000
  26. # penalty indicates whether to apply penalty to update_every in case of failures.
  27. # Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
  28. # penalty: yes
  29. # autodetection_retry sets the job re-check interval in seconds.
  30. # The job is not deleted if check fails.
  31. # Attempts to start the job are made once every autodetection_retry.
  32. # This feature is disabled by default.
  33. # autodetection_retry: 0
  34. # ----------------------------------------------------------------------
  35. # JOBS (data collection sources)
  36. #
  37. # The default JOBS share the same *name*. JOBS with the same name
  38. # are mutually exclusive. Only one of them will be allowed running at
  39. # any time. This allows autodetection to try several alternatives and
  40. # pick the one that works.
  41. #
  42. # Any number of jobs is supported.
  43. #
  44. # All python.d.plugin JOBS (for all its modules) support a set of
  45. # predefined parameters. These are:
  46. #
  47. # job_name:
  48. # name: myname # the JOB's name as it will appear at the
  49. # # dashboard (by default is the job_name)
  50. # # JOBs sharing a name are mutually exclusive
  51. # update_every: 1 # the JOB's data collection frequency
  52. # priority: 60000 # the JOB's order on the dashboard
  53. # penalty: yes # the JOB's penalty
  54. # autodetection_retry: 0 # the JOB's re-check interval in seconds
  55. #
  56. # Additionally to the above, mysql also supports the following:
  57. #
  58. # socket: 'path/to/mysql.sock'
  59. #
  60. # or
  61. # host: 'IP or HOSTNAME' # the host to connect to
  62. # port: PORT # the port to connect to
  63. #
  64. # in all cases, the following can also be set:
  65. #
  66. # user: 'username' # the mysql username to use
  67. # pass: 'password' # the mysql password to use
  68. #
  69. # ssl connection parameters
  70. #
  71. # ssl:
  72. # key: 'key' # the path name of the client private key file.
  73. # cert: 'cert' # the path name of the client public key certificate file.
  74. # 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.
  75. # capath: 'capath' # the path name of the directory that contains trusted SSL CA certificate files.
  76. # cipher: [ciphers] # the list of permitted ciphers for SSL encryption.
  77. # ----------------------------------------------------------------------
  78. # mySQL CONFIGURATION
  79. #
  80. # netdata does not need any privilege - only the ability to connect
  81. # to the mysql server (netdata will not be able to see any data).
  82. #
  83. # Execute these commands to give the local user 'netdata' the ability
  84. # to connect to the mysql server on localhost, without a password:
  85. #
  86. # > create user 'netdata'@'localhost';
  87. # > grant usage on *.* to 'netdata'@'localhost';
  88. # > flush privileges;
  89. #
  90. # with the above statements, netdata will be able to gather mysql
  91. # statistics, without the ability to see or alter any data or affect
  92. # mysql operation in any way. No change is required below.
  93. #
  94. # If you need to monitor mysql replication too, use this instead:
  95. #
  96. # > create user 'netdata'@'localhost';
  97. # > grant replication client on *.* to 'netdata'@'localhost';
  98. # > flush privileges;
  99. #
  100. # ----------------------------------------------------------------------
  101. # AUTO-DETECTION JOBS
  102. # only one of them will run (they have the same name)
  103. mycnf1:
  104. name : 'local'
  105. 'my.cnf' : '/etc/my.cnf'
  106. mycnf2:
  107. name : 'local'
  108. 'my.cnf' : '/etc/mysql/my.cnf'
  109. debiancnf:
  110. name : 'local'
  111. 'my.cnf' : '/etc/mysql/debian.cnf'
  112. socket1:
  113. name : 'local'
  114. # user : ''
  115. # pass : ''
  116. socket : '/var/run/mysqld/mysqld.sock'
  117. socket2:
  118. name : 'local'
  119. # user : ''
  120. # pass : ''
  121. socket : '/var/run/mysqld/mysql.sock'
  122. socket3:
  123. name : 'local'
  124. # user : ''
  125. # pass : ''
  126. socket : '/var/lib/mysql/mysql.sock'
  127. socket4:
  128. name : 'local'
  129. # user : ''
  130. # pass : ''
  131. socket : '/tmp/mysql.sock'
  132. tcp:
  133. name : 'local'
  134. # user : ''
  135. # pass : ''
  136. host : 'localhost'
  137. port : '3306'
  138. # keep in mind port might be ignored by mysql, if host = 'localhost'
  139. # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
  140. tcpipv4:
  141. name : 'local'
  142. # user : ''
  143. # pass : ''
  144. host : '127.0.0.1'
  145. port : '3306'
  146. tcpipv6:
  147. name : 'local'
  148. # user : ''
  149. # pass : ''
  150. host : '::1'
  151. port : '3306'
  152. # Now we try the same as above with user: root
  153. # A few systems configure mysql to accept passwordless
  154. # root access.
  155. mycnf1_root:
  156. name : 'local'
  157. user : 'root'
  158. 'my.cnf' : '/etc/my.cnf'
  159. mycnf2_root:
  160. name : 'local'
  161. user : 'root'
  162. 'my.cnf' : '/etc/mysql/my.cnf'
  163. socket1_root:
  164. name : 'local'
  165. user : 'root'
  166. # pass : ''
  167. socket : '/var/run/mysqld/mysqld.sock'
  168. socket2_root:
  169. name : 'local'
  170. user : 'root'
  171. # pass : ''
  172. socket : '/var/run/mysqld/mysql.sock'
  173. socket3_root:
  174. name : 'local'
  175. user : 'root'
  176. # pass : ''
  177. socket : '/var/lib/mysql/mysql.sock'
  178. socket4_root:
  179. name : 'local'
  180. user : 'root'
  181. # pass : ''
  182. socket : '/tmp/mysql.sock'
  183. tcp_root:
  184. name : 'local'
  185. user : 'root'
  186. # pass : ''
  187. host : 'localhost'
  188. port : '3306'
  189. # keep in mind port might be ignored by mysql, if host = 'localhost'
  190. # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
  191. tcpipv4_root:
  192. name : 'local'
  193. user : 'root'
  194. # pass : ''
  195. host : '127.0.0.1'
  196. port : '3306'
  197. tcpipv6_root:
  198. name : 'local'
  199. user : 'root'
  200. # pass : ''
  201. host : '::1'
  202. port : '3306'
  203. # Now we try the same as above with user: netdata
  204. mycnf1_netdata:
  205. name : 'local'
  206. user : 'netdata'
  207. 'my.cnf' : '/etc/my.cnf'
  208. mycnf2_netdata:
  209. name : 'local'
  210. user : 'netdata'
  211. 'my.cnf' : '/etc/mysql/my.cnf'
  212. socket1_netdata:
  213. name : 'local'
  214. user : 'netdata'
  215. # pass : ''
  216. socket : '/var/run/mysqld/mysqld.sock'
  217. socket2_netdata:
  218. name : 'local'
  219. user : 'netdata'
  220. # pass : ''
  221. socket : '/var/run/mysqld/mysql.sock'
  222. socket3_netdata:
  223. name : 'local'
  224. user : 'netdata'
  225. # pass : ''
  226. socket : '/var/lib/mysql/mysql.sock'
  227. socket4_netdata:
  228. name : 'local'
  229. user : 'netdata'
  230. # pass : ''
  231. socket : '/tmp/mysql.sock'
  232. tcp_netdata:
  233. name : 'local'
  234. user : 'netdata'
  235. # pass : ''
  236. host : 'localhost'
  237. port : '3306'
  238. # keep in mind port might be ignored by mysql, if host = 'localhost'
  239. # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
  240. tcpipv4_netdata:
  241. name : 'local'
  242. user : 'netdata'
  243. # pass : ''
  244. host : '127.0.0.1'
  245. port : '3306'
  246. tcpipv6_netdata:
  247. name : 'local'
  248. user : 'netdata'
  249. # pass : ''
  250. host : '::1'
  251. port : '3306'