postgres_fakedata.json 12 KB

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