Is it correct that only the last 30 days are being migrated?
I’m seeing the correct dates:
Command:
./rest2influxdb.sh fluksoElecB
Output:
### timestamps
item: fluksoElecB
10y: 2010-10-17T15:30:23
1y: 2019-09-19T15:30:23
1m: 2020-09-18T15:30:23
1w: 2020-10-10T15:31:23
1d: 2020-10-16T15:31:23
8h: 2020-10-17T07:31:23
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 202 100 202 0 0 22444 0 --:--:-- --:--:-- --:--:-- 25250
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2704 100 2704 0 0 330k 0 --:--:-- --:--:-- --:--:-- 330k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26912 0 26912 0 0 2021k 0 --:--:-- --:--:-- --:--:-- 2021k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 229 100 229 0 0 32714 0 --:--:-- --:--:-- --:--:-- 38166
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12067 0 12067 0 0 1309k 0 --:--:-- --:--:-- --:--:-- 1309k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 23390 0 23390 0 0 2076k 0 --:--:-- --:--:-- --:--:-- 2076k
### found values: 1298
### Line from 1 to 1000
HTTP/1.1 100 Continue
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: e8f5c243-107c-11eb-b196-000000000000
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.6.4
X-Request-Id: e8f5c243-107c-11eb-b196-000000000000
Date: Sat, 17 Oct 2020 13:30:23 GMT
Sleep for 10 seconds to let InfluxDB process the data...
### Line from 1001 to 2000
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: eef0bba3-107c-11eb-b1a7-000000000000
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.6.4
X-Request-Id: eef0bba3-107c-11eb-b1a7-000000000000
Date: Sat, 17 Oct 2020 13:30:33 GMT
Sleep for 10 seconds to let InfluxDB process the data...
### delete temporary files
Thank you very much.
When I followed your analyses, I noticed that my date had some extra 00’s at the end of the date. With removing everything, clone it again, it works !!!
Next step, checking if I can export/import ‘all’ exisitng data now. Guess it’ll be a bit much, but that’s why we’ve computers, no?
I’ve tried it and it seems the values were read from my MySQL database, but could not be written to InfluxDB 2.4.
./rest2influxdb.sh MQTT_Wetterstation_Temperature
### timestamps
item: MQTT_Wetterstation_Temperature
10y: 2012-09-23T14:23:41
1y: 2021-08-26T14:23:41
1m: 2022-08-25T14:23:41
1w: 2022-09-16T14:24:41
1d: 2022-09-22T14:24:41
8h: 2022-09-23T06:24:41
resturl: http://openhab.fritz.box:8080/rest/persistence/items/MQTT_Wetterstation_Temperature?serviceId=jdbc&api_key=MQTT_Wetterstation_Temperature
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24.5M 0 24.5M 0 0 1221k 0 --:--:-- 0:00:20 --:--:-- 5745k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.3M 0 10.3M 0 0 1242k 0 --:--:-- 0:00:08 --:--:-- 2463k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 681k 0 681k 0 0 1414k 0 --:--:-- --:--:-- --:--:-- 1414k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 173k 0 173k 0 0 1443k 0 --:--:-- --:--:-- --:--:-- 1431k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24268 0 24268 0 0 1077k 0 --:--:-- --:--:-- --:--:-- 1077k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11343 0 11343 0 0 615k 0 --:--:-- --:--:-- --:--:-- 615k
### found values: 988158
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.4.0
X-Platform-Error-Code: unauthorized
Date: Fri, 23 Sep 2022 12:24:13 GMT
Content-Length: 48
Connection: close
Hi, I’m running OH3.4 (latest version) and installalled InfluxDB via openHABian-config, which seems to be version 1.8.
When starting the script I get:
openhabian@openhabianpi:/etc/openhab/migrate_rrd4j $ sudo ./rest2influxdb.sh ShellyTVWohnzimmer_Watt
### timestamps
item: ShellyTVWohnzimmer_Watt
10y: 2012-09-26T21:36:17
1y: 2021-08-29T21:36:17
1m: 2022-08-28T21:36:17
1w: 2022-09-19T21:37:17
1d: 2022-09-25T21:37:17
8h: 2022-09-26T13:37:17
resturl: http://192.168.10.50:8080/rest/persistence/items/ShellyTVWohnzimmer_Watt?serviceId=rrd4j&api_key=ShellyTVWohnzimmer_Watt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 61 0 61 0 0 5083 0 --:--:-- --:--:-- --:--:-- 5545
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 216k 0 216k 0 0 3604k 0 --:--:-- --:--:-- --:--:-- 3604k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 78728 0 78728 0 0 3075k 0 --:--:-- --:--:-- --:--:-- 3075k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 319k 0 319k 0 0 4697k 0 --:--:-- --:--:-- --:--:-- 4767k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 35747 0 35747 0 0 1837k 0 --:--:-- --:--:-- --:--:-- 1837k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 18126 0 18126 0 0 737k 0 --:--:-- --:--:-- --:--:-- 737k
### found values: 18105
curl: (7) Failed to connect to 192.168.10.50 port 8086: Connection refused
Sleep for 5 seconds to let InfluxDB process the data...
curl: (7) Failed to connect to 192.168.10.50 port 8086: Connection refused
Sleep for 5 seconds to let InfluxDB process the data...
So, the script can read the RRD4J data - but can’t connect to the database.
The IP address, the port, the user, the password and the name of the database are correct.
What else could be the reason for the error message - and how can I find out what’s the real problem?
I’m now a step further - the reason was the binding address was “localhost” while I was using the real ipaddress in the script. However - how I get “no content”: