grafana_dashboard.json 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. {
  2. "__inputs": [
  3. {
  4. "name": "DS_INFLUXDB",
  5. "label": "InfluxDB",
  6. "description": "",
  7. "type": "datasource",
  8. "pluginId": "influxdb",
  9. "pluginName": "InfluxDB"
  10. }
  11. ],
  12. "__elements": {},
  13. "__requires": [
  14. {
  15. "type": "grafana",
  16. "id": "grafana",
  17. "name": "Grafana",
  18. "version": "11.1.3"
  19. },
  20. {
  21. "type": "datasource",
  22. "id": "influxdb",
  23. "name": "InfluxDB",
  24. "version": "1.0.0"
  25. },
  26. {
  27. "type": "panel",
  28. "id": "stat",
  29. "name": "Stat",
  30. "version": ""
  31. }
  32. ],
  33. "annotations": {
  34. "list": [
  35. {
  36. "builtIn": 1,
  37. "datasource": {
  38. "type": "grafana",
  39. "uid": "-- Grafana --"
  40. },
  41. "enable": true,
  42. "hide": true,
  43. "iconColor": "rgba(0, 211, 255, 1)",
  44. "name": "Annotations & Alerts",
  45. "type": "dashboard"
  46. }
  47. ]
  48. },
  49. "editable": true,
  50. "fiscalYearStartMonth": 0,
  51. "graphTooltip": 0,
  52. "id": null,
  53. "links": [],
  54. "liveNow": false,
  55. "panels": [
  56. {
  57. "collapsed": false,
  58. "gridPos": {
  59. "h": 1,
  60. "w": 24,
  61. "x": 0,
  62. "y": 0
  63. },
  64. "id": 2,
  65. "panels": [],
  66. "repeat": "hostname",
  67. "repeatDirection": "h",
  68. "title": "${hostname}",
  69. "type": "row"
  70. },
  71. {
  72. "datasource": {
  73. "type": "influxdb",
  74. "uid": "${DS_INFLUXDB}"
  75. },
  76. "fieldConfig": {
  77. "defaults": {
  78. "color": {
  79. "fixedColor": "green",
  80. "mode": "thresholds"
  81. },
  82. "mappings": [],
  83. "thresholds": {
  84. "mode": "absolute",
  85. "steps": [
  86. {
  87. "color": "red",
  88. "value": null
  89. },
  90. {
  91. "color": "orange",
  92. "value": -604800
  93. },
  94. {
  95. "color": "yellow",
  96. "value": -172800
  97. },
  98. {
  99. "color": "green",
  100. "value": -86400
  101. }
  102. ]
  103. },
  104. "unit": "dtdurations"
  105. },
  106. "overrides": []
  107. },
  108. "gridPos": {
  109. "h": 7,
  110. "w": 6,
  111. "x": 0,
  112. "y": 1
  113. },
  114. "id": 1,
  115. "options": {
  116. "colorMode": "value",
  117. "graphMode": "area",
  118. "justifyMode": "auto",
  119. "orientation": "auto",
  120. "percentChangeColorMode": "standard",
  121. "reduceOptions": {
  122. "calcs": [
  123. "lastNotNull"
  124. ],
  125. "fields": "",
  126. "values": false
  127. },
  128. "showPercentChange": false,
  129. "textMode": "auto",
  130. "wideLayout": true
  131. },
  132. "pluginVersion": "11.1.3",
  133. "targets": [
  134. {
  135. "datasource": {
  136. "type": "influxdb",
  137. "uid": "${DS_INFLUXDB}"
  138. },
  139. "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"name\")\n |> last()\n |> map(fn: (r) => ({r with _value: (int(v: r[\"_time\"]) - int(v: now())) / 1000000000}))\n |> yield(name: \"last\")",
  140. "refId": "A"
  141. }
  142. ],
  143. "title": "Last Backup",
  144. "transparent": true,
  145. "type": "stat"
  146. },
  147. {
  148. "datasource": {
  149. "type": "influxdb",
  150. "uid": "${DS_INFLUXDB}"
  151. },
  152. "description": "",
  153. "fieldConfig": {
  154. "defaults": {
  155. "color": {
  156. "mode": "thresholds"
  157. },
  158. "mappings": [],
  159. "thresholds": {
  160. "mode": "absolute",
  161. "steps": [
  162. {
  163. "color": "green",
  164. "value": null
  165. },
  166. {
  167. "color": "yellow",
  168. "value": 109951162778
  169. },
  170. {
  171. "color": "orange",
  172. "value": 549755813888
  173. },
  174. {
  175. "color": "red",
  176. "value": 879609302231
  177. }
  178. ]
  179. },
  180. "unit": "bytes"
  181. },
  182. "overrides": []
  183. },
  184. "gridPos": {
  185. "h": 7,
  186. "w": 10,
  187. "x": 6,
  188. "y": 1
  189. },
  190. "id": 3,
  191. "options": {
  192. "colorMode": "value",
  193. "graphMode": "area",
  194. "justifyMode": "auto",
  195. "orientation": "auto",
  196. "percentChangeColorMode": "standard",
  197. "reduceOptions": {
  198. "calcs": [
  199. "lastNotNull"
  200. ],
  201. "fields": "",
  202. "values": false
  203. },
  204. "showPercentChange": false,
  205. "textMode": "auto",
  206. "wideLayout": true
  207. },
  208. "pluginVersion": "11.1.3",
  209. "targets": [
  210. {
  211. "datasource": {
  212. "type": "influxdb",
  213. "uid": "${DS_INFLUXDB}"
  214. },
  215. "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"original_size\" or r[\"_field\"] == \"deduplicated_size\" or r[\"_field\"] == \"compressed_size\")\n |> drop(columns: [\"hostname\", \"repo_location\"])\n |> yield(name: \"last\")",
  216. "refId": "A"
  217. }
  218. ],
  219. "title": "Size",
  220. "transparent": true,
  221. "type": "stat"
  222. },
  223. {
  224. "datasource": {
  225. "type": "influxdb",
  226. "uid": "${DS_INFLUXDB}"
  227. },
  228. "description": "",
  229. "fieldConfig": {
  230. "defaults": {
  231. "color": {
  232. "mode": "thresholds"
  233. },
  234. "mappings": [],
  235. "thresholds": {
  236. "mode": "absolute",
  237. "steps": [
  238. {
  239. "color": "green",
  240. "value": null
  241. },
  242. {
  243. "color": "yellow",
  244. "value": 300
  245. },
  246. {
  247. "color": "orange",
  248. "value": 600
  249. },
  250. {
  251. "color": "red",
  252. "value": 1800
  253. }
  254. ]
  255. },
  256. "unit": "s"
  257. },
  258. "overrides": []
  259. },
  260. "gridPos": {
  261. "h": 7,
  262. "w": 4,
  263. "x": 16,
  264. "y": 1
  265. },
  266. "id": 4,
  267. "options": {
  268. "colorMode": "value",
  269. "graphMode": "area",
  270. "justifyMode": "auto",
  271. "orientation": "auto",
  272. "percentChangeColorMode": "standard",
  273. "reduceOptions": {
  274. "calcs": [
  275. "lastNotNull"
  276. ],
  277. "fields": "",
  278. "values": false
  279. },
  280. "showPercentChange": false,
  281. "textMode": "auto",
  282. "wideLayout": true
  283. },
  284. "pluginVersion": "11.1.3",
  285. "targets": [
  286. {
  287. "datasource": {
  288. "type": "influxdb",
  289. "uid": "${DS_INFLUXDB}"
  290. },
  291. "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"duration\")\n |> drop(columns: [\"hostname\", \"repo_location\"])\n |> yield(name: \"last\")",
  292. "refId": "A"
  293. }
  294. ],
  295. "title": "Duration",
  296. "transparent": true,
  297. "type": "stat"
  298. },
  299. {
  300. "datasource": {
  301. "type": "influxdb",
  302. "uid": "${DS_INFLUXDB}"
  303. },
  304. "description": "",
  305. "fieldConfig": {
  306. "defaults": {
  307. "color": {
  308. "mode": "thresholds"
  309. },
  310. "mappings": [],
  311. "thresholds": {
  312. "mode": "absolute",
  313. "steps": [
  314. {
  315. "color": "green",
  316. "value": null
  317. }
  318. ]
  319. },
  320. "unit": "none"
  321. },
  322. "overrides": []
  323. },
  324. "gridPos": {
  325. "h": 7,
  326. "w": 4,
  327. "x": 20,
  328. "y": 1
  329. },
  330. "id": 9,
  331. "options": {
  332. "colorMode": "value",
  333. "graphMode": "area",
  334. "justifyMode": "auto",
  335. "orientation": "auto",
  336. "percentChangeColorMode": "standard",
  337. "reduceOptions": {
  338. "calcs": [
  339. "lastNotNull"
  340. ],
  341. "fields": "",
  342. "values": false
  343. },
  344. "showPercentChange": false,
  345. "textMode": "auto",
  346. "wideLayout": true
  347. },
  348. "pluginVersion": "11.1.3",
  349. "targets": [
  350. {
  351. "datasource": {
  352. "type": "influxdb",
  353. "uid": "${DS_INFLUXDB}"
  354. },
  355. "query": "from(bucket: \"borg\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"info\")\n |> filter(fn: (r) => r[\"hostname\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"nfiles\")\n |> drop(columns: [\"hostname\", \"repo_location\"])\n |> yield(name: \"last\")",
  356. "refId": "A"
  357. }
  358. ],
  359. "title": "File count",
  360. "transparent": true,
  361. "type": "stat"
  362. }
  363. ],
  364. "refresh": "",
  365. "schemaVersion": 39,
  366. "tags": [],
  367. "templating": {
  368. "list": [
  369. {
  370. "current": {},
  371. "datasource": {
  372. "type": "influxdb",
  373. "uid": "${DS_INFLUXDB}"
  374. },
  375. "definition": "import \"influxdata/influxdb/schema\"\nschema.tagValues(\n bucket: \"borg\",\n tag: \"hostname\"\n)",
  376. "hide": 0,
  377. "includeAll": false,
  378. "label": "Hostname",
  379. "multi": true,
  380. "name": "hostname",
  381. "options": [],
  382. "query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(\n bucket: \"borg\",\n tag: \"hostname\"\n)",
  383. "refresh": 1,
  384. "regex": "",
  385. "skipUrlSync": false,
  386. "sort": 0,
  387. "type": "query"
  388. }
  389. ]
  390. },
  391. "time": {
  392. "from": "now-90d",
  393. "to": "now"
  394. },
  395. "timepicker": {},
  396. "timezone": "",
  397. "title": "Backups",
  398. "uid": "f75cc020-f0e2-4877-a276-b4aafe9c4a8b",
  399. "version": 6,
  400. "weekStart": ""
  401. }