TICK Cheat Sheet (Telegraf, InfluxDB, Chronograf & Kapacitor)
influx -ssl -unsafeSsl
USE telegraf
influx -ssl -unsafeSsl \
-database 'telegraf' \
-execute "SHOW SERIES WHERE \"host\" = 'my_host'"
SHOW SERIES WHERE "host" = 'my_host'
DROP SERIES WHERE "host" = 'my_host'
SHOW SERIES WHERE "host" = 'my_host'
SHOW SERIES FROM "measurement" WHERE "host" = 'my_host'
DROP SERIES FROM "measurement" WHERE "host" = 'my_host'
SHOW SERIES WHERE "host" = 'my_host'
SHOW MEASUREMENTS ON telegraf
DROP MEASUREMENT "measurement_name"
kapacitor -skipVerify list tasks
kapacitor -skipVerify disable $(kapacitor -skipVerify list tasks | awk '{if (NR!=1) {print $1}}')
kapacitor -skipVerify enable $(kapacitor -skipVerify list tasks | awk '{if (NR!=1) {print $1}}')
# option 1
kapacitor -skipVerify watch <task_id>
# option 2
## @TICKscript
|httpOut('id')
## @browser
http://kapacitor-host:9092/kapacitor/v1/tasks/<task_id>/<httpOut_id>
# option 3
kapacitor -skipVerify show <task_id>
#!/usr/bin/env bash
influx_show(){ docker exec $1 influx -ssl -unsafeSsl -database 'telegraf' -execute "SHOW SERIES WHERE \"host\" = '$2'" ;}
influx_drop(){ docker exec $1 influx -ssl -unsafeSsl -database 'telegraf' -execute "DROP SERIES WHERE \"host\" = '$2'" ;}
influx_restart(){ cd /opt/TICK-docker && docker-compose restart influxdb ;}
kapacitor_restart(){ cd /opt/TICK-docker && docker-compose restart kapacitor ;}