dashboard.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. {
  2. "__inputs": [
  3. {
  4. "name": "DS_MYSQL",
  5. "label": "MySQL",
  6. "description": "",
  7. "type": "datasource",
  8. "pluginId": "mysql",
  9. "pluginName": "MySQL"
  10. }
  11. ],
  12. "__requires": [
  13. {
  14. "type": "grafana",
  15. "id": "grafana",
  16. "name": "Grafana",
  17. "version": "5.0.0"
  18. },
  19. {
  20. "type": "panel",
  21. "id": "graph",
  22. "name": "Graph",
  23. "version": "5.0.0"
  24. },
  25. {
  26. "type": "datasource",
  27. "id": "mysql",
  28. "name": "MySQL",
  29. "version": "5.0.0"
  30. },
  31. {
  32. "type": "panel",
  33. "id": "table",
  34. "name": "Table",
  35. "version": "5.0.0"
  36. }
  37. ],
  38. "annotations": {
  39. "list": [
  40. {
  41. "builtIn": 1,
  42. "datasource": "-- Grafana --",
  43. "enable": true,
  44. "hide": true,
  45. "iconColor": "rgba(0, 211, 255, 1)",
  46. "name": "Annotations & Alerts",
  47. "type": "dashboard"
  48. }
  49. ]
  50. },
  51. "description": "A dashboard visualizing data generated from grafana/fake-data-gen",
  52. "editable": true,
  53. "gnetId": null,
  54. "graphTooltip": 0,
  55. "id": null,
  56. "iteration": 1523372133566,
  57. "links": [],
  58. "panels": [
  59. {
  60. "aliasColors": {
  61. "total avg": "#6ed0e0"
  62. },
  63. "bars": false,
  64. "dashLength": 10,
  65. "dashes": false,
  66. "datasource": "${DS_MYSQL}",
  67. "fill": 2,
  68. "gridPos": {
  69. "h": 9,
  70. "w": 12,
  71. "x": 0,
  72. "y": 0
  73. },
  74. "id": 2,
  75. "legend": {
  76. "avg": false,
  77. "current": false,
  78. "max": false,
  79. "min": false,
  80. "show": true,
  81. "total": false,
  82. "values": false
  83. },
  84. "lines": true,
  85. "linewidth": 2,
  86. "links": [],
  87. "nullPointMode": "null",
  88. "percentage": false,
  89. "pointradius": 5,
  90. "points": false,
  91. "renderer": "flot",
  92. "seriesOverrides": [
  93. {
  94. "alias": "total avg",
  95. "fill": 0,
  96. "pointradius": 3,
  97. "points": true
  98. }
  99. ],
  100. "spaceLength": 10,
  101. "stack": false,
  102. "steppedLine": false,
  103. "targets": [
  104. {
  105. "alias": "",
  106. "format": "time_series",
  107. "hide": false,
  108. "rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n avg(value) as value,\n hostname as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'logins.count' AND\n hostname IN($host)\nGROUP BY 1, 3\nORDER BY 1",
  109. "refId": "A",
  110. "target": ""
  111. },
  112. {
  113. "alias": "",
  114. "format": "time_series",
  115. "rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n min(value) as value,\n 'total avg' as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'logins.count'\nGROUP BY 1\nORDER BY 1",
  116. "refId": "B"
  117. }
  118. ],
  119. "thresholds": [],
  120. "timeFrom": null,
  121. "timeShift": null,
  122. "title": "Average logins / $summarize",
  123. "tooltip": {
  124. "shared": true,
  125. "sort": 0,
  126. "value_type": "individual"
  127. },
  128. "type": "graph",
  129. "xaxis": {
  130. "buckets": null,
  131. "mode": "time",
  132. "name": null,
  133. "show": true,
  134. "values": []
  135. },
  136. "yaxes": [
  137. {
  138. "format": "short",
  139. "label": null,
  140. "logBase": 1,
  141. "max": null,
  142. "min": null,
  143. "show": true
  144. },
  145. {
  146. "format": "short",
  147. "label": null,
  148. "logBase": 1,
  149. "max": null,
  150. "min": null,
  151. "show": true
  152. }
  153. ],
  154. "yaxis": {
  155. "align": false,
  156. "alignLevel": null
  157. }
  158. },
  159. {
  160. "aliasColors": {},
  161. "bars": false,
  162. "dashLength": 10,
  163. "dashes": false,
  164. "datasource": "${DS_MYSQL}",
  165. "fill": 2,
  166. "gridPos": {
  167. "h": 18,
  168. "w": 12,
  169. "x": 12,
  170. "y": 0
  171. },
  172. "id": 4,
  173. "legend": {
  174. "avg": false,
  175. "current": false,
  176. "max": false,
  177. "min": false,
  178. "show": true,
  179. "total": false,
  180. "values": false
  181. },
  182. "lines": true,
  183. "linewidth": 2,
  184. "links": [],
  185. "nullPointMode": "null",
  186. "percentage": false,
  187. "pointradius": 5,
  188. "points": false,
  189. "renderer": "flot",
  190. "seriesOverrides": [],
  191. "spaceLength": 10,
  192. "stack": false,
  193. "steppedLine": false,
  194. "targets": [
  195. {
  196. "alias": "",
  197. "format": "time_series",
  198. "rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n avg(value) as value,\n 'started' as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'payment.started'\nGROUP BY 1, 3\nORDER BY 1",
  199. "refId": "A",
  200. "target": ""
  201. },
  202. {
  203. "alias": "",
  204. "format": "time_series",
  205. "rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n avg(value) as value,\n 'ended' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'payment.ended'\nGROUP BY 1, 3\nORDER BY 1",
  206. "refId": "B"
  207. }
  208. ],
  209. "thresholds": [],
  210. "timeFrom": null,
  211. "timeShift": null,
  212. "title": "Average payments started/ended / $summarize",
  213. "tooltip": {
  214. "shared": true,
  215. "sort": 0,
  216. "value_type": "individual"
  217. },
  218. "type": "graph",
  219. "xaxis": {
  220. "buckets": null,
  221. "mode": "time",
  222. "name": null,
  223. "show": true,
  224. "values": []
  225. },
  226. "yaxes": [
  227. {
  228. "format": "short",
  229. "label": null,
  230. "logBase": 1,
  231. "max": null,
  232. "min": null,
  233. "show": true
  234. },
  235. {
  236. "format": "short",
  237. "label": null,
  238. "logBase": 1,
  239. "max": null,
  240. "min": null,
  241. "show": true
  242. }
  243. ],
  244. "yaxis": {
  245. "align": false,
  246. "alignLevel": null
  247. }
  248. },
  249. {
  250. "aliasColors": {},
  251. "bars": false,
  252. "dashLength": 10,
  253. "dashes": false,
  254. "datasource": "${DS_MYSQL}",
  255. "fill": 2,
  256. "gridPos": {
  257. "h": 9,
  258. "w": 12,
  259. "x": 0,
  260. "y": 9
  261. },
  262. "id": 3,
  263. "legend": {
  264. "avg": false,
  265. "current": false,
  266. "max": false,
  267. "min": false,
  268. "show": true,
  269. "total": false,
  270. "values": false
  271. },
  272. "lines": true,
  273. "linewidth": 2,
  274. "links": [],
  275. "nullPointMode": "null",
  276. "percentage": false,
  277. "pointradius": 5,
  278. "points": false,
  279. "renderer": "flot",
  280. "seriesOverrides": [],
  281. "spaceLength": 10,
  282. "stack": false,
  283. "steppedLine": false,
  284. "targets": [
  285. {
  286. "alias": "",
  287. "format": "time_series",
  288. "rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n max(value) as value,\n hostname as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'cpu' AND\n hostname IN($host)\nGROUP BY 1, 3\nORDER BY 1",
  289. "refId": "A",
  290. "target": ""
  291. }
  292. ],
  293. "thresholds": [],
  294. "timeFrom": null,
  295. "timeShift": null,
  296. "title": "Max CPU / $summarize",
  297. "tooltip": {
  298. "shared": true,
  299. "sort": 0,
  300. "value_type": "individual"
  301. },
  302. "type": "graph",
  303. "xaxis": {
  304. "buckets": null,
  305. "mode": "time",
  306. "name": null,
  307. "show": true,
  308. "values": []
  309. },
  310. "yaxes": [
  311. {
  312. "format": "percent",
  313. "label": null,
  314. "logBase": 1,
  315. "max": null,
  316. "min": null,
  317. "show": true
  318. },
  319. {
  320. "format": "short",
  321. "label": null,
  322. "logBase": 1,
  323. "max": null,
  324. "min": null,
  325. "show": true
  326. }
  327. ],
  328. "yaxis": {
  329. "align": false,
  330. "alignLevel": null
  331. }
  332. },
  333. {
  334. "columns": [],
  335. "datasource": "${DS_MYSQL}",
  336. "fontSize": "100%",
  337. "gridPos": {
  338. "h": 9,
  339. "w": 24,
  340. "x": 0,
  341. "y": 18
  342. },
  343. "id": 6,
  344. "links": [],
  345. "pageSize": null,
  346. "scroll": true,
  347. "showHeader": true,
  348. "sort": {
  349. "col": 0,
  350. "desc": true
  351. },
  352. "styles": [
  353. {
  354. "alias": "Time",
  355. "dateFormat": "YYYY-MM-DD HH:mm:ss",
  356. "link": false,
  357. "pattern": "Time",
  358. "type": "date"
  359. },
  360. {
  361. "alias": "",
  362. "colorMode": null,
  363. "colors": [
  364. "rgba(245, 54, 54, 0.9)",
  365. "rgba(237, 129, 40, 0.89)",
  366. "rgba(50, 172, 45, 0.97)"
  367. ],
  368. "decimals": 2,
  369. "pattern": "/.*/",
  370. "thresholds": [],
  371. "type": "number",
  372. "unit": "short"
  373. }
  374. ],
  375. "targets": [
  376. {
  377. "alias": "",
  378. "format": "table",
  379. "rawSql": "SELECT createdAt as Time, source, datacenter, hostname, value FROM grafana_metric WHERE hostname in($host)",
  380. "refId": "A",
  381. "target": ""
  382. }
  383. ],
  384. "timeShift": null,
  385. "title": "Values",
  386. "transform": "table",
  387. "type": "table"
  388. }
  389. ],
  390. "schemaVersion": 16,
  391. "style": "dark",
  392. "tags": [
  393. "fake-data-gen",
  394. "mysql"
  395. ],
  396. "templating": {
  397. "list": [
  398. {
  399. "allValue": null,
  400. "current": {},
  401. "datasource": "${DS_MYSQL}",
  402. "hide": 0,
  403. "includeAll": false,
  404. "label": "Datacenter",
  405. "multi": false,
  406. "name": "datacenter",
  407. "options": [],
  408. "query": "SELECT DISTINCT datacenter FROM grafana_metric",
  409. "refresh": 1,
  410. "regex": "",
  411. "sort": 1,
  412. "tagValuesQuery": "",
  413. "tags": [],
  414. "tagsQuery": "",
  415. "type": "query",
  416. "useTags": false
  417. },
  418. {
  419. "allValue": null,
  420. "current": {},
  421. "datasource": "${DS_MYSQL}",
  422. "hide": 0,
  423. "includeAll": true,
  424. "label": "Hostname",
  425. "multi": true,
  426. "name": "host",
  427. "options": [],
  428. "query": "SELECT DISTINCT hostname FROM grafana_metric WHERE datacenter='$datacenter'",
  429. "refresh": 1,
  430. "regex": "",
  431. "sort": 1,
  432. "tagValuesQuery": "",
  433. "tags": [],
  434. "tagsQuery": "",
  435. "type": "query",
  436. "useTags": false
  437. },
  438. {
  439. "auto": false,
  440. "auto_count": 5,
  441. "auto_min": "10s",
  442. "current": {
  443. "text": "1m",
  444. "value": "1m"
  445. },
  446. "hide": 0,
  447. "label": "Summarize",
  448. "name": "summarize",
  449. "options": [
  450. {
  451. "selected": false,
  452. "text": "1s",
  453. "value": "1s"
  454. },
  455. {
  456. "selected": false,
  457. "text": "10s",
  458. "value": "10s"
  459. },
  460. {
  461. "selected": false,
  462. "text": "30s",
  463. "value": "30s"
  464. },
  465. {
  466. "selected": true,
  467. "text": "1m",
  468. "value": "1m"
  469. },
  470. {
  471. "selected": false,
  472. "text": "5m",
  473. "value": "5m"
  474. },
  475. {
  476. "selected": false,
  477. "text": "10m",
  478. "value": "10m"
  479. },
  480. {
  481. "selected": false,
  482. "text": "30m",
  483. "value": "30m"
  484. },
  485. {
  486. "selected": false,
  487. "text": "1h",
  488. "value": "1h"
  489. },
  490. {
  491. "selected": false,
  492. "text": "6h",
  493. "value": "6h"
  494. },
  495. {
  496. "selected": false,
  497. "text": "12h",
  498. "value": "12h"
  499. },
  500. {
  501. "selected": false,
  502. "text": "1d",
  503. "value": "1d"
  504. },
  505. {
  506. "selected": false,
  507. "text": "7d",
  508. "value": "7d"
  509. },
  510. {
  511. "selected": false,
  512. "text": "14d",
  513. "value": "14d"
  514. },
  515. {
  516. "selected": false,
  517. "text": "30d",
  518. "value": "30d"
  519. }
  520. ],
  521. "query": "1s,10s,30s,1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
  522. "refresh": 2,
  523. "type": "interval"
  524. }
  525. ]
  526. },
  527. "time": {
  528. "from": "now-1h",
  529. "to": "now"
  530. },
  531. "timepicker": {
  532. "refresh_intervals": [
  533. "5s",
  534. "10s",
  535. "30s",
  536. "1m",
  537. "5m",
  538. "15m",
  539. "30m",
  540. "1h",
  541. "2h",
  542. "1d"
  543. ],
  544. "time_options": [
  545. "5m",
  546. "15m",
  547. "1h",
  548. "6h",
  549. "12h",
  550. "24h",
  551. "2d",
  552. "7d",
  553. "30d"
  554. ]
  555. },
  556. "timezone": "",
  557. "title": "Grafana Fake Data Gen - MySQL",
  558. "uid": "DGsCac3kz",
  559. "version": 8
  560. }