Hello,
I can’t delete a “measurements” from the database.
Unfortunately I created a CQ by assigning a wrong name to the “measurements” and I would like to delete it, but I cannot manage with any command, even deleting the continuous query.
The measure in question is called: “sensor_infinite_dataraw_temperture” and is located in the database “homeassistant”
I tried with the following command:
DROP MEASUREMENT sensor_infinite_dataraw_temperture
the sensor I was talking about in the first post (“sensor_infinite_dataraw_temperture”) I deleted it by deleting the entire “homeassistant” database, but I would like to learn how to delete the “measurements” for the future in case of need, without having to delete the entire DB !
Thanks for the reply, but how do I connect to the influx db?
I have installed the add-on in HomeAssistant installed on raspberry as an operating system.
Hello @SmartM-ui,
Looking at the home assistant docs
It looks like the hassio-addons/addon-influxdb “exposes an HTTP API for client interaction” So I would use the InfluxDB API to drop a series or measurement. With default as localhost:8086. So I’d try following the InfluxDB API documentation examples.
Writing the code from the terminal on the macbook, it reports the following message:
curl: (7) Failed to connect to localhost port 8086: Connection refused
Hi @Anaisdg ,
thanks to the documentation you indicated, my friend Mario (shogunxam (MARIO D'AMICO) · GitHub) was able to process the code that allowed the cancellation of the “measurements”:
curl -u myusername: mypassword -XPOST ‘http: // localhost: 8086 / query? db = mydb’ --data-urlencode ‘q = drop measurement “mymeasurement”’