Giving the backend software infrastructure some love (2022)

Hi there,

it has been a while since the last time [1], so we just wanted to let you know that we started to work on a refresh of the backend infrastructure.

On the foundation infrastructure side, we are aiming to upgrade to the most recent Grafana 9.3 [2]. Kotori has seen some compatibility updates to accomodate changes with more recent versions of Grafana with version 0.27.0 [3][4].

Last but not least, even if InfluxDB version 2 is available since November 2020 [5][6], we are still running InfluxDB 1.8.

With kind regards,
Andreas.


  1. Giving the backend software infrastructure some love (2021) ↩︎

  2. Grafana 9.3.1 (2022-11-30) and What's new | Grafana documentation ↩︎

  3. Changelog — Kotori 0.27.0 documentation ↩︎

  4. While we did not publish corresponding distribution packages yet, Kotori 0.27.0 is available on PyPI. ↩︎

  5. influxdb/CHANGELOG.md at master · influxdata/influxdb · GitHub and InfluxDB 2.0 is coming ↩︎

  6. Most recent release: InfluxDB v2.6.0 [2022-12-15] ↩︎

:mega: We upgraded to Grafana 9 on Dec 31, 2022 already – only on weather.hiveeyes.org – and everything went well.

wget https://dl.grafana.com/oss/release/grafana_8.5.15_amd64.deb
dpkg -i grafana_8.5.15_amd64.deb
wget https://dl.grafana.com/oss/release/grafana_9.3.2_amd64.deb
dpkg -i grafana_9.3.2_amd64.deb

At the data acquisition subsystem of the ISEMS system [1], @elektra reported that, when new charger devices are added, no corresponding panels are created in Grafana.

Bummer. Most probably, we forgot to update to the most recent version of Kotori after updating Grafana. And, indeed:

kotori@eltiempo:~$ kotori --version
Kotori version 0.26.11

  1. The umbrella project for the DIY MPPT, FOSS und OSHW Solar-Bleiakku-Lader. ↩︎

We decided to use the existing environment at /opt/kotori for updating from version 0.26.11 to version 0.27.0.

# Login, run backup, get ready.
ssh root@eltiempo.hiveeyes.org
su - kotori
tar -czf /tmp/kotori-2023-10-13.tar.gz /opt/kotori

source /opt/kotori/bin/activate
python -V
Python 3.9.2
kotori --version
Kotori version 0.26.11
# Upgrade command.
pip install kotori[daq,daq_geospatial,export,scientific,firmware] --upgrade
kotori --version
Kotori version 0.27.0
root@eltiempo:~# systemctl restart kotori

I don’t think this works well already. I think Kotori is clearly wrong on this detail, because that dashboard definitively exists.

Get folder with uid="instagraf"
Getting dashboard "isems-testdrive"
Grafana dashboard not found: Client Error 404: {"message":"Dashboard not found","traceID":""}
Details
2023-01-13T01:32:04.714595 [kotori.daq.graphing.grafana.manager] INFO    : Provisioning Grafana dashboard "isems-testdrive" for database "isems_testdrive" and measurement "foobar_openmppt_hp1_sensors"
2023-01-13T01:32:04.714704 [kotori.daq.graphing.grafana.api    ] INFO    : Checking/creating datasource "isems_testdrive" with "{'type': 'influxdb', 'url': 'http://localhost:8086/', 'database': 'isems_testdrive', 'user': {REDACTED}', 'password': '{REDACTED}', 'name': 'isems_testdrive', 'access': 'proxy'}"
2023-01-13T01:32:04.726712 [kotori.daq.graphing.grafana.api    ] INFO    : Client Error 409: {"message":"data source with the same name already exists","traceID":""}
2023-01-13T01:32:04.727668 [kotori.daq.graphing.grafana.api    ] INFO    : Get folder with uid="instagraf"
2023-01-13T01:32:04.739905 [kotori.daq.graphing.grafana.api    ] INFO    : Getting dashboard "isems-testdrive"
2023-01-13T01:32:04.751115 [kotori.daq.graphing.grafana.api    ] INFO    : Grafana dashboard not found: Client Error 404: {"message":"Dashboard not found","traceID":""}
2023-01-13T01:32:04.755747 [kotori.daq.graphing.grafana.api    ] INFO    : Creating/updating dashboard "isems-testdrive"
2023-01-13T01:32:04.771010 [kotori.daq.graphing.grafana.api    ] WARN    : Precondition failed: name-exists (`A dashboard with the same name in the folder already exists`)
2023-01-13T01:32:04.771116 [kotori.daq.graphing.grafana.api    ] INFO    : Checking dashboard "isems-testdrive"
2023-01-13T01:32:04.782433 [kotori.daq.graphing.grafana.api    ] ERROR   : Grafana dashboard not found: Client Error 404: {"message":"Dashboard not found","traceID":""}

So, I think we’ve discovered a bug, see Instant dashboards are not provisioned after update to Grafana 9.3.1 and Kotori 0.27.0 · Issue #107 · daq-tools/kotori · GitHub. Thanks for reporting, @elektra!

The issue has been resolved.


  1. It’s a perfect chance to get rid of outdated panels anyway, right? ;] ↩︎

  2. https://daq.example.org/grafana/d/start/welcome?search=open&tag=instant ↩︎

  3. https://daq.example.org/grafana/dashboards/f/instagraf/instant-dashboards ↩︎

  4. You do not customize them anyway, do you? Actually, you shouldn’t: The instant dashboards should only be used as a blueprint, and not be edited or further customized. Please do that on behalf of separate dashboards. ↩︎

1 Like