After my upgrade to OH3 I struggle with my persistence service (influxdb) and I would like to understand the root cause. However, so far I was not able to get enough logging.
So far I have enabled debug logging for the following namespaces:
The historic data is still there from the 2.5x installation. OH can connect to influxDB and it also shows me nice graphs (with data up to the migration to OH 3) in the main UI.
How did you setup OH for influxDB persistence? The contents of your influxdb.persist and influxdb.cfg would show that.
I would think you have influxDB persistence installed but not configured to actually persist. Requesting data would work that way.
url=http://influxdb:8086
version=V2
token=xxxxx
# Name of the database for V1 and name of the organization for V2
db=dokabe
# name of the retention policy for V1 and name of the bucket for V2
retentionPolicy=openhab
Shouldn’t that trigger a persistence of every item? If it for whatever reason is not possible I would expect some error messages in the log.
IMHO those settings should work, however they have to be in the correct OH3 folders. If you did an upgrade they might be in openhab2 folders which wouldnot work.
Where the database lives is the business of influxdb. Where openHAB persistence configuration files live,is openHAB’s business. There’s no direct link.
I agree. I assume that the connection between openhab and influx is working. Otherwise I would not be able to see historic data.
What irritates me is the fact that I don’t see anything in the logs. If there would be a problem with the configuration files or the connection to influx I would expect some error messages.
At least for the .cfg file I would assume I also would not get any historic data if the file would be either invalid or in a wrong location.
The .persist file is in the persistence directory of the openhab config directory. I’m using a docker installation with mounted directories. I.e. there is no risk of pointing to an old OH2 location.
I do see the following logs that the connection to influxdb is established
2021-04-10 10:52:24.221 [DEBUG] [.influxdb.InfluxDBPersistenceService] - InfluxDB persistence service is being activated
2021-04-10 10:52:24.222 [DEBUG] [.influxdb.InfluxDBPersistenceService] - Loaded configuration {url=http://influxdb:8086, component.name=org.openhab.persistence.influxdb.InfluxDBPersistenceService, retentionPolicy=oh_test, service.config.category=persistence, token=7rvE2FEq-rng4exKAX8QWnAh1x8b3yywgGJuBKat6FQkkkjygQ_qDDt-LeNH45AnMn5nSNRK7t9iWeO1B0NLsw==, service.config.description.uri=persistence:influxdb, version=V2, service.pid=[org.openhab.influxdb, org.openhab.influxdb], service.config.factory=false, service.config.label=InfluxDB Persistence Service, component.id=298, db=dokabe}
2021-04-10 10:52:24.233 [DEBUG] [rnal.influx2.InfluxDB2RepositoryImpl] - Succesfully connected to InfluxDB. Instance ready=class Ready {
status: ready
started: 2021-04-09T08:51:49.135858087Z
up: 24h0m35.087421633s
}
2021-04-10 10:52:24.237 [DEBUG] [rnal.influx2.InfluxDB2RepositoryImpl] - database status is OK
2021-04-10 10:52:24.238 [DEBUG] [.influxdb.InfluxDBPersistenceService] - InfluxDB persistence service is now activated
2021-04-10 10:52:43.646 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2021-04-10 10:52:43.661 [DEBUG] [.influxdb.InfluxDBPersistenceService] - Got a query for historic points!