From 6c98055ea751ff0717aa444b639ff4baa28f04ab Mon Sep 17 00:00:00 2001 From: Jonathan Prado Date: Fri, 2 Apr 2021 02:34:23 -0300 Subject: [PATCH] update all data --- infra/docker-compose.yml | 10 +- .../.eslintignore | 0 .../.eslintrc | 0 .../.gitignore | 0 .../.jshintrc | 0 .../Gruntfile.js | 0 .../LICENSE | 0 .../LICENSE_additional | 0 .../README.md | 0 .../dist/README.md | 0 .../dist/angular-sprintf.js | 0 .../dist/angular-sprintf.js.map | 0 .../dist/editor.html | 0 .../dist/imageit_ctrl.js | 0 .../dist/imageit_ctrl.js.map | 0 .../dist/img/imageit_example.png | Bin .../dist/img/imageit_logo.png | Bin .../dist/libs/interact.js | 0 .../dist/libs/interact.js.map | 0 .../dist/mappings.html | 0 .../dist/module.html | 0 .../dist/module.js | 0 .../dist/module.js.map | 0 .../dist/plugin.json | 0 .../dist/sprintf.js | 0 .../dist/sprintf.js.map | 0 .../dist/stringwidth/basePropertyOf.js | 0 .../dist/stringwidth/basePropertyOf.js.map | 0 .../dist/stringwidth/deburr.js | 0 .../dist/stringwidth/deburr.js.map | 0 .../dist/stringwidth/deburrLetter.js | 0 .../dist/stringwidth/deburrLetter.js.map | 0 .../dist/stringwidth/strwidth.js | 0 .../dist/stringwidth/strwidth.js.map | 0 .../dist/stringwidth/widthsMap.js | 0 .../dist/stringwidth/widthsMap.js.map | 0 .../package.json | 0 .../src/angular-sprintf.js | 0 .../src/editor.html | 0 .../src/imageit_ctrl.js | 0 .../src/img/imageit_example.png | Bin .../src/img/imageit_logo.png | Bin .../src/libs/interact.js | 0 .../src/mappings.html | 0 .../src/module.html | 0 .../src/module.js | 0 .../src/plugin.json | 0 .../src/sprintf.js | 0 .../src/stringwidth/basePropertyOf.js | 0 .../src/stringwidth/deburr.js | 0 .../src/stringwidth/deburrLetter.js | 0 .../src/stringwidth/strwidth.js | 0 .../src/stringwidth/widthsMap.js | 0 .../provisioning/dashboards/dashboard.yml | 2 +- ...nt-monitor.json => plant-monitor.json_bkp} | 4 +- .../dashboards/weather-monitor.json | 1350 +++++++++++++++++ infra/srv/influxdb/data/meta/meta.db | Bin 172 -> 0 bytes infra/subscriber/SubsBot.py | 31 +- 58 files changed, 1371 insertions(+), 26 deletions(-) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/.eslintignore (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/.eslintrc (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/.gitignore (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/.jshintrc (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/Gruntfile.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/LICENSE (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/LICENSE_additional (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/README.md (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/README.md (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/angular-sprintf.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/angular-sprintf.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/editor.html (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/imageit_ctrl.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/imageit_ctrl.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/img/imageit_example.png (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/img/imageit_logo.png (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/libs/interact.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/libs/interact.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/mappings.html (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/module.html (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/module.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/module.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/plugin.json (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/sprintf.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/sprintf.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/basePropertyOf.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/basePropertyOf.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/deburr.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/deburr.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/deburrLetter.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/deburrLetter.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/strwidth.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/strwidth.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/widthsMap.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/dist/stringwidth/widthsMap.js.map (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/package.json (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/angular-sprintf.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/editor.html (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/imageit_ctrl.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/img/imageit_example.png (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/img/imageit_logo.png (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/libs/interact.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/mappings.html (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/module.html (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/module.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/plugin.json (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/sprintf.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/stringwidth/basePropertyOf.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/stringwidth/deburr.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/stringwidth/deburrLetter.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/stringwidth/strwidth.js (100%) rename infra/grafana/{pierosavi-imageit-panel => pierosavi-imageit-panel_borrar}/src/stringwidth/widthsMap.js (100%) rename infra/grafana/provisioning/dashboards/{plant-monitor.json => plant-monitor.json_bkp} (99%) create mode 100644 infra/grafana/provisioning/dashboards/weather-monitor.json delete mode 100644 infra/srv/influxdb/data/meta/meta.db diff --git a/infra/docker-compose.yml b/infra/docker-compose.yml index 95bbbe4..d63bbd6 100644 --- a/infra/docker-compose.yml +++ b/infra/docker-compose.yml @@ -15,11 +15,10 @@ services: image: influxdb:1.7.10 container_name: influxdb ports: - - "8083:8083" - - "8086:8086" - - "8090:8090" + - "8083" + - "8086" + - "8090" volumes: - # Data persistency - ./srv/influxdb/data:/var/lib/influxdb:rw environment: - INFLUXDB_DATA_ENGINE=tsm1 @@ -48,10 +47,9 @@ services: - "3000:3000" links: - influxdb - #- subscriber volumes: - ./grafana:/var/lib/grafana/plugins:rw # :ro - - ./grafana/provisioning/:/etc/grafana/provisioning/ # :ro + - ./grafana/provisioning/:/etc/grafana/provisioning/:ro environment: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=admin diff --git a/infra/grafana/pierosavi-imageit-panel/.eslintignore b/infra/grafana/pierosavi-imageit-panel_borrar/.eslintignore similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/.eslintignore rename to infra/grafana/pierosavi-imageit-panel_borrar/.eslintignore diff --git a/infra/grafana/pierosavi-imageit-panel/.eslintrc b/infra/grafana/pierosavi-imageit-panel_borrar/.eslintrc similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/.eslintrc rename to infra/grafana/pierosavi-imageit-panel_borrar/.eslintrc diff --git a/infra/grafana/pierosavi-imageit-panel/.gitignore b/infra/grafana/pierosavi-imageit-panel_borrar/.gitignore similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/.gitignore rename to infra/grafana/pierosavi-imageit-panel_borrar/.gitignore diff --git a/infra/grafana/pierosavi-imageit-panel/.jshintrc b/infra/grafana/pierosavi-imageit-panel_borrar/.jshintrc similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/.jshintrc rename to infra/grafana/pierosavi-imageit-panel_borrar/.jshintrc diff --git a/infra/grafana/pierosavi-imageit-panel/Gruntfile.js b/infra/grafana/pierosavi-imageit-panel_borrar/Gruntfile.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/Gruntfile.js rename to infra/grafana/pierosavi-imageit-panel_borrar/Gruntfile.js diff --git a/infra/grafana/pierosavi-imageit-panel/LICENSE b/infra/grafana/pierosavi-imageit-panel_borrar/LICENSE similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/LICENSE rename to infra/grafana/pierosavi-imageit-panel_borrar/LICENSE diff --git a/infra/grafana/pierosavi-imageit-panel/LICENSE_additional b/infra/grafana/pierosavi-imageit-panel_borrar/LICENSE_additional similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/LICENSE_additional rename to infra/grafana/pierosavi-imageit-panel_borrar/LICENSE_additional diff --git a/infra/grafana/pierosavi-imageit-panel/README.md b/infra/grafana/pierosavi-imageit-panel_borrar/README.md similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/README.md rename to infra/grafana/pierosavi-imageit-panel_borrar/README.md diff --git a/infra/grafana/pierosavi-imageit-panel/dist/README.md b/infra/grafana/pierosavi-imageit-panel_borrar/dist/README.md similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/README.md rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/README.md diff --git a/infra/grafana/pierosavi-imageit-panel/dist/angular-sprintf.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/angular-sprintf.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/angular-sprintf.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/angular-sprintf.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/angular-sprintf.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/angular-sprintf.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/angular-sprintf.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/angular-sprintf.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/editor.html b/infra/grafana/pierosavi-imageit-panel_borrar/dist/editor.html similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/editor.html rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/editor.html diff --git a/infra/grafana/pierosavi-imageit-panel/dist/imageit_ctrl.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/imageit_ctrl.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/imageit_ctrl.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/imageit_ctrl.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/imageit_ctrl.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/imageit_ctrl.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/imageit_ctrl.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/imageit_ctrl.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/img/imageit_example.png b/infra/grafana/pierosavi-imageit-panel_borrar/dist/img/imageit_example.png similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/img/imageit_example.png rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/img/imageit_example.png diff --git a/infra/grafana/pierosavi-imageit-panel/dist/img/imageit_logo.png b/infra/grafana/pierosavi-imageit-panel_borrar/dist/img/imageit_logo.png similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/img/imageit_logo.png rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/img/imageit_logo.png diff --git a/infra/grafana/pierosavi-imageit-panel/dist/libs/interact.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/libs/interact.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/libs/interact.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/libs/interact.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/libs/interact.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/libs/interact.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/libs/interact.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/libs/interact.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/mappings.html b/infra/grafana/pierosavi-imageit-panel_borrar/dist/mappings.html similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/mappings.html rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/mappings.html diff --git a/infra/grafana/pierosavi-imageit-panel/dist/module.html b/infra/grafana/pierosavi-imageit-panel_borrar/dist/module.html similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/module.html rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/module.html diff --git a/infra/grafana/pierosavi-imageit-panel/dist/module.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/module.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/module.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/module.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/module.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/module.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/module.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/module.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/plugin.json b/infra/grafana/pierosavi-imageit-panel_borrar/dist/plugin.json similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/plugin.json rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/plugin.json diff --git a/infra/grafana/pierosavi-imageit-panel/dist/sprintf.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/sprintf.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/sprintf.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/sprintf.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/sprintf.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/sprintf.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/sprintf.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/sprintf.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/basePropertyOf.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/basePropertyOf.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/basePropertyOf.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/basePropertyOf.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/basePropertyOf.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/basePropertyOf.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/basePropertyOf.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/basePropertyOf.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburr.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburr.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburr.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburr.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburr.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburr.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburr.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburr.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburrLetter.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburrLetter.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburrLetter.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburrLetter.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburrLetter.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburrLetter.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/deburrLetter.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/deburrLetter.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/strwidth.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/strwidth.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/strwidth.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/strwidth.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/strwidth.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/strwidth.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/strwidth.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/strwidth.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/widthsMap.js b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/widthsMap.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/widthsMap.js rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/widthsMap.js diff --git a/infra/grafana/pierosavi-imageit-panel/dist/stringwidth/widthsMap.js.map b/infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/widthsMap.js.map similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/dist/stringwidth/widthsMap.js.map rename to infra/grafana/pierosavi-imageit-panel_borrar/dist/stringwidth/widthsMap.js.map diff --git a/infra/grafana/pierosavi-imageit-panel/package.json b/infra/grafana/pierosavi-imageit-panel_borrar/package.json similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/package.json rename to infra/grafana/pierosavi-imageit-panel_borrar/package.json diff --git a/infra/grafana/pierosavi-imageit-panel/src/angular-sprintf.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/angular-sprintf.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/angular-sprintf.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/angular-sprintf.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/editor.html b/infra/grafana/pierosavi-imageit-panel_borrar/src/editor.html similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/editor.html rename to infra/grafana/pierosavi-imageit-panel_borrar/src/editor.html diff --git a/infra/grafana/pierosavi-imageit-panel/src/imageit_ctrl.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/imageit_ctrl.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/imageit_ctrl.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/imageit_ctrl.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/img/imageit_example.png b/infra/grafana/pierosavi-imageit-panel_borrar/src/img/imageit_example.png similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/img/imageit_example.png rename to infra/grafana/pierosavi-imageit-panel_borrar/src/img/imageit_example.png diff --git a/infra/grafana/pierosavi-imageit-panel/src/img/imageit_logo.png b/infra/grafana/pierosavi-imageit-panel_borrar/src/img/imageit_logo.png similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/img/imageit_logo.png rename to infra/grafana/pierosavi-imageit-panel_borrar/src/img/imageit_logo.png diff --git a/infra/grafana/pierosavi-imageit-panel/src/libs/interact.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/libs/interact.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/libs/interact.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/libs/interact.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/mappings.html b/infra/grafana/pierosavi-imageit-panel_borrar/src/mappings.html similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/mappings.html rename to infra/grafana/pierosavi-imageit-panel_borrar/src/mappings.html diff --git a/infra/grafana/pierosavi-imageit-panel/src/module.html b/infra/grafana/pierosavi-imageit-panel_borrar/src/module.html similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/module.html rename to infra/grafana/pierosavi-imageit-panel_borrar/src/module.html diff --git a/infra/grafana/pierosavi-imageit-panel/src/module.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/module.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/module.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/module.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/plugin.json b/infra/grafana/pierosavi-imageit-panel_borrar/src/plugin.json similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/plugin.json rename to infra/grafana/pierosavi-imageit-panel_borrar/src/plugin.json diff --git a/infra/grafana/pierosavi-imageit-panel/src/sprintf.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/sprintf.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/sprintf.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/sprintf.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/stringwidth/basePropertyOf.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/basePropertyOf.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/stringwidth/basePropertyOf.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/basePropertyOf.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/stringwidth/deburr.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/deburr.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/stringwidth/deburr.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/deburr.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/stringwidth/deburrLetter.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/deburrLetter.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/stringwidth/deburrLetter.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/deburrLetter.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/stringwidth/strwidth.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/strwidth.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/stringwidth/strwidth.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/strwidth.js diff --git a/infra/grafana/pierosavi-imageit-panel/src/stringwidth/widthsMap.js b/infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/widthsMap.js similarity index 100% rename from infra/grafana/pierosavi-imageit-panel/src/stringwidth/widthsMap.js rename to infra/grafana/pierosavi-imageit-panel_borrar/src/stringwidth/widthsMap.js diff --git a/infra/grafana/provisioning/dashboards/dashboard.yml b/infra/grafana/provisioning/dashboards/dashboard.yml index d1e6ef4..c75d06c 100755 --- a/infra/grafana/provisioning/dashboards/dashboard.yml +++ b/infra/grafana/provisioning/dashboards/dashboard.yml @@ -2,7 +2,7 @@ apiVersion: 1 providers: -- name: 'plant-monitor' +- name: 'weather-monitor' orgId: 1 folder: '' type: file diff --git a/infra/grafana/provisioning/dashboards/plant-monitor.json b/infra/grafana/provisioning/dashboards/plant-monitor.json_bkp similarity index 99% rename from infra/grafana/provisioning/dashboards/plant-monitor.json rename to infra/grafana/provisioning/dashboards/plant-monitor.json_bkp index dfed02b..331171e 100755 --- a/infra/grafana/provisioning/dashboards/plant-monitor.json +++ b/infra/grafana/provisioning/dashboards/plant-monitor.json_bkp @@ -19,7 +19,7 @@ "links": [], "panels": [ { - "content": "
\n Plant Monitor v0.1 \n
\n", + "content": "
\n Weather Monitor v0.1 \n
\n", "datasource": null, "gridPos": { "h": 2, @@ -1292,7 +1292,7 @@ ] }, "timezone": "", - "title": "Plant Monitor", + "title": "Weather Monitor", "uid": "ytb6nrrWk", "variables": { "list": [] diff --git a/infra/grafana/provisioning/dashboards/weather-monitor.json b/infra/grafana/provisioning/dashboards/weather-monitor.json new file mode 100644 index 0000000..98738c4 --- /dev/null +++ b/infra/grafana/provisioning/dashboards/weather-monitor.json @@ -0,0 +1,1350 @@ +{ + "annotations": { + "list": [ + { + "$$hashKey": "object:33", + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "content": "
\n Weather Monitor v0.1 \n
\n", + "datasource": null, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 16, + "mode": "html", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "IoT", + "decimals": 2, + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 5, + "x": 0, + "y": 2 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [], + "measurement": "Humidity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Humidity\" FROM \"IoT\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Humidity" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Air Humidity", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "percent", + "label": "Air Humidity", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "decimals": 2, + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 14, + 30 + ], + "type": "outside_range" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "4h", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Air Temperature alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "IoT", + "decimals": 2, + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 6, + "x": 5, + "y": 2 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [], + "measurement": "Temperature", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Temperature" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 14 + }, + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 30 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Air Temperature", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "short", + "label": "Temperature", + "logBase": 1, + "max": "40", + "min": "-5", + "show": true + }, + { + "decimals": null, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "IoT", + "decimals": null, + "fill": 1, + "fillGradient": 7, + "gridPos": { + "h": 8, + "w": 6, + "x": 11, + "y": 2 + }, + "hiddenSeries": false, + "id": 17, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [], + "limit": "", + "measurement": "Ldr", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Ldr\" FROM \"IoT\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Ldr" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Light intensity", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "none", + "label": "Light intensity", + "logBase": 1, + "max": "30000", + "min": "0", + "show": true + }, + { + "decimals": 0, + "format": "percent", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 35, + 90 + ], + "type": "outside_range" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5h", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "message": "Soil humidity status is outside of Range", + "name": "Soil humidity alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "IoT", + "decimals": null, + "fill": 1, + "fillGradient": 7, + "gridPos": { + "h": 8, + "w": 7, + "x": 17, + "y": 2 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [], + "measurement": "Soil", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Soil\" FROM \"IoT\" ", + "rawQuery": false, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Soil" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 35 + }, + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 90 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Soil humidity", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "percent", + "label": "Soil Humidity", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "decimals": 2, + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "IoT", + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 10 + }, + "id": 13, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "red", + "value": 92 + } + ] + }, + "title": "", + "unit": "humidity" + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.1", + "targets": [ + { + "groupBy": [], + "limit": "", + "measurement": "Humidity", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Humidity" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Hum", + "type": "stat" + }, + { + "datasource": "IoT", + "gridPos": { + "h": 4, + "w": 6, + "x": 5, + "y": 10 + }, + "id": 14, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "title": "", + "unit": "celsius" + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.1", + "targets": [ + { + "groupBy": [], + "limit": "", + "measurement": "Temperature", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Temperature" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Temp", + "type": "stat" + }, + { + "datasource": "IoT", + "gridPos": { + "h": 4, + "w": 6, + "x": 11, + "y": 10 + }, + "id": 18, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + }, + { + "color": "dark-green", + "value": 10000 + }, + { + "color": "dark-orange", + "value": 18000 + } + ] + }, + "title": "" + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.1", + "targets": [ + { + "groupBy": [], + "limit": "", + "measurement": "Ldr", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Ldr" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Light", + "type": "stat" + }, + { + "datasource": "IoT", + "gridPos": { + "h": 4, + "w": 7, + "x": 17, + "y": 10 + }, + "id": 11, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "decimals": 0, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-green", + "value": 30 + }, + { + "color": "dark-yellow", + "value": 90 + } + ] + }, + "title": "", + "unit": "percent" + }, + "limit": 1, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.1", + "targets": [ + { + "groupBy": [], + "limit": "", + "measurement": "Soil", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Soil" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Soil", + "type": "stat" + }, + { + "columns": [], + "datasource": "IoT", + "fontSize": "100%", + "gridPos": { + "h": 5, + "w": 5, + "x": 0, + "y": 14 + }, + "id": 3, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "right", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "groupBy": [], + "limit": "10", + "measurement": "Humidity", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Humidity" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Hum", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": "IoT", + "fontSize": "100%", + "gridPos": { + "h": 5, + "w": 6, + "x": 5, + "y": 14 + }, + "id": 2, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "right", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "groupBy": [], + "limit": 10, + "measurement": "Temperature", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Temperature" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Temp", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": "IoT", + "fontSize": "100%", + "gridPos": { + "h": 5, + "w": 6, + "x": 11, + "y": 14 + }, + "id": 19, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "right", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 0, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "groupBy": [], + "limit": 10, + "measurement": "Ldr", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Ldr" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Light", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": "IoT", + "fontSize": "100%", + "gridPos": { + "h": 5, + "w": 7, + "x": 17, + "y": 14 + }, + "id": 12, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "right", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 0, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "groupBy": [], + "limit": 10, + "measurement": "Soil", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Soil" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Soil", + "transform": "table", + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "IoT", + "decimals": 2, + "fill": 1, + "fillGradient": 7, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 19 + }, + "hiddenSeries": false, + "id": 9, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [], + "measurement": "Humidity", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Soil\" FROM \"IoT\" ", + "rawQuery": false, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Humidity" + ], + "type": "field" + } + ] + ], + "tags": [] + }, + { + "groupBy": [], + "measurement": "Temperature", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Soil\" FROM \"IoT\" ", + "rawQuery": false, + "refId": "B", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Temperature" + ], + "type": "field" + } + ] + ], + "tags": [] + }, + { + "groupBy": [], + "measurement": "Ldr", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Soil\" FROM \"IoT\" ", + "rawQuery": false, + "refId": "C", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Ldr" + ], + "type": "field" + } + ] + ], + "tags": [] + }, + { + "groupBy": [], + "measurement": "Soil", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"Soil\" FROM \"IoT\" ", + "rawQuery": false, + "refId": "D", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Soil" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "DATA", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:718", + "decimals": 2, + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:719", + "decimals": 2, + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Weather Monitor", + "uid": "ytb6nrrWk", + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file diff --git a/infra/srv/influxdb/data/meta/meta.db b/infra/srv/influxdb/data/meta/meta.db deleted file mode 100644 index e8a734f2c5dc2da10b95d16ffb1c298a617215ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 172 zcmd;J5MY&faOBLn?$ayY*J-(MF?;5R2(c%YmgJ|W=1G}w!I%OJ5)BPYPX0gG$*91n zCBwle(9m$E>G1!vO=3Wa52p_uyxuIPz@Wv%!Kf9$#TlQOSCU$kmzX2Oo|~VSS(0BQ wWyJ+!0<}U+0_xn;b@Gxh*hD6va7S;?rH5b>k4(S1t<8 diff --git a/infra/subscriber/SubsBot.py b/infra/subscriber/SubsBot.py index 03ddbf2..dcdbaaa 100644 --- a/infra/subscriber/SubsBot.py +++ b/infra/subscriber/SubsBot.py @@ -1,32 +1,31 @@ import paho.mqtt.client as mqtt -from influxdb import InfluxDBClient # FOR write data in influxDB +from influxdb import InfluxDBClient # FOR write data on influxDB import time import socket # constantes -broker_address = "mosquitto" #Broker address -database_address = "influxdb" -port = 1883 #Broker port +broker_address = "mosquitto" # Broker address +database_address = "influxdb" # DB address +port = 1883 # Broker port influxport = 8086 -user = "admin" #Connection username -password = "admin" #Connection password -topic = "#" #Subscribe to ALL topics -db_name = "IoT" -client_name = "Subscriber" +user = "admin" # Connection username +password = "admin" # Connection password +topic = "#" # Subscribe to ALL topics +db_name = "IoT" # DB name +client_name = "Subscriber" intent = 0 def on_message(client, userdata, message): - print("received message: " ,str(message.payload.decode("utf-8"))) + #print("received message: " ,str(message.payload.decode("utf-8"))) value = str(message.payload.decode("utf-8")) xvalue = float(value) - - #dbClient = InfluxDBClient(database_address, influxport, user, password, db_name) - #loginEvents = [{"measurement":"IoT", "fields":{ message.topic : xvalue } }] - #writedata = dbClient.write_points(loginEvents) - + print(message.topic , str(value)) + dbClient = InfluxDBClient(database_address, influxport, user, password, db_name) + loginEvents = [{"measurement":message.topic, "fields":{ message.topic : xvalue } }] + writedata = dbClient.write_points(loginEvents) def on_subscribe(): client = mqtt.Client(client_name) @@ -37,7 +36,6 @@ def on_subscribe(): time.sleep(5) client.loop_stop() - def DoMagic(): a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) location = (broker_address, port) @@ -49,7 +47,6 @@ def DoMagic(): time.sleep(15) - time.sleep(10) # wait for docker compose up while True: DoMagic()