dashboard.json 12 KB

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