Change influxdb to influxdb2, how to?

Hi,

we currently are using icinga2 with influxdb (1.8), grafana and the icingaweb2-module-grafana.
So far, so good.
But we actually have to add some windows server to the monitoring. After getting used to windows everything seems to work fine.
Except for grafana graphs.
The fine documentation tells us we shall import the pre-made dashboards into grafana. After doing so grafana displays a lot of errors.
Reading the docs again we found influxdb2 is listed as requirement.

I read several times people are in fact using influxdb2.
Is the above mentioned icingaweb2 module working also with influxdb2? Requirements there according to the github page is influxdb>=1.0.

If yes, has anyone successfully converted influxdb1 data to influxdb2?

Thanks for any hint,
Christian

We have a setup where Icinga2, grafana and InfluxDB are running on RHEL 7.9 and monitoring Linux and Windows servers. Our version is InfluxDB v2.4.0, and everything works fine. We did not upgrade InfluxDB, though, we were running v2.x from the start.
I hope this helps at least a bit.
For further info on upgrading InfluxDB, you may want to look at the InfluxDB provider.

Yes. It is your grafana where the appropriate data source needs to be configured.

Yes, but it wasn’t the most obvious. At least the docs weren’t completely helpful when we tried to do it.

Here is what we did:

Activate Influx2 Writer
Configure Influx2 writer
Deactivate influx1 Writer
Restart Icinga2 Daemon

Update influxdb:
systemctl stop influxdb
systemctl disable influxdb
dnf remove -y influxdb
dnf install -y influxdb2 influxdb2-cli

systemctl status influxdb
/usr/share/influxdb/influxdb2-upgrade.sh
mv /etc/influxdb/influxdb.conf.rpmsave /etc/influxdb/influxdb.conf
/var/tmp/influxdbv2-remove.sh

screen -S influx_migration
/usr/share/influxdb/influxdb2-upgrade.sh
systemctl enable influxdb --now

Answer questions of the updater:

> Welcome to InfluxDB 2.0!
? Please type your primary username root
? Please type your password ************************
? Please type your password again ************************
? Please type your primary organization name whatever
? Please type your primary bucket name icinga
? Please type your retention period in hours, or 0 for infinite 8760
? Setup with these parameters?
  Username:          root
  Organization:      MCMS
  Bucket:            icinga
  Retention Period:  8760h0m0s

This should give you a influxdb2 setup with a bucket for each retention policy.
Then create a API token for the influxdb2 writer and put it in the config and restart icinga. After that you should see performance data getting written into the primary bucket.

Be sure to make a backup before!