dashboard.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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. "editable": true,
  16. "gnetId": null,
  17. "graphTooltip": 0,
  18. "id": 1,
  19. "links": [],
  20. "panels": [
  21. {
  22. "datasource": null,
  23. "description": "",
  24. "fieldConfig": {
  25. "defaults": {
  26. "color": {
  27. "mode": "thresholds"
  28. },
  29. "decimals": 1,
  30. "mappings": [],
  31. "max": 300,
  32. "min": 0,
  33. "thresholds": {
  34. "mode": "absolute",
  35. "steps": [
  36. {
  37. "color": "red",
  38. "value": null
  39. },
  40. {
  41. "color": "orange",
  42. "value": 30
  43. },
  44. {
  45. "color": "yellow",
  46. "value": 100
  47. },
  48. {
  49. "color": "green",
  50. "value": 160
  51. }
  52. ]
  53. },
  54. "unit": "watt"
  55. },
  56. "overrides": []
  57. },
  58. "gridPos": {
  59. "h": 7,
  60. "w": 24,
  61. "x": 0,
  62. "y": 0
  63. },
  64. "id": 4,
  65. "maxDataPoints": 1,
  66. "options": {
  67. "reduceOptions": {
  68. "calcs": [
  69. "lastNotNull"
  70. ],
  71. "fields": "",
  72. "values": false
  73. },
  74. "showThresholdLabels": false,
  75. "showThresholdMarkers": true,
  76. "text": {}
  77. },
  78. "pluginVersion": "7.5.7",
  79. "targets": [
  80. {
  81. "groupBy": [
  82. {
  83. "params": [
  84. "$__interval"
  85. ],
  86. "type": "time"
  87. },
  88. {
  89. "params": [
  90. "null"
  91. ],
  92. "type": "fill"
  93. }
  94. ],
  95. "orderByTime": "ASC",
  96. "policy": "default",
  97. "query": "from(bucket: \"influxdb\")\n |> range(start: -1m)\n |> filter(fn: (r) =>\n r._measurement == \"solar\"\n )\n |> aggregateWindow(\n every: 10s,\n fn: (tables=<-, column) => tables |> median(),\n )\n ",
  98. "refId": "A",
  99. "resultFormat": "time_series",
  100. "select": [
  101. [
  102. {
  103. "params": [
  104. "value"
  105. ],
  106. "type": "field"
  107. },
  108. {
  109. "params": [],
  110. "type": "mean"
  111. }
  112. ]
  113. ],
  114. "tags": []
  115. }
  116. ],
  117. "title": "Current Input",
  118. "transformations": [
  119. {
  120. "id": "reduce",
  121. "options": {
  122. "includeTimeField": false,
  123. "mode": "reduceFields",
  124. "reducers": [
  125. "mean"
  126. ]
  127. }
  128. },
  129. {
  130. "id": "filterFieldsByName",
  131. "options": {
  132. "include": {
  133. "names": [
  134. "value W"
  135. ]
  136. }
  137. }
  138. }
  139. ],
  140. "type": "gauge"
  141. },
  142. {
  143. "datasource": null,
  144. "description": "",
  145. "fieldConfig": {
  146. "defaults": {
  147. "color": {
  148. "mode": "thresholds"
  149. },
  150. "mappings": [],
  151. "max": 0,
  152. "thresholds": {
  153. "mode": "absolute",
  154. "steps": [
  155. {
  156. "color": "green",
  157. "value": null
  158. }
  159. ]
  160. },
  161. "unit": "watth"
  162. },
  163. "overrides": []
  164. },
  165. "gridPos": {
  166. "h": 8,
  167. "w": 10,
  168. "x": 0,
  169. "y": 7
  170. },
  171. "id": 8,
  172. "interval": null,
  173. "maxDataPoints": 100,
  174. "options": {
  175. "colorMode": "value",
  176. "graphMode": "none",
  177. "justifyMode": "auto",
  178. "orientation": "auto",
  179. "reduceOptions": {
  180. "calcs": [
  181. "lastNotNull"
  182. ],
  183. "fields": "",
  184. "values": false
  185. },
  186. "text": {},
  187. "textMode": "auto"
  188. },
  189. "pluginVersion": "7.5.7",
  190. "targets": [
  191. {
  192. "groupBy": [
  193. {
  194. "params": [
  195. "$__interval"
  196. ],
  197. "type": "time"
  198. },
  199. {
  200. "params": [
  201. "null"
  202. ],
  203. "type": "fill"
  204. }
  205. ],
  206. "orderByTime": "ASC",
  207. "policy": "default",
  208. "query": "from(bucket: \"influxdb\")\r\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n |> filter(fn: (r) =>\r\n r._measurement == \"solar\"\r\n )\r\n |> aggregateWindow(\r\n every: $__interval,\r\n fn: (tables=<-, column) => tables |> median(method: \"estimate_tdigest\"),\r\n )\r\n |> cumulativeSum()\r\n |> map(fn: (r) => ({r with _value: r._value * float(v: int(v: $__interval)) / 1000000000000.0 / 3.6}))\r\n",
  209. "refId": "A",
  210. "resultFormat": "time_series",
  211. "select": [
  212. [
  213. {
  214. "params": [
  215. "value"
  216. ],
  217. "type": "field"
  218. },
  219. {
  220. "params": [],
  221. "type": "mean"
  222. }
  223. ]
  224. ],
  225. "tags": []
  226. }
  227. ],
  228. "timeFrom": null,
  229. "timeShift": null,
  230. "title": "Generated In Period",
  231. "transformations": [
  232. {
  233. "id": "filterFieldsByName",
  234. "options": {
  235. "include": {
  236. "names": [
  237. "value W"
  238. ]
  239. }
  240. }
  241. }
  242. ],
  243. "type": "stat"
  244. },
  245. {
  246. "aliasColors": {},
  247. "bars": false,
  248. "dashLength": 10,
  249. "dashes": false,
  250. "datasource": null,
  251. "description": "",
  252. "fieldConfig": {
  253. "defaults": {},
  254. "overrides": []
  255. },
  256. "fill": 1,
  257. "fillGradient": 0,
  258. "gridPos": {
  259. "h": 8,
  260. "w": 14,
  261. "x": 10,
  262. "y": 7
  263. },
  264. "hiddenSeries": false,
  265. "id": 5,
  266. "interval": "1m",
  267. "legend": {
  268. "alignAsTable": false,
  269. "avg": false,
  270. "current": false,
  271. "max": false,
  272. "min": false,
  273. "rightSide": false,
  274. "show": false,
  275. "total": false,
  276. "values": false
  277. },
  278. "lines": true,
  279. "linewidth": 1,
  280. "maxDataPoints": 150,
  281. "nullPointMode": "null",
  282. "options": {
  283. "alertThreshold": true
  284. },
  285. "percentage": false,
  286. "pluginVersion": "7.5.7",
  287. "pointradius": 2,
  288. "points": false,
  289. "renderer": "flot",
  290. "seriesOverrides": [],
  291. "spaceLength": 10,
  292. "stack": false,
  293. "steppedLine": false,
  294. "targets": [
  295. {
  296. "groupBy": [
  297. {
  298. "params": [
  299. "$__interval"
  300. ],
  301. "type": "time"
  302. },
  303. {
  304. "params": [
  305. "null"
  306. ],
  307. "type": "fill"
  308. }
  309. ],
  310. "orderByTime": "ASC",
  311. "policy": "default",
  312. "query": "from(bucket: \"influxdb\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"solar\"\n )\n |> aggregateWindow(\n every: $__interval,\n fn: (tables=<-, column) => tables |> median(method: \"estimate_tdigest\"),\n )",
  313. "queryType": "randomWalk",
  314. "refId": "A",
  315. "resultFormat": "time_series",
  316. "select": [
  317. [
  318. {
  319. "params": [
  320. "value"
  321. ],
  322. "type": "field"
  323. },
  324. {
  325. "params": [],
  326. "type": "mean"
  327. }
  328. ]
  329. ],
  330. "tags": []
  331. }
  332. ],
  333. "thresholds": [],
  334. "timeFrom": null,
  335. "timeRegions": [],
  336. "timeShift": null,
  337. "title": "Power",
  338. "tooltip": {
  339. "shared": false,
  340. "sort": 0,
  341. "value_type": "individual"
  342. },
  343. "transformations": [
  344. {
  345. "id": "calculateField",
  346. "options": {
  347. "alias": "Power",
  348. "binary": {
  349. "left": "value {name=\"solar\", type=\"A\"}",
  350. "operator": "*",
  351. "reducer": "sum",
  352. "right": "value {name=\"solar\", type=\"V\"}"
  353. },
  354. "mode": "reduceRow",
  355. "reduce": {
  356. "include": [
  357. "value {name=\"solar\", type=\"W\"}"
  358. ],
  359. "reducer": "sum"
  360. },
  361. "replaceFields": true
  362. }
  363. }
  364. ],
  365. "type": "graph",
  366. "xaxis": {
  367. "buckets": null,
  368. "mode": "time",
  369. "name": null,
  370. "show": true,
  371. "values": []
  372. },
  373. "yaxes": [
  374. {
  375. "$$hashKey": "object:105",
  376. "format": "watt",
  377. "label": null,
  378. "logBase": 1,
  379. "max": null,
  380. "min": null,
  381. "show": true
  382. },
  383. {
  384. "$$hashKey": "object:106",
  385. "format": "dateTimeAsLocal",
  386. "label": null,
  387. "logBase": 1,
  388. "max": null,
  389. "min": null,
  390. "show": false
  391. }
  392. ],
  393. "yaxis": {
  394. "align": false,
  395. "alignLevel": null
  396. }
  397. },
  398. {
  399. "datasource": null,
  400. "description": "",
  401. "fieldConfig": {
  402. "defaults": {
  403. "color": {
  404. "mode": "thresholds"
  405. },
  406. "custom": {
  407. "align": null,
  408. "filterable": false
  409. },
  410. "mappings": [
  411. {
  412. "from": "",
  413. "id": 1,
  414. "text": "",
  415. "to": "",
  416. "type": 1
  417. }
  418. ],
  419. "max": 0,
  420. "thresholds": {
  421. "mode": "absolute",
  422. "steps": [
  423. {
  424. "color": "green",
  425. "value": null
  426. }
  427. ]
  428. },
  429. "unit": "watth"
  430. },
  431. "overrides": [
  432. {
  433. "matcher": {
  434. "id": "byName",
  435. "options": "Time"
  436. },
  437. "properties": [
  438. {
  439. "id": "unit",
  440. "value": "time:DD.MM.YYYY"
  441. }
  442. ]
  443. }
  444. ]
  445. },
  446. "gridPos": {
  447. "h": 8,
  448. "w": 14,
  449. "x": 0,
  450. "y": 15
  451. },
  452. "id": 9,
  453. "interval": null,
  454. "maxDataPoints": 500,
  455. "options": {
  456. "showHeader": true
  457. },
  458. "pluginVersion": "7.5.7",
  459. "targets": [
  460. {
  461. "groupBy": [
  462. {
  463. "params": [
  464. "$__interval"
  465. ],
  466. "type": "time"
  467. },
  468. {
  469. "params": [
  470. "null"
  471. ],
  472. "type": "fill"
  473. }
  474. ],
  475. "orderByTime": "ASC",
  476. "policy": "default",
  477. "query": "import \"date\"\r\nimport \"experimental\"\r\n\r\nstart_rounded = date.truncate(t: v.timeRangeStart, unit: 1d) //we can pass v.windowPeriod\r\nend_rounded = date.truncate(t: v.timeRangeStop, unit: 1d)\r\nend_rounded2 = experimental.addDuration(d: 1d, to: end_rounded)\r\n\r\nfrom(bucket: \"influxdb\")\r\n |> range(start: start_rounded, stop: end_rounded2)\r\n |> filter(fn: (r) =>\r\n r._measurement == \"solar\"\r\n )\r\n |> filter(fn: (r) => r.type == \"W\")\r\n |> aggregateWindow(\r\n every: $__interval,\r\n timeSrc: \"_start\",\r\n fn: (tables=<-, column) => tables |> median(),\r\n )\r\n |> aggregateWindow(\r\n every: 1d,\r\n timeSrc: \"_start\",\r\n fn: (tables=<-, column) => tables |> sum(),\r\n )\r\n |> map(fn: (r) => ({r with _value: r._value * float(v: int(v: $__interval)) / 1000000000000.0 / 3.6}))\r\n",
  478. "refId": "A",
  479. "resultFormat": "time_series",
  480. "select": [
  481. [
  482. {
  483. "params": [
  484. "value"
  485. ],
  486. "type": "field"
  487. },
  488. {
  489. "params": [],
  490. "type": "mean"
  491. }
  492. ]
  493. ],
  494. "tags": []
  495. }
  496. ],
  497. "timeFrom": null,
  498. "timeShift": null,
  499. "title": "Generated per day",
  500. "transformations": [
  501. {
  502. "id": "renameByRegex",
  503. "options": {
  504. "regex": "value W",
  505. "renamePattern": "Amount"
  506. }
  507. }
  508. ],
  509. "type": "table"
  510. },
  511. {
  512. "aliasColors": {},
  513. "bars": false,
  514. "dashLength": 10,
  515. "dashes": false,
  516. "datasource": null,
  517. "description": "",
  518. "fieldConfig": {
  519. "defaults": {
  520. "unit": "volt"
  521. },
  522. "overrides": []
  523. },
  524. "fill": 1,
  525. "fillGradient": 0,
  526. "gridPos": {
  527. "h": 8,
  528. "w": 10,
  529. "x": 14,
  530. "y": 15
  531. },
  532. "hiddenSeries": false,
  533. "id": 6,
  534. "interval": "1m",
  535. "legend": {
  536. "alignAsTable": false,
  537. "avg": false,
  538. "current": false,
  539. "max": false,
  540. "min": false,
  541. "rightSide": false,
  542. "show": false,
  543. "total": false,
  544. "values": false
  545. },
  546. "lines": true,
  547. "linewidth": 1,
  548. "maxDataPoints": 150,
  549. "nullPointMode": "null",
  550. "options": {
  551. "alertThreshold": true
  552. },
  553. "percentage": false,
  554. "pluginVersion": "7.5.7",
  555. "pointradius": 2,
  556. "points": false,
  557. "renderer": "flot",
  558. "seriesOverrides": [],
  559. "spaceLength": 10,
  560. "stack": false,
  561. "steppedLine": false,
  562. "targets": [
  563. {
  564. "groupBy": [
  565. {
  566. "params": [
  567. "$__interval"
  568. ],
  569. "type": "time"
  570. },
  571. {
  572. "params": [
  573. "null"
  574. ],
  575. "type": "fill"
  576. }
  577. ],
  578. "orderByTime": "ASC",
  579. "policy": "default",
  580. "query": "from(bucket: \"influxdb\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"solar\"\n )\n |> aggregateWindow(\n every: $__interval,\n fn: (tables=<-, column) => tables |> median(method: \"estimate_tdigest\"),\n )",
  581. "queryType": "randomWalk",
  582. "refId": "A",
  583. "resultFormat": "time_series",
  584. "select": [
  585. [
  586. {
  587. "params": [
  588. "value"
  589. ],
  590. "type": "field"
  591. },
  592. {
  593. "params": [],
  594. "type": "mean"
  595. }
  596. ]
  597. ],
  598. "tags": []
  599. }
  600. ],
  601. "thresholds": [],
  602. "timeFrom": null,
  603. "timeRegions": [],
  604. "timeShift": null,
  605. "title": "Solar Voltage",
  606. "tooltip": {
  607. "shared": false,
  608. "sort": 0,
  609. "value_type": "individual"
  610. },
  611. "transformations": [
  612. {
  613. "id": "calculateField",
  614. "options": {
  615. "alias": "Power",
  616. "binary": {
  617. "left": "value {name=\"solar\", type=\"A\"}",
  618. "operator": "*",
  619. "reducer": "sum",
  620. "right": "value {name=\"solar\", type=\"V\"}"
  621. },
  622. "mode": "reduceRow",
  623. "reduce": {
  624. "include": [
  625. "value {name=\"solar\", type=\"U\"}"
  626. ],
  627. "reducer": "sum"
  628. },
  629. "replaceFields": true
  630. }
  631. }
  632. ],
  633. "type": "graph",
  634. "xaxis": {
  635. "buckets": null,
  636. "mode": "time",
  637. "name": null,
  638. "show": true,
  639. "values": []
  640. },
  641. "yaxes": [
  642. {
  643. "$$hashKey": "object:105",
  644. "format": "volt",
  645. "label": null,
  646. "logBase": 1,
  647. "max": null,
  648. "min": null,
  649. "show": true
  650. },
  651. {
  652. "$$hashKey": "object:106",
  653. "format": "dateTimeAsLocal",
  654. "label": null,
  655. "logBase": 1,
  656. "max": null,
  657. "min": null,
  658. "show": false
  659. }
  660. ],
  661. "yaxis": {
  662. "align": false,
  663. "alignLevel": null
  664. }
  665. }
  666. ],
  667. "refresh": "10s",
  668. "schemaVersion": 27,
  669. "style": "dark",
  670. "tags": [],
  671. "templating": {
  672. "list": []
  673. },
  674. "time": {
  675. "from": "now-30m",
  676. "to": "now"
  677. },
  678. "timepicker": {},
  679. "timezone": "browser",
  680. "title": "Solar",
  681. "uid": "jn3v5cV4k",
  682. "version": 48
  683. }