datasource_tests_postgres_fakedata.json 12 KB

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