dashboard.json 12 KB

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