Hi,
I tidied up some telegraf data to remove old hosts using this code:
influx delete --bucket "BUCKET_HERE" --predicate "host=\"HOST_IM_DELETING\"" --o ORG --token "token_here==" --start 1970-01-01T00:00:00Z --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --skip-verify --host "https://URL_HERE:8086"
When I use the Influxdb Data Explorer I can see that the information has gone, but for some reason they still exist within Grafana dashboard variables. Here’s the variable code:
import "influxdata/influxdb/schema"
schema.tagValues(bucket: "${bucket}", tag: "host")
How and where might it still be?
Is anyone able to help or point me in the right direction of where I can ask?
I’m encountering the exact same problem, did you find a solution?
It’s so long ago I can’t remember. Here’s how I delete date these days:
influx delete --bucket “BUCKET_NAME” --host https://NAME/IPADDRESS:8086 --predicate ‘_measurement=“MEASUREMENT_NAME”’ --o ORG_NAME --token “TOKEN_HERE” --start 1970-01-01T00:00:00Z --stop $(date +“%Y-%m-%dT%H:%M:%SZ”) --skip-verify
I’ve also at some point had to try it this way from the terminal:
curl --insecure --request POST https://HOSTNAME/IPADDRESS:8086/api/v2/delete?org=ORG_NAME&bucket=BUCKET_NAME\
–header ‘Authorization: Token TOKEN_HERE’
–header ‘Content-Type: application/json’
–data ‘{“start”: “1970-01-01T00:00:00Z”, “stop”: “2022-08-24T00:00:00Z”, “predicate”: “_measurement="[‘MEASUREMENT_NAME’]"”}’
It’s been quite a while since I’ve had to delete data but see how you get on.