docker common command

docker pull influxdb

docker run -p 8086:8086 -v $PWD:/var/lib/influxdb influxdb

daemon docker run -p 8086:8086 -d -v $PWD:/var/lib/influxdb influxdb

docker container ls

docker container logs

linux command

列出所有加载失败的 Unit

$ systemctl list-units --failed

runing deb

systemctl restart telegraf

show deb logger

sudo journalctl -u telegraf

influx normal command

show databases

create database test

drop database test

use test

show measurements

insert logger,hostname=server01 value=1

select * from logger

drop measurement logger

show series from logger

curl -POST http://mk-vm-database:8086/query --data-urlencode "q=CREATE DATABASE test_1"

curl -POST http://mk-vm-database:8086/query --data-urlencode "q=show databases"

curl -i -XPOST 'http://mk-vm-database:8086/write?db=test_1' --data-binary

'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'

SHOW RETENTION POLICIES ON test

CREATE RETENTION POLICY "2_hours" ON "test" DURATION 2h REPLICATION 1 DEFAULT

ALTER RETENTION POLICY "2_hours" ON "test" DURATION 4h DEFAULT

drop retention POLICY "2_hours" ON "test"

CREATE CONTINUOUS QUERY cq_30m ON telegraf BEGIN SELECT mean(used) INTO mem_used_30m FROM mem GROUP BY time(30m) END

SHOW CONTINUOUS QUERIES

DROP CONTINUOUS QUERY

GitHub – fastspeeed

fastspeeed