Skip to content

Instantly share code, notes, and snippets.

@gerritjandebruin
Last active January 14, 2022 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerritjandebruin/16badc46361ba2521d2e94160d69bd22 to your computer and use it in GitHub Desktop.
Save gerritjandebruin/16badc46361ba2521d2e94160d69bd22 to your computer and use it in GitHub Desktop.
Drop measurements in Influxdb
for i in 'lightlevel' 'lumi_lumi' 'multisensor' 'rwl021' 'batterij' 'verbinding' 'herstart' 'notificatie' 'oplader' 'tradfri' 'water' 'wifi_signal' 'relais' 'on_off'
do
influx -host xxx -username homeassistant -password xxx -port 8086 --execute 'show measurements' --database=homeassistant | grep $i | xargs -I{} influx -host xxx -username homeassistant -password xxx -port 8086 --execute 'drop measurement "{}"' --database=homeassistant
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment