Docker版influxdb入门
2022-03-23 本文已影响0人
万州客
这个influxdb,其实在前年,我还系统的看过官方英文文档,现在也忘得差不多了。重新拾起来玩玩吧。
参考URL:
https://blog.csdn.net/liuyueyi25/article/details/99890513
https://www.cnblogs.com/XY-Heruo/p/15842752.html
https://blog.csdn.net/qq_35935748/article/details/122359681
https://www.cnblogs.com/wjx-blog/p/15844181.html
https://www.cnblogs.com/owenzh/p/13791955.html
一,运行docker版influxdb
docker run -d -p 8083:8083 -p 8086:8086 --name influxdb influxdb
二,WEB UI查看调整信息




这里附一个测试的数据信息
mem,host=host1 temperature=23.13,humidity=13.45
mem,host=host1 temperature=25.13,humidity=11.45
mem,host=host1 temperature=28.13,humidity=18.45
mem,host=host1 temperature=21.13,humidity=10.45
mem,host=host1 temperature=22.13,humidity=12.45
mem,host=host2 temperature=23.13,humidity=17.45
mem,host=host2 temperature=21.13,humidity=16.45
mem,host=host2 temperature=19.13,humidity=18.45
mem,host=host3 temperature=24.13,humidity=14.45
mem,host=host3 temperature=25.13,humidity=12.45
mem,host=host3 temperature=26.13,humidity=14.45
mem,host=host3 temperature=27.13,humidity=13.45
三,通过terminal终端操作
先建好认证配置文件
influx config create --config-name sss --host-url http://192.168.1.111:8086 --org HuaYou --token 'rOsOrOmekRrOzJX7gPy4fjMswfUaynzGT9wBMuistL-v4hCVJk8_uxSWdmwh-57Z38NcGnTqRyFJ7PfDPNeEJg==' --active
然后,就可以使用相关的命令了
root@9ff08cbfdf57:/# influx bucket list
ID Name Retention Shard group duration Organization ID Schema Type
c2e17833796088b2 HuaYouBucket infinite 168h0m0s d4d7217baeb507b9 implicit
e5a27dbec82d969a SkyBucket infinite 168h0m0s d4d7217baeb507b9 implicit
28cdd1af3fb8b9f9 _monitoring 168h0m0s 24h0m0s d4d7217baeb507b9 implicit
2a48dc51de0db708 _tasks 72h0m0s 24h0m0s d4d7217baeb507b9 implicit
query命令,可能通过api或是第三方库,更好操作吧。我前年是通过python库操作。