NEWS
Backitup - Grafana - https - self-signed certificate
-
Hallo zusammen,
ich bräuchte mal euren Rat.
Ich habe den ioBroker incl. Grafana auf einem Raspberry Pi installiert und Backups mit Backitup eingerichtet. Diese sind auch normal gelaufen.
Nach dem ich Grafana mittel selbst erstelltem Zertifikat auf https umgestellt hatte, bekomme ich beim Backup mittels Backitup folgende Fehlermeldung und es wird von Grafana kein Backup mehr erzeugt. In den Einstellungen des Backitup Adapters habe ich das Protokoll für die Verbindung aber auf https umgestellt:
Started iobroker ... [DEBUG] [mount] - noserverino option: false [DEBUG] [mount] - cifs-mount command: "sudo mount -t cifs -o username=ioBroker-Backup,password=****,rw,file_mode=0777,dir_mode=0777,vers=3.0 //ravennas/iobroker/Backup /opt/iobroker/backups" [DEBUG] [mount] - mount successfully completed [DEBUG] [mount] - done [DEBUG] [iobroker] - host.iobroker-pi 993 states saved [DEBUG] [iobroker] - host.iobroker-pi 2757 objects saved [DEBUG] [iobroker] - Backup created: /opt/iobroker/backups/iobroker_2022_10_13-12_01_53_backupiobroker.tar.gz [DEBUG] [iobroker] - done [DEBUG] [grafana] - Start Grafana Backup ... [DEBUG] [grafana] - Created grafana_tmp directory: "/opt/iobroker/backups/grafana_tmp" [DEBUG] [grafana] - Created dashboard directory [DEBUG] [grafana] - Created dashboards_manually_restore directory [DEBUG] [grafana] - Created datasource directory [DEBUG] [grafana] - start Grafana request ... **[DEBUG] [grafana] - Grafana is not available: Error: self signed certificate** [DEBUG] [grafana] - Grafana is not available! [DEBUG] [grafana] - Try deleting the Grafana tmp directory: "/opt/iobroker/backups/grafana_tmp" [DEBUG] [grafana] - Grafana tmp directory "/opt/iobroker/backups/grafana_tmp" successfully deleted [DEBUG] [grafana] - Grafana Backup cannot created ... [DEBUG] [grafana] - done [DEBUG] [cifs] - used copy path: /iobroker/Backup [DEBUG] [cifs] - done [DEBUG] [clean] - done [DEBUG] [historyHTML] - new history html values created [DEBUG] [historyHTML] - done [DEBUG] [historyJSON] - new history json values created [DEBUG] [historyJSON] - done [DEBUG] [umount] - mount activ, umount is started ... [DEBUG] [umount] - umount successfully completed [DEBUG] [umount] - done [EXIT] 0
Auf Github habe ich unter diesem Link https://github.com/simatec/ioBroker.backitup/issues/483 vermutlich genau die Situation gefunden.
In Grafana scheint sich der Umgang mit API Keys anscheinend auch etwas geändert zu haben. Dort habe ich einen neuen Service Account mit der Rolle Viewer als Admin erstellt und ein Token erzeugt und diesen in Backitup hinterlegt. Leider alles ohne Erfolg, ich verstehe aktuell nicht, wo mein Fehler ist.Hier noch ein paar Detail zu den eingesetzen Versionen:
ioBroker-Admin: 6.2.12
Backitup: 2.4.12
Grafana: 9.1.6Habt Ihr einen Tipp für mich?
Danke euch.
-
@ravenmaster887 hast Du auch die notwendigen Änderungen in der grafana.ini vorgenommen ?
-
@djmarc75 Ja, die Einstellungen hatte ich angepasst. Die Webseite von Grafana selbst bekomme ich auch normal mit https://iobroker-pi:3000 geöffnet. Man bekommt halt die übliche Meldung des Browsers bezüglich dem selbst erstellten Zertifikat.
-
@ravenmaster887 ich gehe davon aus dass Du SSL-Zertifikate schon öfters erstellt hast und auch aktiv (irgendwo) nutzt!
Daher scheint es wohl in der Konfig vom Adapter zu liegen.
Zeig mal einen Screenshot davon bitte.EDIT: brauchst eigentlich doch nicht wenn Du tatsächlich auf https umgestellt hast.
-
@djmarc75 Hier ein Screenshot der Backitup Grafana Konfig:
-
@ravenmaster887 ist jetzt nur mal so eine Idee:
trag mal bei Server die IP ein, auch wenn Grafana auf dem selben System läuft.
-
@djmarc75 Hab mal die IP in der Konfig statt localhost eingetragen -> leider ohne Erfolg.
-
@ravenmaster887 sagte in Backitup - Grafana - https - self-signed certificate:
Dort habe ich einen neuen Service Account mit der Rolle Viewer als Admin erstellt
Erstelle nochmals einen anderen User aber mit der Rolle Admin und dann diese Daten inkl. neuem Token im Backitup einfügen.
-
@djmarc75 Leider weiterhin mit gleichem Fehler.
-
@ravenmaster887 Wenn Du Grafana per Browser aufrufst musst Du dann jedesmal das Zertifikat bestätigen ?
-
@djmarc75 Klar, ich muss bei jeden Start eines Browsers das Zertifikat einmalig für diese Browsersitzung bestätigen. Ist ja normal bei selbst erstellten Zertifikaten. Prinzipiell gehe ich auch davon aus, dass wenn ich Grafana ein offizielles gültiges Zertifikat verpasse, dass das Backup dann normal durchlaufen würde.
Die Frage ist, ob ein selbst erstelltes Zertifikat und dessen Begleiterscheinungen es grundsätzlich verhindert, das Backitup ein Backup per https von Grafana machen kann?
-
@ravenmaster887 sagte in Backitup - Grafana - https - self-signed certificate:
einmalig für diese Browsersitzung bestätigen
Ja, das ist klar - ziehe die Frage zurück
@ravenmaster887 sagte in Backitup - Grafana - https - self-signed certificate:
und dessen Begleiterscheinungen es grundsätzlich verhindert
das hat wohl den Anschein.
Zwar soll ja in der Version 2.1.15 die Auswahl hinzugekommen sein aber anscheinend keine automatische Zertifikatsbestätigung stattfinden. Bin da auch überfragt.
Ich empfehle direkt ein neues Issue auf GIT zu machen vll mit dem Hinweis auf das Issue von Deinem Startpost und dem LOG Eintrag. -
@djmarc75 Habe grad auf Github https://github.com/simatec/ioBroker.backitup gesehen, dass es Backitup in noch mehreren neueren Versionen gibt. In den Adaptern im ioBroker werden mir die neueren Versionen > 2.4.12 vermutlich "noch" nicht angezeigt.
Speziell im Changelog der Version 2.4.13 steh was von Grafana fix:
2.4.13 (2022-09-28)
(simatec) dependencies updated
(simatec) Fix Grafana Backup
(simatec) Appveyor testing removed
(simatec) Fix Test & ReleaseIch versuche mal den Adapter per Console auf die neuste Version zu bekommen und teste nochmal.
-
@ravenmaster887 sagte in Backitup - Grafana - https - self-signed certificate:
Ich versuche mal den Adapter per Console auf die neuste Version zu bekommen und teste nochmal.
geh doch kurz auf beta repo und installier darüber.. danach halt wieder auf stable repo
-
@djmarc75 Auch eine Idee. Bin noch nicht so firm in der ioBroker Umgebung. Habe es aber gefunden und jetzt die Version 2.4.16 des backitup Adapters installiert.
Leider weiterhin mit dem gleichen Ergebnis.[DEBUG] [grafana] - Start Grafana Backup ...
[DEBUG] [grafana] - Created grafana_tmp directory: "/opt/iobroker/backups/grafana_tmp"
[DEBUG] [grafana] - Created dashboard directory
[DEBUG] [grafana] - Created dashboards_manually_restore directory
[DEBUG] [grafana] - Created datasource directory
[DEBUG] [grafana] - start Grafana request ...
[DEBUG] [grafana] - Grafana is not available: Error: self signed certificate
[DEBUG] [grafana] - Grafana is not available!
[DEBUG] [grafana] - Try deleting the Grafana tmp directory: "/opt/iobroker/backups/grafana_tmp"
[DEBUG] [grafana] - Grafana tmp directory "/opt/iobroker/backups/grafana_tmp" successfully deleted
[DEBUG] [grafana] - Grafana Backup cannot created ...
[DEBUG] [grafana] - doneEine neue Option in den Einstellungen habe ich auch nicht gefunden.
Soweit ich das sehen kann, ist der Entwickler @simatec ja auch hier im Forum aktiv. Wäre die Frage, ob ich zu dem Thread hier ein Issue auf Guthub erstellen soll?
-
@ravenmaster887 sagte in Backitup - Grafana - https - self-signed certificate:
Wäre die Frage, ob ich zu dem Thread hier ein Issue auf Guthub erstellen soll?
Wenn Du wirklich alle Einstellungen seitens Grafana, Grafana.ini und im BackitupAdapter korrekt vorgenommen hast dann wäre das nicht verkehrt. Aber warte noch ob sich @simatec hierzu meldet.
EDIT: oder vll meldet sich ja jemand bei dem/der es so erfolgreich läuft.
-
@ravenmaster887 sagte in Backitup - Grafana - https - self-signed certificate:
Dort habe ich einen neuen Service Account mit der Rolle Viewer als Admin erstellt und ein Token erzeugt
Rolle bitte immer Admin mit vollen Rechten... dann läuft das Backup durch.
Du willst ja auch ggfs. einen Restore durchführen. Viewer ist hier falsch. -
@simatec Ich bin nochmal die Einstellungen in den Service accounts in Grafana durchgegangen und habe sie nochmal neu gesetzt.
Wären diese Einstellungen so richtig?
Bei dem anschließendem Test kam leider das gleiche Ergebnis heraus.
[DEBUG] [grafana] - Start Grafana Backup ...
[DEBUG] [grafana] - Created grafana_tmp directory: "/opt/iobroker/backups/grafana_tmp"
[DEBUG] [grafana] - Created dashboard directory
[DEBUG] [grafana] - Created dashboards_manually_restore directory
[DEBUG] [grafana] - Created datasource directory
[DEBUG] [grafana] - start Grafana request ...
[DEBUG] [grafana] - Grafana is not available: Error: self signed certificate
[DEBUG] [grafana] - Grafana is not available!
[DEBUG] [grafana] - Try deleting the Grafana tmp directory: "/opt/iobroker/backups/grafana_tmp"
[DEBUG] [grafana] - Grafana tmp directory "/opt/iobroker/backups/grafana_tmp" successfully deleted
[DEBUG] [grafana] - Grafana Backup cannot created ...
[DEBUG] [grafana] - done -
@ravenmaster887 Da bist du völlig falsch.
Du musst einen API-Key erzeugen und diesen in Backitup eintragen -
@simatec Hab nochmal einen API-Key in Grafana erstellt und den Key im Backitup-Adapter eingefügt:
Leider trotzdem mit gleichem Ergebnis:
[DEBUG] [grafana] - Start Grafana Backup ...
[DEBUG] [grafana] - Created grafana_tmp directory: "/opt/iobroker/backups/grafana_tmp"
[DEBUG] [grafana] - Created dashboard directory
[DEBUG] [grafana] - Created dashboards_manually_restore directory
[DEBUG] [grafana] - Created datasource directory
[DEBUG] [grafana] - start Grafana request ...
[DEBUG] [grafana] - Grafana is not available: Error: self signed certificate
[DEBUG] [grafana] - Grafana is not available!
[DEBUG] [grafana] - Try deleting the Grafana tmp directory: "/opt/iobroker/backups/grafana_tmp"
[DEBUG] [grafana] - Grafana tmp directory "/opt/iobroker/backups/grafana_tmp" successfully deleted
[DEBUG] [grafana] - Grafana Backup cannot created ...
[DEBUG] [grafana] - doneMich stört an der Stelle die Fehlermeldung, die Ja explizit sagt, Grafana is not available: Error: self signed certificate.