mysql.conf 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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. # ----------------------------------------------------------------------
  70. # mySQL CONFIGURATION
  71. #
  72. # netdata does not need any privilege - only the ability to connect
  73. # to the mysql server (netdata will not be able to see any data).
  74. #
  75. # Execute these commands to give the local user 'netdata' the ability
  76. # to connect to the mysql server on localhost, without a password:
  77. #
  78. # > create user 'netdata'@'localhost';
  79. # > grant usage on *.* to 'netdata'@'localhost';
  80. # > flush privileges;
  81. #
  82. # with the above statements, netdata will be able to gather mysql
  83. # statistics, without the ability to see or alter any data or affect
  84. # mysql operation in any way. No change is required below.
  85. #
  86. # If you need to monitor mysql replication too, use this instead:
  87. #
  88. # > create user 'netdata'@'localhost';
  89. # > grant replication client on *.* to 'netdata'@'localhost';
  90. # > flush privileges;
  91. #
  92. # ----------------------------------------------------------------------
  93. # AUTO-DETECTION JOBS
  94. # only one of them will run (they have the same name)
  95. mycnf1:
  96. name : 'local'
  97. 'my.cnf' : '/etc/my.cnf'
  98. mycnf2:
  99. name : 'local'
  100. 'my.cnf' : '/etc/mysql/my.cnf'
  101. debiancnf:
  102. name : 'local'
  103. 'my.cnf' : '/etc/mysql/debian.cnf'
  104. socket1:
  105. name : 'local'
  106. # user : ''
  107. # pass : ''
  108. socket : '/var/run/mysqld/mysqld.sock'
  109. socket2:
  110. name : 'local'
  111. # user : ''
  112. # pass : ''
  113. socket : '/var/run/mysqld/mysql.sock'
  114. socket3:
  115. name : 'local'
  116. # user : ''
  117. # pass : ''
  118. socket : '/var/lib/mysql/mysql.sock'
  119. socket4:
  120. name : 'local'
  121. # user : ''
  122. # pass : ''
  123. socket : '/tmp/mysql.sock'
  124. tcp:
  125. name : 'local'
  126. # user : ''
  127. # pass : ''
  128. host : 'localhost'
  129. port : '3306'
  130. # keep in mind port might be ignored by mysql, if host = 'localhost'
  131. # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
  132. tcpipv4:
  133. name : 'local'
  134. # user : ''
  135. # pass : ''
  136. host : '127.0.0.1'
  137. port : '3306'
  138. tcpipv6:
  139. name : 'local'
  140. # user : ''
  141. # pass : ''
  142. host : '::1'
  143. port : '3306'
  144. # Now we try the same as above with user: root
  145. # A few systems configure mysql to accept passwordless
  146. # root access.
  147. mycnf1_root:
  148. name : 'local'
  149. user : 'root'
  150. 'my.cnf' : '/etc/my.cnf'
  151. mycnf2_root:
  152. name : 'local'
  153. user : 'root'
  154. 'my.cnf' : '/etc/mysql/my.cnf'
  155. socket1_root:
  156. name : 'local'
  157. user : 'root'
  158. # pass : ''
  159. socket : '/var/run/mysqld/mysqld.sock'
  160. socket2_root:
  161. name : 'local'
  162. user : 'root'
  163. # pass : ''
  164. socket : '/var/run/mysqld/mysql.sock'
  165. socket3_root:
  166. name : 'local'
  167. user : 'root'
  168. # pass : ''
  169. socket : '/var/lib/mysql/mysql.sock'
  170. socket4_root:
  171. name : 'local'
  172. user : 'root'
  173. # pass : ''
  174. socket : '/tmp/mysql.sock'
  175. tcp_root:
  176. name : 'local'
  177. user : 'root'
  178. # pass : ''
  179. host : 'localhost'
  180. port : '3306'
  181. # keep in mind port might be ignored by mysql, if host = 'localhost'
  182. # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
  183. tcpipv4_root:
  184. name : 'local'
  185. user : 'root'
  186. # pass : ''
  187. host : '127.0.0.1'
  188. port : '3306'
  189. tcpipv6_root:
  190. name : 'local'
  191. user : 'root'
  192. # pass : ''
  193. host : '::1'
  194. port : '3306'
  195. # Now we try the same as above with user: netdata
  196. mycnf1_netdata:
  197. name : 'local'
  198. user : 'netdata'
  199. 'my.cnf' : '/etc/my.cnf'
  200. mycnf2_netdata:
  201. name : 'local'
  202. user : 'netdata'
  203. 'my.cnf' : '/etc/mysql/my.cnf'
  204. socket1_netdata:
  205. name : 'local'
  206. user : 'netdata'
  207. # pass : ''
  208. socket : '/var/run/mysqld/mysqld.sock'
  209. socket2_netdata:
  210. name : 'local'
  211. user : 'netdata'
  212. # pass : ''
  213. socket : '/var/run/mysqld/mysql.sock'
  214. socket3_netdata:
  215. name : 'local'
  216. user : 'netdata'
  217. # pass : ''
  218. socket : '/var/lib/mysql/mysql.sock'
  219. socket4_netdata:
  220. name : 'local'
  221. user : 'netdata'
  222. # pass : ''
  223. socket : '/tmp/mysql.sock'
  224. tcp_netdata:
  225. name : 'local'
  226. user : 'netdata'
  227. # pass : ''
  228. host : 'localhost'
  229. port : '3306'
  230. # keep in mind port might be ignored by mysql, if host = 'localhost'
  231. # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
  232. tcpipv4_netdata:
  233. name : 'local'
  234. user : 'netdata'
  235. # pass : ''
  236. host : '127.0.0.1'
  237. port : '3306'
  238. tcpipv6_netdata:
  239. name : 'local'
  240. user : 'netdata'
  241. # pass : ''
  242. host : '::1'
  243. port : '3306'