NEWS
Gelöst - Grafana und InfluxDB auf RPI3 ?
-
@thomas-braun said in Grafana und InfluxDB auf RPI3 ?:
iob diag
in der Langfassung sagt?
Skript v.2023-01-02 *** BASE SYSTEM *** Model : Raspberry Pi 3 Model B Rev 1.2 Architecture: armv7l Docker: false Virtualization: none Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" Systemuptime and Load: 15:08:27 up 23 min, 3 users, load average: 0.31, 0.30, 0.33 CPU threads: 4 *** Time and Time Zones *** Wed Mar 22 14:08:27 UTC 2023 Wed Mar 22 15:08:27 CET 2023 CET +0100 Europe/Berlin *** User and Groups *** pi /home/pi pi adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin gpio i2c spi iobroker *** X-Server-Setup *** X-Server: true Desktop: Terminal: tty Boot Target: graphical.target *** MEMORY *** total used free shared buff/cache available Mem: 921M 369M 121M 3.0M 431M 498M Swap: 99M 2.0M 97M Total: 1.0G 371M 218M 921 M total memory 369 M used memory 661 M active memory 70 M inactive memory 121 M free memory 3 M buffer memory 428 M swap cache 99 M total swap 2 M used swap 97 M free swap *** FILESYSTEM *** Filesystem Type Size Used Avail Use% Mounted on /dev/root ext4 29G 4.7G 24G 17% / devtmpfs devtmpfs 333M 0 333M 0% /dev tmpfs tmpfs 461M 0 461M 0% /dev/shm tmpfs tmpfs 185M 1.1M 184M 1% /run tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock /dev/sda1 vfat 255M 51M 205M 20% /boot tmpfs tmpfs 93M 20K 93M 1% /run/user/1000 Messages in dmesg: [Wed Mar 22 14:45:23 2023] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=Composite-1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=be83d968-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles [Wed Mar 22 14:45:32 2023] EXT4-fs (sda2): mounted filesystem with ordered data mode. Quota mode: none. [Wed Mar 22 14:45:32 2023] VFS: Mounted root (ext4 filesystem) readonly on device 8:2. [Wed Mar 22 14:45:34 2023] EXT4-fs (sda2): re-mounted. Quota mode: none. Show mounted filesystems (real ones only): TARGET SOURCE FSTYPE OPTIONS / /dev/sda2 ext4 rw,noatime `-/boot /dev/sda1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro Files in neuralgic directories: /var: 647M /var/ 330M /var/cache 324M /var/cache/apt 259M /var/cache/apt/archives 126M /var/lib /opt/iobroker/backups: 4.0K /opt/iobroker/backups/ /opt/iobroker/iobroker-data: 44M /opt/iobroker/iobroker-data/ 15M /opt/iobroker/iobroker-data/files 13M /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js 13M /opt/iobroker/iobroker-data/files/admin.admin/custom/static 13M /opt/iobroker/iobroker-data/files/admin.admin/custom The five largest files in iobroker-data are: 25M /opt/iobroker/iobroker-data/objects.jsonl 6.3M /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-node_modules_iobroker_adapter-react-v5_assets_devices_parseNames_js-node_modules_iobr-99c23e.847b8ad9.chunk.js.map 2.8M /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-node_modules_iobroker_adapter-react-v5_assets_devices_parseNames_js-node_modules_iobr-99c23e.847b8ad9.chunk.js 2.6M /opt/iobroker/iobroker-data/states.jsonl 2.3M /opt/iobroker/iobroker-data/backup-objects/2023-03-21_23-47_objects.jsonl.gz *** NodeJS-Installation *** /usr/bin/nodejs v16.19.1 /usr/bin/node v16.19.1 /usr/bin/npm 8.19.3 /usr/bin/npx 8.19.3 nodejs: Installed: 16.19.1-deb-1nodesource1 Candidate: 16.19.1-deb-1nodesource1 Version table: *** 16.19.1-deb-1nodesource1 500 500 https://deb.nodesource.com/node_16.x bullseye/main armhf Packages 100 /var/lib/dpkg/status 12.22.12~dfsg-1~deb11u3 500 500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages Temp directories causing npm8 problem: 0 *** ioBroker-Installation *** ioBroker Status iobroker is running on this host. Objects type: jsonl States type: jsonl Core adapters versions js-controller: 4.0.24 admin: 6.3.7 javascript: "javascript" not found Adapters from github: 0 Adapter State + system.adapter.admin.0 : admin : Vis2 - enabled, port: 8081, bind: 0.0.0.0, run as: admin + system.adapter.backitup.0 : backitup : Vis2 - enabled + system.adapter.discovery.0 : discovery : Vis2 - enabled + system.adapter.influxdb.0 : influxdb : Vis2 - enabled, port: 8086 + instance is alive Enabled adapters with bindings + system.adapter.admin.0 : admin : Vis2 - enabled, port: 8081, bind: 0.0.0.0, run as: admin + system.adapter.influxdb.0 : influxdb : Vis2 - enabled, port: 8086 ioBroker-Repositories stable : http://download.iobroker.net/sources-dist.json beta : http://download.iobroker.net/sources-dist-latest.json Active repo(s): beta Installed ioBroker-Instances Used repository: beta Adapter "admin" : 6.3.7 , installed 6.3.7 Adapter "backitup" : 2.6.13 , installed 2.6.12 [Updatable] Adapter "discovery" : 3.1.0 , installed 3.1.0 Adapter "influxdb" : 3.2.0 , installed 3.2.0 Controller "js-controller": 4.0.24 , installed 4.0.24 Objects and States Please stand by - This may take a while Objects: 163 States: 121 *** OS-Repositories and Updates *** Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:3 https://repos.influxdata.com/debian stable InRelease Hit:4 https://repos.influxdata.com/debian bullseye InRelease Hit:5 https://deb.nodesource.com/node_16.x bullseye InRelease Hit:6 https://packages.grafana.com/oss/deb stable InRelease Reading package lists... Pending Updates: 1 *** Listening Ports *** Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN 116 15374 542/influxd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 14461 567/sshd: /usr/sbin tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1001 15130 722/iobroker.js-con tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN 1001 15060 722/iobroker.js-con tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 13935 534/cupsd tcp6 0 0 :::22 :::* LISTEN 0 14463 567/sshd: /usr/sbin tcp6 0 0 ::1:631 :::* LISTEN 0 13934 534/cupsd tcp6 0 0 :::8081 :::* LISTEN 1001 17106 1314/io.admin.0 tcp6 0 0 :::8086 :::* LISTEN 116 14159 542/influxd tcp6 0 0 :::3000 :::* LISTEN 117 16383 536/grafana udp 0 0 0.0.0.0:68 0.0.0.0:* 0 627 487/dhcpcd udp 0 0 0.0.0.0:37990 0.0.0.0:* 108 505 393/avahi-daemon: r udp 0 0 0.0.0.0:631 0.0.0.0:* 0 13953 591/cups-browsed udp 0 0 0.0.0.0:5353 0.0.0.0:* 108 503 393/avahi-daemon: r udp6 0 0 :::5353 :::* 108 504 393/avahi-daemon: r udp6 0 0 :::44863 :::* 108 506 393/avahi-daemon: r *** Log File - Last 25 Lines *** 2023-03-22 00:39:52.934 - info: host.Vis2 instance system.adapter.admin.0 started with pid 1314 2023-03-22 00:39:52.966 - info: host.Vis2 Delete state "system.host.Vis2.versions.nodeNewest" 2023-03-22 00:39:53.058 - info: host.Vis2 Delete state "system.host.Vis2.versions.nodeNewestNext" 2023-03-22 00:39:53.088 - info: host.Vis2 Delete state "system.host.Vis2.versions.npmCurrent" 2023-03-22 00:39:53.125 - info: host.Vis2 Delete state "system.host.Vis2.versions.npmNewest" 2023-03-22 00:39:53.161 - info: host.Vis2 Delete state "system.host.Vis2.versions.npmNewestNext" 2023-03-22 00:39:53.194 - info: host.Vis2 Some obsolete host states deleted. 2023-03-22 14:46:11.054 - info: host.Vis2 instance system.adapter.influxdb.0 started with pid 1421 2023-03-22 14:46:12.443 - info: admin.0 (1314) starting. Version 6.3.7 in /opt/iobroker/node_modules/iobroker.admin, node: v16.19.1, js-controller: 4.0.24 2023-03-22 14:46:12.535 - info: admin.0 (1314) requesting all states 2023-03-22 14:46:12.537 - info: admin.0 (1314) requesting all objects 2023-03-22 14:46:15.143 - info: admin.0 (1314) received all objects 2023-03-22 14:46:15.178 - info: host.Vis2 instance system.adapter.discovery.0 started with pid 1448 2023-03-22 14:46:17.836 - info: admin.0 (1314) http server listening on port 8081 2023-03-22 14:46:17.854 - info: admin.0 (1314) Use link "http://localhost:8081" to configure. 2023-03-22 14:46:17.904 - info: admin.0 (1314) socket.io server listening on port 8081 2023-03-22 14:46:19.047 - info: host.Vis2 instance system.adapter.backitup.0 started with pid 1466 2023-03-22 14:46:19.367 - info: influxdb.0 (1421) starting. Version 3.2.0 in /opt/iobroker/node_modules/iobroker.influxdb, node: v16.19.1, js-controller: 4.0.24 2023-03-22 14:46:19.434 - info: influxdb.0 (1421) No stored data from last exit found 2023-03-22 14:46:19.438 - info: influxdb.0 (1421) Connecting http://192.168.1.97:8086/ ... 2023-03-22 14:46:19.440 - info: influxdb.0 (1421) Influx DB Version used: 1.x 2023-03-22 14:46:19.590 - info: influxdb.0 (1421) enabled logging of influxdb.0.info.connection, Alias=false, 1 points now activated 2023-03-22 14:46:21.764 - info: discovery.0 (1448) starting. Version 3.1.0 in /opt/iobroker/node_modules/iobroker.discovery, node: v16.19.1, js-controller: 4.0.24 2023-03-22 14:46:23.713 - info: backitup.0 (1466) starting. Version 2.6.12 in /opt/iobroker/node_modules/iobroker.backitup, node: v16.19.1, js-controller: 4.0.24 2023-03-22 14:46:23.975 - info: backitup.0 (1466) [iobroker] backup was activated at 02:40 every 1 day(s) ============ Mark until here for C&P ============= iob diag has finished. Press any key for a summary pi@Vis2:~ $
-
@marc-berg said in Grafana und InfluxDB auf RPI3 ?:
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
influxdb.conf
Du hast eine InfluxDB 1.x installiert. Da gibt es kein Webinterface mehr. Wenn du das haben willst, musst du 2.x installieren.
ja, wird wohl so sein..... Ich poste gleich mal die Fehlermeldung!
-
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
ja, wird wohl so sein
Das kann auch nicht anders sein, weil du da ein 32bit-System fährst.
influxdb2 wird nur für 64bit-Systeme gebaut.Und mit 1GB RAM würde ich da auch keinen Speicher für sowas unnötiges wie einen Desktop verschwenden, das kannst du sinnvoller für den Betrieb der Serverdienste verwenden.
-
Danke Dir. Wollte nur kurz antesten falls es gehen sollte...
Versuche gerade InfluDB zu konfigurireren... Anscheinend habe ich doch keinen User und Datenbank anlegen können.
pi@Vis2:~ $ sudo nano /etc/influxdb/influxdb.conf pi@Vis2:~ $ sudo service influxdb restart pi@Vis2:~ $ influx Connected to http://localhost:8086 version 1.8.10 InfluxDB shell version: 1.8.10 > CREATE USER "admin" WITH PASSWORD 'admin' WITH ALL PRIVILEGES ERR: unable to parse authentication credentials Warning: It is possible this error is due to not setting a database. Please set a database with the command "use <database>".
-
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
Versuche gerade InfluDB zu konfigurireren... Anscheinend habe ich doch keinen User und Datenbank anlegen können.
Warning: It is possible this error is due to not setting a database. Please set a database with the command "use <database>".
du hast vergessen "use iobroker" einzugeben und damit die aktive Datenbank festzulegen.
-
jetzt läuft es
musste vorher aus: /var/lib - den Ordner Influxdb löschen, danach ging auch die user und Datenbank nach meiner Beschreibung zu setzen.
pi@Vis2:~ $ free total used free shared buff/cache available Mem: 944092 415208 189532 3644 339352 481720 Swap: 102396 1808 100588 pi@Vis2:~ $
-
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
musste vorher aus: /var/lib - den Ordner Influxdb löschen
Im Normalfall muss nie manuell in /var/lib herumgeorgelt werden. Das sind Verzeichnisse, die vom System verwaltet werden. Gemeinhin reicht es hier mit normalen usern, die mit ordentlichen Rechten ausgestattet sind, zu agieren.
-
@thomas-braun
danke Thomas, das ist wahr...
Durch meine "Installationsversuche" nach drei verschiedenen Beschreibungen hat sich dort Müll anscheinend angesammelt! Das Löschen des InfluxDB über Putty hat die Ordner dort nicht mitgelöscht.
Erst nachdem ich den ganzen Ordner selbst gelöscht hatte und die InfluxDB neu installiert habe, konnte ich die Datenbank erzeugen und die User eintragen. Jetzt ist alles verbunden. Jetzt fehlen mir paar Datenpunkte zum Spielen.Kannst Du mir sagen, ob ich aus dem RPI3 einen Slave mit wenig Aufwand machen kann?
So könnte ich doch auf die Datenpunkte des RPI4 zugreifen? Stimmt es? -
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
Das Löschen des InfluxDB über Putty
Was soll denn 'über Putty' bedeuten? puTTY ist ein Terminal, darüber gibt man Kommandos ein. Die Frage ist dann immer, welche Kommandos.
-
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
Kannst Du mir sagen, ob ich aus dem RPI3 einen Slave mit wenig Aufwand machen kann?
So könnte ich doch auf die Datenpunkte des RPI4 zugreifen? Stimmt es?Dein Hauptsystem läuft auf dem PI4, richtig?
PI3, soll mit Grafana und Influx laufen.
Wenn ja, muss der PI3 kein Slave werden.
Du musst im Influx Adapter lediglich die IP usw. vom InFlux Server (PI3) eintragen.
IOB muss dafür nicht zusätzlich auf dem PI3 laufen.
-
woow, Danke!
ja, RPI4 ist mein Hauptsystem!
das heist, ich muß erst Influx Adapter auf den RPI4 installieren stimmt?
Jetzt läuft Influx Adapter auf dem RPI3. -
@knopers1 Da die Installation des PI3 ja eh etwas verbogen war, installiere das OS neu, dann nur Influx und Grafana.
Dann auf dem PI4 den Influx Adapter und den entsprechend Konfigurieren.
Dann schreibt iob schön seine Daten in die InfluxDB.
-
@wendy2702
super Idee, Danke....
ich berichte wenn dies geklappt hat! -
@knopers1 sagte in Grafana und InfluxDB auf RPI3 ?:
Durch meine "Installationsversuche" nach drei verschiedenen Beschreibungen
Zusätzliche Softwarepakete werden unter Linux/Debian ausschließlich über den Paketmanager installiert. Gibt ja nicht ohne Grund für influx und grafana passende Quellen
-
@thomas-braun Vielleicht schreibst du dafür bei Zeiten und ausreichender Langeweile sowie Motivation auch ein "How To"
-
Naja, geht grundsätzlich so wie im Nodejs-HowTo auch mit Quellen hantiert wird.
Die kleinen Unterschiede sind immer bei den Projekten zu finden. Aber eigentlich ist es immer gleich: Per Skript wird in /etc/apt/sources.list.d/ eine .list-Datei angelegt und nach einem sudo apt update liegt das Paket im Regal und muss nur noch aufgeklaubt werden. Viele Pakete sind aber ja auch schon direkt 'ab Werk' in den debian-Repos zu finden.Selbst influx könnte man da sofort schon finden, allerdings Debian-typisch in einer gut abgehangenen, durchgetesteten Version.
-
Super, auf dem RPI4 kann ich jetzt in die Datenbank schreiben.
Jetzt zu meinem Verständnis. Die Grafana Grafiken müsste ich am RPI3 erstellen, dort ist auch Grafana installiert. Bekomme ich dort erzeugte Grafik wieder auf dem RPI4 angebunden?
-
@knopers1 Ja. Grafana Dashbords können z.B. in VIS etc eingebunden werden. Egal auf welcher Maschine die laufen.
Wichtig ist das die Grafana.ini entsprechend angepasst ist.
So sollte es klappen:
[security] allow_embedding = true [auth.anonymous] enabled = true org_name = Main Org. org_role = Viewer [users] allow_sign_up = false
Gibt es hier im Forum einige Threads mit hinweisen.
-
Danke Dir! Die grafana.ini ist angepasst.
habe jetzt das 64 Bit System Lite Debian installiert. Das System läuft vollständig auf einer SSD.pi@Vis2:~ $ free total used free shared buff/cache available Mem: 931432 152464 540216 988 238752 724660 Swap: 102396 0 102396 pi@Vis2:~ $
RAM ist noch genug da
Grafana und InfluxDB installiert und läuft!
Jetzt logge ich morgen ein paar Daten meiner Solaranlagen und versuche etwas zu basteln!
Besten Dank vorab für deine Hilfe. -
@knopers1 Wenn für dich OK, dann editiere doch bitte deinen Ersten Beitrag und setze ein [Gelöst] vor den Titel.