I have (only) read access to a 2.x instance on the inverter of a PV system. I would like to periodically read data from the inverter database using a Raspberry PI (4B) with its own InfluxDB instance.
The way I (as a newbie) understand replication, it can only “send” from the source to a target. However, I need the reverse direction, i.e. “receiving” in the target from the source.
@kho Just create a task on your RPi InfluxDB instance that queries all the data written to your read-only instance since the last task interval and writes it to your RPi instance:
Hi @kho. To use the replication feature, you would need an API token from the source instance that has permission to create a replication. It sounds like you don’t have that permission.
Otherwise, if you have read permission on the source instance, you can query the data from the source, as @scott described (he just beat me to the punch).
first of all: Thanks for the task code (btw: one “)” was missing in the range line)
The task end with this error message: 2024-06-20 21:52:45 Started task from script: "import "influxdata/influxdb/tasks"\noption task = { \n name: … 2024-06-20 21:52:45 Completed(failed) 2024-06-20 21:52:45 could not execute task run: unexpected end of JSON input
Did you save the task through the UI? The UI does some funky stuff with the task option (setting the name and interval) when you create a brand new task using the UI. Double check the task code and make sure it didn’t get updated on save.
No worries. Just double check the InfluxDB host, org, and token in from. I’m wondering if it’s failing to authorize and just isn’t propagating back to the function call.