You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

MySQL-by-address.json 73 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805
  1. {
  2. "name": "MySQL 仪表盘(使用 address 筛选,用于中心端 Categraf 采集远端多个 mysql 实例的场景)",
  3. "tags": "",
  4. "configs": {
  5. "panels": [
  6. {
  7. "collapsed": true,
  8. "id": "dfd77e6d-4e88-4bd9-8c19-74f566920f6c",
  9. "layout": {
  10. "h": 1,
  11. "i": "dfd77e6d-4e88-4bd9-8c19-74f566920f6c",
  12. "isResizable": false,
  13. "w": 24,
  14. "x": 0,
  15. "y": 0
  16. },
  17. "name": "Basic Info",
  18. "panels": [],
  19. "type": "row"
  20. },
  21. {
  22. "custom": {
  23. "alignItems": "center",
  24. "bgColor": "rgba(0, 0, 0, 0)",
  25. "content": "<img src=\"https://download.flashcat.cloud/ulric/icon-mysql.png\" width=\"256\"/>",
  26. "justifyContent": "center",
  27. "textColor": "#000000",
  28. "textDarkColor": "#FFFFFF",
  29. "textSize": 12
  30. },
  31. "id": "74a5cd8c-f870-442d-bda6-48b5ce4e87ea",
  32. "layout": {
  33. "h": 6,
  34. "i": "74a5cd8c-f870-442d-bda6-48b5ce4e87ea",
  35. "isResizable": true,
  36. "w": 5,
  37. "x": 0,
  38. "y": 1
  39. },
  40. "maxPerRow": 4,
  41. "name": "",
  42. "type": "text",
  43. "version": "3.0.0"
  44. },
  45. {
  46. "custom": {
  47. "calc": "lastNotNull",
  48. "colSpan": 0,
  49. "colorMode": "background",
  50. "graphMode": "none",
  51. "orientation": "vertical",
  52. "textMode": "valueAndName",
  53. "textSize": {
  54. "title": null,
  55. "value": null
  56. },
  57. "valueField": "Value"
  58. },
  59. "datasourceCate": "prometheus",
  60. "datasourceValue": "${datasource}",
  61. "id": "98364700-8949-4e5d-a6ac-34becb52edf2",
  62. "layout": {
  63. "h": 3,
  64. "i": "75363e2e-deba-421a-bb28-dedf0d7a1a6f",
  65. "isResizable": true,
  66. "w": 7,
  67. "x": 5,
  68. "y": 1
  69. },
  70. "maxPerRow": 4,
  71. "name": "MySQL Uptime Days",
  72. "options": {
  73. "standardOptions": {
  74. "decimals": 1,
  75. "util": "seconds"
  76. },
  77. "thresholds": {
  78. "steps": [
  79. {
  80. "color": "#6C53B1",
  81. "type": "base",
  82. "value": null
  83. }
  84. ]
  85. },
  86. "valueMappings": [
  87. {
  88. "match": {
  89. "to": 1800
  90. },
  91. "result": {
  92. "color": "#ec7718"
  93. },
  94. "type": "range"
  95. },
  96. {
  97. "match": {
  98. "from": 1800
  99. },
  100. "result": {
  101. "color": "rgba(63, 196, 83, 1)"
  102. },
  103. "type": "range"
  104. }
  105. ]
  106. },
  107. "targets": [
  108. {
  109. "expr": "mysql_global_status_uptime{address=~\"$address\"}",
  110. "legend": "{{address}}",
  111. "maxDataPoints": 240
  112. }
  113. ],
  114. "transformations": [
  115. {
  116. "id": "organize",
  117. "options": {}
  118. }
  119. ],
  120. "type": "stat",
  121. "version": "3.0.0"
  122. },
  123. {
  124. "custom": {
  125. "calc": "lastNotNull",
  126. "colSpan": 0,
  127. "colorMode": "background",
  128. "graphMode": "none",
  129. "orientation": "vertical",
  130. "textMode": "valueAndName",
  131. "textSize": {
  132. "title": null,
  133. "value": null
  134. },
  135. "valueField": "Value"
  136. },
  137. "datasourceCate": "prometheus",
  138. "datasourceValue": "${datasource}",
  139. "description": "mysql_global_status_queries",
  140. "id": "1763bcc6-d058-4a2b-a099-3d590debd01a",
  141. "layout": {
  142. "h": 3,
  143. "i": "1763bcc6-d058-4a2b-a099-3d590debd01a",
  144. "isResizable": true,
  145. "w": 12,
  146. "x": 12,
  147. "y": 1
  148. },
  149. "maxPerRow": 4,
  150. "name": "Current QPS",
  151. "options": {
  152. "standardOptions": {
  153. "decimals": 2
  154. },
  155. "thresholds": {
  156. "steps": [
  157. {
  158. "color": "#6C53B1",
  159. "type": "base",
  160. "value": null
  161. }
  162. ]
  163. },
  164. "valueMappings": [
  165. {
  166. "match": {
  167. "to": 100
  168. },
  169. "result": {
  170. "color": "rgba(63, 196, 83, 1)"
  171. },
  172. "type": "range"
  173. },
  174. {
  175. "match": {
  176. "from": 100,
  177. "to": 1000
  178. },
  179. "result": {
  180. "color": "rgba(255, 153, 25, 1)"
  181. },
  182. "type": "range"
  183. },
  184. {
  185. "match": {
  186. "from": 1000
  187. },
  188. "result": {
  189. "color": "rgba(255, 101, 107, 1)"
  190. },
  191. "type": "range"
  192. }
  193. ]
  194. },
  195. "targets": [
  196. {
  197. "expr": "rate(mysql_global_status_queries{address=~\"$address\"}[5m])",
  198. "legend": "{{address}}",
  199. "maxDataPoints": 240
  200. }
  201. ],
  202. "transformations": [
  203. {
  204. "id": "organize",
  205. "options": {}
  206. }
  207. ],
  208. "type": "stat",
  209. "version": "3.0.0"
  210. },
  211. {
  212. "custom": {
  213. "calc": "lastNotNull",
  214. "colSpan": 0,
  215. "colorMode": "background",
  216. "graphMode": "none",
  217. "orientation": "vertical",
  218. "textMode": "valueAndName",
  219. "textSize": {
  220. "title": null,
  221. "value": null
  222. },
  223. "valueField": "Value"
  224. },
  225. "datasourceCate": "prometheus",
  226. "datasourceValue": "${datasource}",
  227. "description": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.",
  228. "id": "28d16171-9e36-4f5d-87be-95bcb2aeb643",
  229. "layout": {
  230. "h": 3,
  231. "i": "28d16171-9e36-4f5d-87be-95bcb2aeb643",
  232. "isResizable": true,
  233. "w": 7,
  234. "x": 5,
  235. "y": 4
  236. },
  237. "maxPerRow": 4,
  238. "name": "InnoDB Buffer Pool",
  239. "options": {
  240. "standardOptions": {
  241. "util": "bytesIEC"
  242. },
  243. "thresholds": {
  244. "steps": [
  245. {
  246. "color": "rgba(83, 170, 177, 1)",
  247. "type": "base",
  248. "value": null
  249. }
  250. ]
  251. }
  252. },
  253. "targets": [
  254. {
  255. "expr": "mysql_global_variables_innodb_buffer_pool_size{address=~\"$address\"}",
  256. "legend": "{{address}}",
  257. "maxDataPoints": 240
  258. }
  259. ],
  260. "transformations": [
  261. {
  262. "id": "organize",
  263. "options": {}
  264. }
  265. ],
  266. "type": "stat",
  267. "version": "3.0.0"
  268. },
  269. {
  270. "custom": {
  271. "calc": "lastNotNull",
  272. "colSpan": 0,
  273. "colorMode": "background",
  274. "graphMode": "none",
  275. "orientation": "vertical",
  276. "textMode": "valueAndName",
  277. "textSize": {
  278. "title": null,
  279. "value": null
  280. },
  281. "valueField": "Value"
  282. },
  283. "datasourceCate": "prometheus",
  284. "datasourceValue": "${datasource}",
  285. "description": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.",
  286. "id": "5fe39015-bf33-4f02-b79e-a8977e56d7ca",
  287. "layout": {
  288. "h": 3,
  289. "i": "5fe39015-bf33-4f02-b79e-a8977e56d7ca",
  290. "isResizable": true,
  291. "w": 6,
  292. "x": 12,
  293. "y": 4
  294. },
  295. "maxPerRow": 4,
  296. "name": "Table Locks Waited(5min)",
  297. "options": {
  298. "standardOptions": {},
  299. "thresholds": {
  300. "steps": [
  301. {
  302. "color": "#6C53B1",
  303. "type": "base",
  304. "value": null
  305. }
  306. ]
  307. },
  308. "valueMappings": [
  309. {
  310. "match": {
  311. "from": 1
  312. },
  313. "result": {
  314. "color": "#e70d0d"
  315. },
  316. "type": "range"
  317. },
  318. {
  319. "match": {
  320. "to": 1
  321. },
  322. "result": {
  323. "color": "rgba(63, 196, 83, 1)"
  324. },
  325. "type": "range"
  326. }
  327. ]
  328. },
  329. "targets": [
  330. {
  331. "expr": "increase(mysql_global_status_table_locks_waited{address=~\"$address\"}[5m])",
  332. "legend": "{{address}}",
  333. "maxDataPoints": 240
  334. }
  335. ],
  336. "transformations": [
  337. {
  338. "id": "organize",
  339. "options": {}
  340. }
  341. ],
  342. "type": "stat",
  343. "version": "3.0.0"
  344. },
  345. {
  346. "custom": {
  347. "drawStyle": "lines",
  348. "fillOpacity": 0.3,
  349. "gradientMode": "opacity",
  350. "lineInterpolation": "smooth",
  351. "lineWidth": 2,
  352. "scaleDistribution": {
  353. "type": "linear"
  354. },
  355. "spanNulls": false,
  356. "stack": "off"
  357. },
  358. "datasourceCate": "prometheus",
  359. "datasourceValue": "${datasource}",
  360. "id": "70ee692b-24d9-4807-81b4-81582b5526c2",
  361. "layout": {
  362. "h": 3,
  363. "i": "70ee692b-24d9-4807-81b4-81582b5526c2",
  364. "isResizable": true,
  365. "w": 6,
  366. "x": 18,
  367. "y": 4
  368. },
  369. "maxPerRow": 4,
  370. "name": "Slave Replication Lag",
  371. "options": {
  372. "legend": {
  373. "behaviour": "showItem",
  374. "displayMode": "hidden"
  375. },
  376. "standardOptions": {},
  377. "thresholds": {
  378. "steps": [
  379. {
  380. "color": "#6C53B1",
  381. "type": "base",
  382. "value": null
  383. }
  384. ]
  385. },
  386. "tooltip": {
  387. "mode": "all",
  388. "sort": "desc"
  389. }
  390. },
  391. "overrides": [
  392. {
  393. "matcher": {
  394. "id": "byFrameRefID"
  395. },
  396. "properties": {
  397. "rightYAxisDisplay": "off"
  398. }
  399. }
  400. ],
  401. "targets": [
  402. {
  403. "expr": "mysql_slave_status_seconds_behind_master{address=~\"$address\"} - mysql_slave_status_sql_delay{address=~\"$address\"}",
  404. "legend": "{{address}}",
  405. "maxDataPoints": 240,
  406. "refId": "A"
  407. }
  408. ],
  409. "transformations": [
  410. {
  411. "id": "organize",
  412. "options": {}
  413. }
  414. ],
  415. "type": "timeseries",
  416. "version": "3.0.0"
  417. },
  418. {
  419. "collapsed": true,
  420. "id": "c6da1a55-04d2-4e3e-a22f-e5790182da4a",
  421. "layout": {
  422. "h": 1,
  423. "i": "c6da1a55-04d2-4e3e-a22f-e5790182da4a",
  424. "isResizable": false,
  425. "w": 24,
  426. "x": 0,
  427. "y": 7
  428. },
  429. "name": "Connections",
  430. "panels": [],
  431. "type": "row"
  432. },
  433. {
  434. "custom": {
  435. "drawStyle": "lines",
  436. "fillOpacity": 0.03,
  437. "gradientMode": "none",
  438. "lineInterpolation": "smooth",
  439. "lineWidth": 2,
  440. "scaleDistribution": {
  441. "type": "linear"
  442. },
  443. "spanNulls": false,
  444. "stack": "off"
  445. },
  446. "datasourceCate": "prometheus",
  447. "datasourceValue": "${datasource}",
  448. "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.",
  449. "id": "458753cc-a6d0-4afc-bf5e-54585dc5990c",
  450. "layout": {
  451. "h": 5,
  452. "i": "458753cc-a6d0-4afc-bf5e-54585dc5990c",
  453. "isResizable": true,
  454. "w": 6,
  455. "x": 0,
  456. "y": 8
  457. },
  458. "maxPerRow": 4,
  459. "name": "MySQL Connections",
  460. "options": {
  461. "legend": {
  462. "behaviour": "showItem",
  463. "displayMode": "hidden"
  464. },
  465. "standardOptions": {},
  466. "thresholds": {
  467. "steps": [
  468. {
  469. "color": "#6C53B1",
  470. "type": "base",
  471. "value": null
  472. }
  473. ]
  474. },
  475. "tooltip": {
  476. "mode": "all",
  477. "sort": "desc"
  478. }
  479. },
  480. "overrides": [
  481. {
  482. "matcher": {
  483. "id": "byFrameRefID"
  484. },
  485. "properties": {
  486. "rightYAxisDisplay": "off"
  487. }
  488. }
  489. ],
  490. "targets": [
  491. {
  492. "expr": "mysql_global_status_threads_connected{address=~\"$address\"}",
  493. "legend": "{{address}} Connections",
  494. "maxDataPoints": 240
  495. }
  496. ],
  497. "transformations": [
  498. {
  499. "id": "organize",
  500. "options": {}
  501. }
  502. ],
  503. "type": "timeseries",
  504. "version": "3.0.0"
  505. },
  506. {
  507. "custom": {
  508. "drawStyle": "lines",
  509. "fillOpacity": 0.03,
  510. "gradientMode": "none",
  511. "lineInterpolation": "smooth",
  512. "lineWidth": 2,
  513. "scaleDistribution": {
  514. "type": "linear"
  515. },
  516. "spanNulls": false,
  517. "stack": "off"
  518. },
  519. "datasourceCate": "prometheus",
  520. "datasourceValue": "${datasource}",
  521. "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.",
  522. "id": "ebf01aad-c07b-4541-9891-bb3d5a7175a6",
  523. "layout": {
  524. "h": 5,
  525. "i": "13bf0230-db47-4338-9b32-8e15af8915e4",
  526. "isResizable": true,
  527. "w": 6,
  528. "x": 6,
  529. "y": 8
  530. },
  531. "maxPerRow": 4,
  532. "name": "MySQL Connections Used Percent",
  533. "options": {
  534. "legend": {
  535. "behaviour": "showItem",
  536. "displayMode": "hidden"
  537. },
  538. "standardOptions": {
  539. "util": "percentUnit"
  540. },
  541. "thresholds": {
  542. "steps": [
  543. {
  544. "color": "#634CD9",
  545. "type": "base",
  546. "value": null
  547. }
  548. ]
  549. },
  550. "tooltip": {
  551. "mode": "all",
  552. "sort": "desc"
  553. }
  554. },
  555. "overrides": [
  556. {
  557. "matcher": {
  558. "id": "byFrameRefID"
  559. },
  560. "properties": {
  561. "rightYAxisDisplay": "off"
  562. }
  563. }
  564. ],
  565. "targets": [
  566. {
  567. "expr": "mysql_global_status_threads_connected{address=~\"$address\"}/mysql_global_variables_max_connections{address=~\"$address\"}",
  568. "legend": "{{address}}",
  569. "maxDataPoints": 240
  570. }
  571. ],
  572. "transformations": [
  573. {
  574. "id": "organize",
  575. "options": {}
  576. }
  577. ],
  578. "type": "timeseries",
  579. "version": "3.0.0"
  580. },
  581. {
  582. "custom": {
  583. "drawStyle": "lines",
  584. "fillOpacity": 0.03,
  585. "gradientMode": "opacity",
  586. "lineInterpolation": "smooth",
  587. "lineWidth": 2,
  588. "scaleDistribution": {
  589. "type": "linear"
  590. },
  591. "spanNulls": false,
  592. "stack": "off"
  593. },
  594. "datasourceCate": "prometheus",
  595. "datasourceValue": "${datasource}",
  596. "description": "Threads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.",
  597. "id": "f18e13bf-5495-492f-95c5-4a590e38c58e",
  598. "layout": {
  599. "h": 5,
  600. "i": "f18e13bf-5495-492f-95c5-4a590e38c58e",
  601. "isResizable": true,
  602. "w": 6,
  603. "x": 12,
  604. "y": 8
  605. },
  606. "maxPerRow": 4,
  607. "name": "MySQL Client Thread Running",
  608. "options": {
  609. "legend": {
  610. "behaviour": "showItem",
  611. "displayMode": "hidden"
  612. },
  613. "standardOptions": {},
  614. "thresholds": {
  615. "steps": [
  616. {
  617. "color": "#6C53B1",
  618. "type": "base",
  619. "value": null
  620. }
  621. ]
  622. },
  623. "tooltip": {
  624. "mode": "all",
  625. "sort": "desc"
  626. }
  627. },
  628. "overrides": [
  629. {
  630. "matcher": {
  631. "id": "byFrameRefID"
  632. },
  633. "properties": {
  634. "rightYAxisDisplay": "off"
  635. }
  636. }
  637. ],
  638. "targets": [
  639. {
  640. "expr": "mysql_global_status_threads_running{address=~\"$address\"}",
  641. "legend": "{{address}} Threads Running",
  642. "maxDataPoints": 240
  643. }
  644. ],
  645. "transformations": [
  646. {
  647. "id": "organize",
  648. "options": {}
  649. }
  650. ],
  651. "type": "timeseries",
  652. "version": "3.0.0"
  653. },
  654. {
  655. "custom": {
  656. "drawStyle": "lines",
  657. "fillOpacity": 0.03,
  658. "gradientMode": "none",
  659. "lineInterpolation": "smooth",
  660. "lineWidth": 2,
  661. "scaleDistribution": {
  662. "type": "linear"
  663. },
  664. "spanNulls": false,
  665. "stack": "off"
  666. },
  667. "datasourceCate": "prometheus",
  668. "datasourceValue": "${datasource}",
  669. "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.",
  670. "id": "86251111-3a14-4c52-b1f2-a5cbe009bc0f",
  671. "layout": {
  672. "h": 5,
  673. "i": "34bd296e-bea3-4638-9a35-f97121e804b2",
  674. "isResizable": true,
  675. "w": 6,
  676. "x": 18,
  677. "y": 8
  678. },
  679. "maxPerRow": 4,
  680. "name": "Max Used and Aborted Connections",
  681. "options": {
  682. "legend": {
  683. "behaviour": "showItem",
  684. "displayMode": "hidden"
  685. },
  686. "standardOptions": {},
  687. "thresholds": {
  688. "steps": [
  689. {
  690. "color": "#6C53B1",
  691. "type": "base",
  692. "value": null
  693. }
  694. ]
  695. },
  696. "tooltip": {
  697. "mode": "all",
  698. "sort": "desc"
  699. }
  700. },
  701. "overrides": [
  702. {
  703. "matcher": {
  704. "id": "byFrameRefID"
  705. },
  706. "properties": {
  707. "rightYAxisDisplay": "off"
  708. }
  709. }
  710. ],
  711. "targets": [
  712. {
  713. "expr": "mysql_global_status_max_used_connections{address=~\"$address\"}",
  714. "legend": "{{address}} Max Used Connections",
  715. "maxDataPoints": 240
  716. },
  717. {
  718. "expr": "rate(mysql_global_status_aborted_connects{address=~\"$address\"}[5m])",
  719. "legend": "{{address}} Aborted Connections",
  720. "maxDataPoints": 240
  721. }
  722. ],
  723. "transformations": [
  724. {
  725. "id": "organize",
  726. "options": {}
  727. }
  728. ],
  729. "type": "timeseries",
  730. "version": "3.0.0"
  731. },
  732. {
  733. "collapsed": true,
  734. "id": "462559f7-06d3-4585-9ad3-a0906e7c362d",
  735. "layout": {
  736. "h": 1,
  737. "i": "462559f7-06d3-4585-9ad3-a0906e7c362d",
  738. "isResizable": false,
  739. "w": 24,
  740. "x": 0,
  741. "y": 13
  742. },
  743. "name": "Query Performance",
  744. "panels": [],
  745. "type": "row"
  746. },
  747. {
  748. "custom": {
  749. "drawStyle": "lines",
  750. "fillOpacity": 0.3,
  751. "gradientMode": "opacity",
  752. "lineInterpolation": "smooth",
  753. "lineWidth": 2,
  754. "stack": "off"
  755. },
  756. "datasourceCate": "prometheus",
  757. "datasourceValue": "${datasource}",
  758. "id": "0428fde5-3fbf-45dd-b1a9-1a498d6c2de4",
  759. "layout": {
  760. "h": 4,
  761. "i": "0428fde5-3fbf-45dd-b1a9-1a498d6c2de4",
  762. "isResizable": true,
  763. "w": 12,
  764. "x": 0,
  765. "y": 14
  766. },
  767. "name": "MySQL Temporary Objects",
  768. "options": {
  769. "legend": {
  770. "displayMode": "hidden"
  771. },
  772. "standardOptions": {},
  773. "thresholds": {},
  774. "tooltip": {
  775. "mode": "all",
  776. "sort": "desc"
  777. }
  778. },
  779. "targets": [
  780. {
  781. "expr": "rate(mysql_global_status_created_tmp_tables{address=~\"$address\"}[5m])",
  782. "legend": "{{address}} Created Tmp Tables"
  783. },
  784. {
  785. "expr": "rate(mysql_global_status_created_tmp_disk_tables{address=~\"$address\"}[5m])",
  786. "legend": "{{address}} Created Tmp Disk Tables"
  787. },
  788. {
  789. "expr": "rate(mysql_global_status_created_tmp_files{address=~\"$address\"}[5m])",
  790. "legend": "{{address}} Created Tmp Files"
  791. }
  792. ],
  793. "type": "timeseries",
  794. "version": "2.0.0"
  795. },
  796. {
  797. "custom": {
  798. "drawStyle": "lines",
  799. "fillOpacity": 0.3,
  800. "gradientMode": "opacity",
  801. "lineInterpolation": "smooth",
  802. "lineWidth": 2,
  803. "stack": "off"
  804. },
  805. "datasourceCate": "prometheus",
  806. "datasourceValue": "${datasource}",
  807. "description": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.",
  808. "id": "7333267f-e76e-495a-b3d8-08b100ab1330",
  809. "layout": {
  810. "h": 4,
  811. "i": "7333267f-e76e-495a-b3d8-08b100ab1330",
  812. "isResizable": true,
  813. "w": 12,
  814. "x": 12,
  815. "y": 14
  816. },
  817. "name": "MySQL Select Types",
  818. "options": {
  819. "legend": {
  820. "displayMode": "hidden"
  821. },
  822. "standardOptions": {},
  823. "thresholds": {},
  824. "tooltip": {
  825. "mode": "all",
  826. "sort": "desc"
  827. }
  828. },
  829. "targets": [
  830. {
  831. "expr": "rate(mysql_global_status_select_full_join{ address=~\"$address\"}[5m])",
  832. "legend": "{{address}} Select Full Join"
  833. },
  834. {
  835. "expr": "rate(mysql_global_status_select_full_range_join{ address=~\"$address\"}[5m])",
  836. "legend": "{{address}} Select Full Range Join"
  837. },
  838. {
  839. "expr": "rate(mysql_global_status_select_range{ address=~\"$address\"}[5m])",
  840. "legend": "{{address}} Select Range"
  841. },
  842. {
  843. "expr": "rate(mysql_global_status_select_range_check{ address=~\"$address\"}[5m])",
  844. "legend": "{{address}} Select Range Check"
  845. },
  846. {
  847. "expr": "rate(mysql_global_status_select_scan{ address=~\"$address\"}[5m])",
  848. "legend": "{{address}} Select Scan"
  849. }
  850. ],
  851. "type": "timeseries",
  852. "version": "2.0.0"
  853. },
  854. {
  855. "custom": {
  856. "drawStyle": "lines",
  857. "fillOpacity": 0.3,
  858. "gradientMode": "opacity",
  859. "lineInterpolation": "smooth",
  860. "lineWidth": 2,
  861. "stack": "off"
  862. },
  863. "datasourceCate": "prometheus",
  864. "datasourceValue": "${datasource}",
  865. "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index.",
  866. "id": "033652d8-8918-4eee-80bd-625cb0cf8d05",
  867. "layout": {
  868. "h": 4,
  869. "i": "033652d8-8918-4eee-80bd-625cb0cf8d05",
  870. "isResizable": true,
  871. "w": 12,
  872. "x": 0,
  873. "y": 18
  874. },
  875. "name": "MySQL Sorts",
  876. "options": {
  877. "legend": {
  878. "displayMode": "hidden"
  879. },
  880. "standardOptions": {},
  881. "thresholds": {},
  882. "tooltip": {
  883. "mode": "all",
  884. "sort": "desc"
  885. }
  886. },
  887. "targets": [
  888. {
  889. "expr": "rate(mysql_global_status_sort_rows{address=~\"$address\"}[5m])",
  890. "legend": "{{address}} Sort Rows"
  891. },
  892. {
  893. "expr": "rate(mysql_global_status_sort_range{address=~\"$address\"}[5m])",
  894. "legend": "{{address}} Sort Range"
  895. },
  896. {
  897. "expr": "rate(mysql_global_status_sort_merge_passes{address=~\"$address\"}[5m])",
  898. "legend": "{{address}} Sort Merge Passes"
  899. },
  900. {
  901. "expr": "rate(mysql_global_status_sort_scan{address=~\"$address\"}[5m])",
  902. "legend": "{{address}} Sort Scan"
  903. }
  904. ],
  905. "type": "timeseries",
  906. "version": "2.0.0"
  907. },
  908. {
  909. "custom": {
  910. "drawStyle": "bars",
  911. "fillOpacity": 0.3,
  912. "gradientMode": "opacity",
  913. "lineWidth": 2,
  914. "stack": "off"
  915. },
  916. "datasourceCate": "prometheus",
  917. "datasourceValue": "${datasource}",
  918. "description": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.",
  919. "id": "08c7c660-5dbb-4fce-9037-3680b9e807d6",
  920. "layout": {
  921. "h": 4,
  922. "i": "08c7c660-5dbb-4fce-9037-3680b9e807d6",
  923. "isResizable": true,
  924. "w": 12,
  925. "x": 12,
  926. "y": 18
  927. },
  928. "name": "MySQL Slow Queries",
  929. "options": {
  930. "legend": {
  931. "displayMode": "hidden"
  932. },
  933. "standardOptions": {},
  934. "thresholds": {},
  935. "tooltip": {
  936. "mode": "all",
  937. "sort": "none"
  938. }
  939. },
  940. "targets": [
  941. {
  942. "expr": "rate(mysql_global_status_slow_queries{address=~\"$address\"}[5m])",
  943. "legend": "{{address}} Slow Queries"
  944. }
  945. ],
  946. "type": "timeseries",
  947. "version": "2.0.0"
  948. },
  949. {
  950. "collapsed": true,
  951. "id": "6f36134c-8dd7-4cfb-8a55-7b18ecce2cd6",
  952. "layout": {
  953. "h": 1,
  954. "i": "6f36134c-8dd7-4cfb-8a55-7b18ecce2cd6",
  955. "isResizable": false,
  956. "w": 24,
  957. "x": 0,
  958. "y": 22
  959. },
  960. "name": "Network",
  961. "panels": [],
  962. "type": "row"
  963. },
  964. {
  965. "custom": {
  966. "drawStyle": "lines",
  967. "fillOpacity": 0.3,
  968. "gradientMode": "opacity",
  969. "lineInterpolation": "smooth",
  970. "lineWidth": 2,
  971. "stack": "off"
  972. },
  973. "datasourceCate": "prometheus",
  974. "datasourceValue": "${datasource}",
  975. "description": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.",
  976. "id": "6d50c653-a256-461d-80f1-69e3db613dbc",
  977. "layout": {
  978. "h": 4,
  979. "i": "6d50c653-a256-461d-80f1-69e3db613dbc",
  980. "isResizable": true,
  981. "w": 24,
  982. "x": 0,
  983. "y": 23
  984. },
  985. "name": "MySQL Network Traffic",
  986. "options": {
  987. "legend": {
  988. "displayMode": "hidden"
  989. },
  990. "standardOptions": {
  991. "decimals": 1,
  992. "util": "bytesIEC"
  993. },
  994. "thresholds": {},
  995. "tooltip": {
  996. "mode": "all",
  997. "sort": "desc"
  998. }
  999. },
  1000. "targets": [
  1001. {
  1002. "expr": "rate(mysql_global_status_bytes_received{address=~\"$address\"}[5m])",
  1003. "legend": "{{address}} Inbound"
  1004. },
  1005. {
  1006. "expr": "rate(mysql_global_status_bytes_sent{address=~\"$address\"}[5m])",
  1007. "legend": "{{address}} Outbound"
  1008. }
  1009. ],
  1010. "type": "timeseries",
  1011. "version": "2.0.0"
  1012. },
  1013. {
  1014. "collapsed": true,
  1015. "id": "73cbe32a-36cd-488e-a818-23bb1857d6e7",
  1016. "layout": {
  1017. "h": 1,
  1018. "i": "73cbe32a-36cd-488e-a818-23bb1857d6e7",
  1019. "isResizable": false,
  1020. "w": 24,
  1021. "x": 0,
  1022. "y": 27
  1023. },
  1024. "name": "Commands, Handlers",
  1025. "panels": [],
  1026. "type": "row"
  1027. },
  1028. {
  1029. "custom": {
  1030. "drawStyle": "lines",
  1031. "fillOpacity": 0.2,
  1032. "lineInterpolation": "smooth",
  1033. "stack": "off"
  1034. },
  1035. "datasourceCate": "prometheus",
  1036. "datasourceValue": "${datasource}",
  1037. "description": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.",
  1038. "id": "ffa708e1-2132-4dca-9cda-2dd73fad16da",
  1039. "layout": {
  1040. "h": 4,
  1041. "i": "ffa708e1-2132-4dca-9cda-2dd73fad16da",
  1042. "isResizable": true,
  1043. "w": 6,
  1044. "x": 0,
  1045. "y": 28
  1046. },
  1047. "name": "Top Command Counters",
  1048. "options": {
  1049. "legend": {
  1050. "displayMode": "hidden"
  1051. },
  1052. "standardOptions": {
  1053. "decimals": 2
  1054. },
  1055. "thresholds": {},
  1056. "tooltip": {
  1057. "mode": "all",
  1058. "sort": "desc"
  1059. }
  1060. },
  1061. "targets": [
  1062. {
  1063. "expr": "topk(10, rate(mysql_global_status_commands_total{address=~\"$address\"}[5m])>0)",
  1064. "legend": "{{address}} {{command}}"
  1065. }
  1066. ],
  1067. "type": "timeseries",
  1068. "version": "2.0.0"
  1069. },
  1070. {
  1071. "custom": {
  1072. "drawStyle": "lines",
  1073. "fillOpacity": 0.2,
  1074. "lineInterpolation": "smooth",
  1075. "stack": "off"
  1076. },
  1077. "datasourceCate": "prometheus",
  1078. "datasourceValue": "${datasource}",
  1079. "description": "",
  1080. "id": "49a40cdf-4715-4d5c-90f9-944479296d8b",
  1081. "layout": {
  1082. "h": 4,
  1083. "i": "ad5d900a-3e60-436a-b8a6-eccc9ba117d4",
  1084. "isResizable": true,
  1085. "w": 6,
  1086. "x": 6,
  1087. "y": 28
  1088. },
  1089. "name": "Select per second",
  1090. "options": {
  1091. "legend": {
  1092. "displayMode": "hidden"
  1093. },
  1094. "standardOptions": {
  1095. "decimals": 2
  1096. },
  1097. "thresholds": {},
  1098. "tooltip": {
  1099. "mode": "all",
  1100. "sort": "desc"
  1101. }
  1102. },
  1103. "targets": [
  1104. {
  1105. "expr": "rate(mysql_global_status_commands_total{address=~\"$address\", command=\"select\"}[1m])",
  1106. "legend": "{{address}} "
  1107. }
  1108. ],
  1109. "type": "timeseries",
  1110. "version": "2.0.0"
  1111. },
  1112. {
  1113. "custom": {
  1114. "drawStyle": "lines",
  1115. "fillOpacity": 0.2,
  1116. "lineInterpolation": "smooth",
  1117. "stack": "noraml"
  1118. },
  1119. "datasourceCate": "prometheus",
  1120. "datasourceValue": "${datasource}",
  1121. "description": "",
  1122. "id": "01970b88-417a-4c75-9bd0-33eb017a7264",
  1123. "layout": {
  1124. "h": 4,
  1125. "i": "10a3834f-5074-4a0a-9013-03c42a78e2c5",
  1126. "isResizable": true,
  1127. "w": 6,
  1128. "x": 12,
  1129. "y": 28
  1130. },
  1131. "name": "Write(insert|update|delete) per second",
  1132. "options": {
  1133. "legend": {
  1134. "displayMode": "hidden"
  1135. },
  1136. "standardOptions": {
  1137. "decimals": 2
  1138. },
  1139. "thresholds": {},
  1140. "tooltip": {
  1141. "mode": "all",
  1142. "sort": "desc"
  1143. }
  1144. },
  1145. "targets": [
  1146. {
  1147. "expr": "rate(mysql_global_status_commands_total{address=~\"$address\", command=~\"insert|update|delete\"}[1m])",
  1148. "legend": "{{address}} {{command}}"
  1149. }
  1150. ],
  1151. "type": "timeseries",
  1152. "version": "2.0.0"
  1153. },
  1154. {
  1155. "custom": {
  1156. "drawStyle": "lines",
  1157. "fillOpacity": 0.2,
  1158. "gradientMode": "none",
  1159. "lineInterpolation": "smooth",
  1160. "lineWidth": 1,
  1161. "scaleDistribution": {
  1162. "type": "linear"
  1163. },
  1164. "spanNulls": false,
  1165. "stack": "noraml"
  1166. },
  1167. "datasourceCate": "prometheus",
  1168. "datasourceValue": "${datasource}",
  1169. "description": "",
  1170. "id": "958eae25-8c2a-4886-962f-eb12d57bd594",
  1171. "layout": {
  1172. "h": 4,
  1173. "i": "64603263-1433-4041-9078-65ca95e09932",
  1174. "isResizable": true,
  1175. "w": 6,
  1176. "x": 18,
  1177. "y": 28
  1178. },
  1179. "name": "TPS(commit|rollback)",
  1180. "options": {
  1181. "legend": {
  1182. "displayMode": "hidden"
  1183. },
  1184. "standardOptions": {
  1185. "decimals": 2
  1186. },
  1187. "thresholds": {
  1188. "steps": [
  1189. {
  1190. "color": "#634CD9",
  1191. "type": "base",
  1192. "value": null
  1193. }
  1194. ]
  1195. },
  1196. "tooltip": {
  1197. "mode": "all",
  1198. "sort": "desc"
  1199. }
  1200. },
  1201. "targets": [
  1202. {
  1203. "expr": "rate(mysql_global_status_commands_total{address=~\"$address\", command=~\"commit|rollback\"}[10m])",
  1204. "legend": "{{address}} {{command}}"
  1205. }
  1206. ],
  1207. "type": "timeseries",
  1208. "version": "2.0.0"
  1209. },
  1210. {
  1211. "custom": {
  1212. "drawStyle": "lines",
  1213. "fillOpacity": 0.3,
  1214. "gradientMode": "opacity",
  1215. "lineInterpolation": "smooth",
  1216. "lineWidth": 2,
  1217. "stack": "off"
  1218. },
  1219. "datasourceCate": "prometheus",
  1220. "datasourceValue": "${datasource}",
  1221. "description": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.",
  1222. "id": "d9623f6a-64f4-4520-b7b5-01abfc76144d",
  1223. "layout": {
  1224. "h": 4,
  1225. "i": "d9623f6a-64f4-4520-b7b5-01abfc76144d",
  1226. "isResizable": true,
  1227. "w": 12,
  1228. "x": 0,
  1229. "y": 32
  1230. },
  1231. "name": "MySQL Handlers",
  1232. "options": {
  1233. "legend": {
  1234. "displayMode": "hidden"
  1235. },
  1236. "standardOptions": {
  1237. "decimals": 3
  1238. },
  1239. "thresholds": {},
  1240. "tooltip": {
  1241. "mode": "all",
  1242. "sort": "desc"
  1243. }
  1244. },
  1245. "targets": [
  1246. {
  1247. "expr": "rate(mysql_global_status_handlers_total{address=~\"$address\", handler!~\"commit|rollback|savepoint.*|prepare\"}[5m])",
  1248. "legend": "{{address}} {{handler}}"
  1249. }
  1250. ],
  1251. "type": "timeseries",
  1252. "version": "2.0.0"
  1253. },
  1254. {
  1255. "custom": {
  1256. "drawStyle": "lines",
  1257. "fillOpacity": 0.3,
  1258. "gradientMode": "opacity",
  1259. "lineInterpolation": "smooth",
  1260. "lineWidth": 2,
  1261. "stack": "off"
  1262. },
  1263. "datasourceCate": "prometheus",
  1264. "datasourceValue": "${datasource}",
  1265. "id": "3a5ad3a4-5877-46e6-bb3d-bd71174c693e",
  1266. "layout": {
  1267. "h": 4,
  1268. "i": "3a5ad3a4-5877-46e6-bb3d-bd71174c693e",
  1269. "isResizable": true,
  1270. "w": 12,
  1271. "x": 12,
  1272. "y": 32
  1273. },
  1274. "name": "MySQL Transaction Handlers",
  1275. "options": {
  1276. "legend": {
  1277. "displayMode": "hidden"
  1278. },
  1279. "standardOptions": {},
  1280. "thresholds": {},
  1281. "tooltip": {
  1282. "mode": "all",
  1283. "sort": "desc"
  1284. }
  1285. },
  1286. "targets": [
  1287. {
  1288. "expr": "rate(mysql_global_status_handlers_total{address=~\"$address\", handler=~\"commit|rollback|savepoint.*|prepare\"}[5m])",
  1289. "legend": "{{address}} {{handler}}"
  1290. }
  1291. ],
  1292. "type": "timeseries",
  1293. "version": "2.0.0"
  1294. },
  1295. {
  1296. "collapsed": true,
  1297. "id": "4595a676-3d0e-4746-a881-260505002f64",
  1298. "layout": {
  1299. "h": 1,
  1300. "i": "4595a676-3d0e-4746-a881-260505002f64",
  1301. "isResizable": false,
  1302. "w": 24,
  1303. "x": 0,
  1304. "y": 36
  1305. },
  1306. "name": "Open Files",
  1307. "panels": [],
  1308. "type": "row"
  1309. },
  1310. {
  1311. "custom": {
  1312. "drawStyle": "lines",
  1313. "fillOpacity": 0.3,
  1314. "gradientMode": "opacity",
  1315. "lineInterpolation": "smooth",
  1316. "lineWidth": 2,
  1317. "stack": "off"
  1318. },
  1319. "datasourceCate": "prometheus",
  1320. "datasourceValue": "${datasource}",
  1321. "id": "ac66ac2b-e48b-4ba7-95e5-4846d616449a",
  1322. "layout": {
  1323. "h": 4,
  1324. "i": "ac66ac2b-e48b-4ba7-95e5-4846d616449a",
  1325. "isResizable": true,
  1326. "w": 24,
  1327. "x": 0,
  1328. "y": 37
  1329. },
  1330. "name": "MySQL Open Files",
  1331. "options": {
  1332. "legend": {
  1333. "displayMode": "hidden"
  1334. },
  1335. "standardOptions": {},
  1336. "thresholds": {},
  1337. "tooltip": {
  1338. "mode": "all",
  1339. "sort": "desc"
  1340. }
  1341. },
  1342. "targets": [
  1343. {
  1344. "expr": "mysql_global_variables_open_files_limit{address=~\"$address\"}",
  1345. "legend": "{{address}} Open Files Limit"
  1346. },
  1347. {
  1348. "expr": "mysql_global_status_open_files{address=~\"$address\"}",
  1349. "legend": "{{address}} Open Files"
  1350. }
  1351. ],
  1352. "type": "timeseries",
  1353. "version": "2.0.0"
  1354. },
  1355. {
  1356. "collapsed": true,
  1357. "id": "ddf0e641-3ef6-4be2-a90c-d013eb8a6c30",
  1358. "layout": {
  1359. "h": 1,
  1360. "i": "ddf0e641-3ef6-4be2-a90c-d013eb8a6c30",
  1361. "isResizable": false,
  1362. "w": 24,
  1363. "x": 0,
  1364. "y": 41
  1365. },
  1366. "name": "Table Openings",
  1367. "panels": [],
  1368. "type": "row"
  1369. },
  1370. {
  1371. "custom": {
  1372. "drawStyle": "lines",
  1373. "fillOpacity": 0.3,
  1374. "gradientMode": "opacity",
  1375. "lineInterpolation": "smooth",
  1376. "lineWidth": 2,
  1377. "stack": "off"
  1378. },
  1379. "datasourceCate": "prometheus",
  1380. "datasourceValue": "${datasource}",
  1381. "description": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).",
  1382. "id": "c215348c-ecdf-4480-8371-bc6a8d72da10",
  1383. "layout": {
  1384. "h": 4,
  1385. "i": "c215348c-ecdf-4480-8371-bc6a8d72da10",
  1386. "isResizable": true,
  1387. "w": 12,
  1388. "x": 0,
  1389. "y": 42
  1390. },
  1391. "name": "Table Open Cache Hit Ratio Mysql 5.6.6+",
  1392. "options": {
  1393. "legend": {
  1394. "displayMode": "hidden"
  1395. },
  1396. "standardOptions": {
  1397. "util": "percentUnit"
  1398. },
  1399. "thresholds": {},
  1400. "tooltip": {
  1401. "mode": "all",
  1402. "sort": "none"
  1403. }
  1404. },
  1405. "targets": [
  1406. {
  1407. "expr": "rate(mysql_global_status_table_open_cache_hits{address=~\"$address\"}[5m])\n/\n(\nrate(mysql_global_status_table_open_cache_hits{address=~\"$address\"}[5m])\n+\nrate(mysql_global_status_table_open_cache_misses{address=~\"$address\"}[5m])\n)",
  1408. "legend": "{{address}} Table Open Cache Hit Ratio"
  1409. }
  1410. ],
  1411. "type": "timeseries",
  1412. "version": "2.0.0"
  1413. },
  1414. {
  1415. "custom": {
  1416. "drawStyle": "lines",
  1417. "fillOpacity": 0.3,
  1418. "gradientMode": "opacity",
  1419. "lineInterpolation": "smooth",
  1420. "lineWidth": 2,
  1421. "stack": "off"
  1422. },
  1423. "datasourceCate": "prometheus",
  1424. "datasourceValue": "${datasource}",
  1425. "description": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).",
  1426. "id": "a8fde020-a904-4eaf-84e3-7dbc9f4febf5",
  1427. "layout": {
  1428. "h": 4,
  1429. "i": "a8fde020-a904-4eaf-84e3-7dbc9f4febf5",
  1430. "isResizable": true,
  1431. "w": 12,
  1432. "x": 12,
  1433. "y": 42
  1434. },
  1435. "name": "MySQL Open Tables",
  1436. "options": {
  1437. "legend": {
  1438. "displayMode": "hidden"
  1439. },
  1440. "standardOptions": {},
  1441. "thresholds": {},
  1442. "tooltip": {
  1443. "mode": "all",
  1444. "sort": "desc"
  1445. }
  1446. },
  1447. "targets": [
  1448. {
  1449. "expr": "mysql_global_status_open_tables{address=~\"$address\"}",
  1450. "legend": "{{address}} Open Tables"
  1451. },
  1452. {
  1453. "expr": "mysql_global_variables_table_open_cache{address=~\"$address\"}",
  1454. "legend": "{{address}} Table Open Cache"
  1455. }
  1456. ],
  1457. "type": "timeseries",
  1458. "version": "2.0.0"
  1459. },
  1460. {
  1461. "collapsed": true,
  1462. "id": "d70df2e3-bd10-4072-a027-0cc83235e972",
  1463. "layout": {
  1464. "h": 1,
  1465. "i": "d70df2e3-bd10-4072-a027-0cc83235e972",
  1466. "isResizable": false,
  1467. "w": 24,
  1468. "x": 0,
  1469. "y": 46
  1470. },
  1471. "name": "InnoDB",
  1472. "panels": [],
  1473. "type": "row"
  1474. },
  1475. {
  1476. "custom": {
  1477. "drawStyle": "lines",
  1478. "fillOpacity": 0.3,
  1479. "gradientMode": "opacity",
  1480. "lineInterpolation": "smooth",
  1481. "lineWidth": 2,
  1482. "stack": "off"
  1483. },
  1484. "datasourceCate": "prometheus",
  1485. "datasourceValue": "${datasource}",
  1486. "id": "2bce3a5c-1ec3-4789-9ce5-897a3e40de30",
  1487. "layout": {
  1488. "h": 4,
  1489. "i": "2bce3a5c-1ec3-4789-9ce5-897a3e40de30",
  1490. "isResizable": true,
  1491. "w": 6,
  1492. "x": 0,
  1493. "y": 47
  1494. },
  1495. "name": "Read requests / second",
  1496. "options": {
  1497. "legend": {
  1498. "displayMode": "hidden"
  1499. },
  1500. "standardOptions": {},
  1501. "thresholds": {},
  1502. "tooltip": {
  1503. "mode": "all",
  1504. "sort": "desc"
  1505. }
  1506. },
  1507. "targets": [
  1508. {
  1509. "expr": "rate(mysql_global_status_innodb_buffer_pool_read_requests{address=~\"$address\"}[1m])",
  1510. "legend": "{{address}}",
  1511. "refId": "A"
  1512. }
  1513. ],
  1514. "type": "timeseries",
  1515. "version": "2.0.0"
  1516. },
  1517. {
  1518. "custom": {
  1519. "drawStyle": "lines",
  1520. "fillOpacity": 0.3,
  1521. "gradientMode": "opacity",
  1522. "lineInterpolation": "smooth",
  1523. "lineWidth": 2,
  1524. "stack": "off"
  1525. },
  1526. "datasourceCate": "prometheus",
  1527. "datasourceValue": "${datasource}",
  1528. "id": "6bded8a5-383e-49ad-b61b-1b0c72a8a911",
  1529. "layout": {
  1530. "h": 4,
  1531. "i": "ab9b8335-2e25-40f6-9402-cd673dc7ae4e",
  1532. "isResizable": true,
  1533. "w": 6,
  1534. "x": 6,
  1535. "y": 47
  1536. },
  1537. "name": "Reads from disk / second",
  1538. "options": {
  1539. "legend": {
  1540. "displayMode": "hidden"
  1541. },
  1542. "standardOptions": {},
  1543. "thresholds": {},
  1544. "tooltip": {
  1545. "mode": "all",
  1546. "sort": "desc"
  1547. }
  1548. },
  1549. "targets": [
  1550. {
  1551. "expr": "rate(mysql_global_status_innodb_buffer_pool_reads{address=~\"$address\"}[1m])",
  1552. "legend": "{{address}}",
  1553. "refId": "A"
  1554. }
  1555. ],
  1556. "type": "timeseries",
  1557. "version": "2.0.0"
  1558. },
  1559. {
  1560. "custom": {
  1561. "drawStyle": "lines",
  1562. "fillOpacity": 0.3,
  1563. "gradientMode": "opacity",
  1564. "lineInterpolation": "smooth",
  1565. "lineWidth": 2,
  1566. "stack": "off"
  1567. },
  1568. "datasourceCate": "prometheus",
  1569. "datasourceValue": "${datasource}",
  1570. "id": "08e60f4e-f7fd-4513-bf08-f9514371fa94",
  1571. "layout": {
  1572. "h": 4,
  1573. "i": "763c8183-4315-474c-991e-f3ec78699b4e",
  1574. "isResizable": true,
  1575. "w": 12,
  1576. "x": 12,
  1577. "y": 47
  1578. },
  1579. "name": "Reads from memory percent",
  1580. "options": {
  1581. "legend": {
  1582. "displayMode": "hidden"
  1583. },
  1584. "standardOptions": {},
  1585. "thresholds": {},
  1586. "tooltip": {
  1587. "mode": "all",
  1588. "sort": "desc"
  1589. }
  1590. },
  1591. "targets": [
  1592. {
  1593. "expr": "100 - increase(mysql_global_status_innodb_buffer_pool_reads{address=~\"$address\"}[5m])/increase(mysql_global_status_innodb_buffer_pool_read_requests{address=~\"$address\"}[5m]) * 100",
  1594. "legend": "{{address}}",
  1595. "refId": "A"
  1596. }
  1597. ],
  1598. "type": "timeseries",
  1599. "version": "2.0.0"
  1600. },
  1601. {
  1602. "custom": {
  1603. "drawStyle": "lines",
  1604. "fillOpacity": 0.3,
  1605. "gradientMode": "opacity",
  1606. "lineInterpolation": "smooth",
  1607. "lineWidth": 2,
  1608. "stack": "off"
  1609. },
  1610. "datasourceCate": "prometheus",
  1611. "datasourceValue": "${datasource}",
  1612. "id": "768306ee-2092-42f6-8b92-7edaf09fdab0",
  1613. "layout": {
  1614. "h": 4,
  1615. "i": "25e1fc62-9e94-4a39-9fc3-2a174777f93b",
  1616. "isResizable": true,
  1617. "w": 6,
  1618. "x": 0,
  1619. "y": 51
  1620. },
  1621. "name": "Row lock waits / second",
  1622. "options": {
  1623. "legend": {
  1624. "displayMode": "hidden"
  1625. },
  1626. "standardOptions": {},
  1627. "thresholds": {},
  1628. "tooltip": {
  1629. "mode": "all",
  1630. "sort": "desc"
  1631. }
  1632. },
  1633. "targets": [
  1634. {
  1635. "expr": "rate(mysql_global_status_innodb_row_lock_waits{address=~\"$address\"}[1m])",
  1636. "legend": "{{address}}",
  1637. "refId": "A"
  1638. }
  1639. ],
  1640. "type": "timeseries",
  1641. "version": "2.0.0"
  1642. },
  1643. {
  1644. "custom": {
  1645. "drawStyle": "lines",
  1646. "fillOpacity": 0.3,
  1647. "gradientMode": "opacity",
  1648. "lineInterpolation": "smooth",
  1649. "lineWidth": 2,
  1650. "stack": "off"
  1651. },
  1652. "datasourceCate": "prometheus",
  1653. "datasourceValue": "${datasource}",
  1654. "id": "722ff93d-630f-4921-a1f4-8240af974fd3",
  1655. "layout": {
  1656. "h": 4,
  1657. "i": "37679c80-588d-45e3-b2ac-3e0dad4be32a",
  1658. "isResizable": true,
  1659. "w": 6,
  1660. "x": 6,
  1661. "y": 51
  1662. },
  1663. "name": "Row lock time / second",
  1664. "options": {
  1665. "legend": {
  1666. "displayMode": "hidden"
  1667. },
  1668. "standardOptions": {},
  1669. "thresholds": {},
  1670. "tooltip": {
  1671. "mode": "all",
  1672. "sort": "desc"
  1673. }
  1674. },
  1675. "targets": [
  1676. {
  1677. "expr": "rate(mysql_global_status_innodb_row_lock_time{address=~\"$address\"}[1m])",
  1678. "legend": "{{address}}",
  1679. "refId": "A"
  1680. }
  1681. ],
  1682. "type": "timeseries",
  1683. "version": "2.0.0"
  1684. },
  1685. {
  1686. "custom": {
  1687. "drawStyle": "lines",
  1688. "fillOpacity": 0.3,
  1689. "gradientMode": "opacity",
  1690. "lineInterpolation": "smooth",
  1691. "lineWidth": 2,
  1692. "stack": "off"
  1693. },
  1694. "datasourceCate": "prometheus",
  1695. "datasourceValue": "${datasource}",
  1696. "id": "3f8ba45a-a9bc-4420-980d-382c2638cda0",
  1697. "layout": {
  1698. "h": 4,
  1699. "i": "33c8d0e1-03a3-4a3f-8b20-7b5b6373bdb0",
  1700. "isResizable": true,
  1701. "w": 6,
  1702. "x": 12,
  1703. "y": 51
  1704. },
  1705. "name": "Log fsyncs / second",
  1706. "options": {
  1707. "legend": {
  1708. "displayMode": "hidden"
  1709. },
  1710. "standardOptions": {},
  1711. "thresholds": {},
  1712. "tooltip": {
  1713. "mode": "all",
  1714. "sort": "desc"
  1715. }
  1716. },
  1717. "targets": [
  1718. {
  1719. "expr": "rate(mysql_global_status_innodb_os_log_fsyncs{address=~\"$address\"}[1m])",
  1720. "legend": "{{address}}",
  1721. "refId": "A"
  1722. }
  1723. ],
  1724. "type": "timeseries",
  1725. "version": "2.0.0"
  1726. },
  1727. {
  1728. "custom": {
  1729. "drawStyle": "lines",
  1730. "fillOpacity": 0.3,
  1731. "gradientMode": "opacity",
  1732. "lineInterpolation": "smooth",
  1733. "lineWidth": 2,
  1734. "scaleDistribution": {
  1735. "type": "linear"
  1736. },
  1737. "spanNulls": false,
  1738. "stack": "off"
  1739. },
  1740. "datasourceCate": "prometheus",
  1741. "datasourceValue": "${datasource}",
  1742. "id": "c98ff938-5076-4217-bb0f-e082f34cc6bb",
  1743. "layout": {
  1744. "h": 4,
  1745. "i": "c5b892ee-bc0d-4fe9-b57d-7132c329752d",
  1746. "isResizable": true,
  1747. "w": 6,
  1748. "x": 18,
  1749. "y": 51
  1750. },
  1751. "name": "Buffer Pool Pages Utilization %",
  1752. "options": {
  1753. "legend": {
  1754. "displayMode": "hidden"
  1755. },
  1756. "standardOptions": {},
  1757. "thresholds": {
  1758. "steps": [
  1759. {
  1760. "color": "#634CD9",
  1761. "type": "base",
  1762. "value": null
  1763. }
  1764. ]
  1765. },
  1766. "tooltip": {
  1767. "mode": "all",
  1768. "sort": "desc"
  1769. }
  1770. },
  1771. "targets": [
  1772. {
  1773. "expr": "mysql_global_status_buffer_pool_pages_utilization{address=~\"$address\"}",
  1774. "legend": "{{address}}",
  1775. "refId": "A"
  1776. }
  1777. ],
  1778. "type": "timeseries",
  1779. "version": "2.0.0"
  1780. }
  1781. ],
  1782. "var": [
  1783. {
  1784. "definition": "prometheus",
  1785. "name": "datasource",
  1786. "type": "datasource"
  1787. },
  1788. {
  1789. "allOption": true,
  1790. "allValue": ".*",
  1791. "datasource": {
  1792. "cate": "prometheus",
  1793. "value": "${datasource}"
  1794. },
  1795. "definition": "label_values(mysql_global_status_uptime, address)",
  1796. "hide": false,
  1797. "multi": true,
  1798. "name": "address",
  1799. "type": "query"
  1800. }
  1801. ],
  1802. "version": "3.0.0"
  1803. },
  1804. "uuid": 1731986330320000
  1805. }