当前位置:Gxlcms >
数据库问题 >
InfluxDB学习(三):InfluxDB数据库series、points、shard概念
InfluxDB学习(三):InfluxDB数据库series、points、shard概念
时间:2021-07-01 10:21:17
帮助过:3人阅读
instance,dc
=us
-west
-2,server
=ec2
-dcas
-address
-db
-01 cpu_usage_user
=5.2,cpu_usage_system
=1.0,cpu_usage_idle
=90.7,cpu_usage_wait
=3.1
insert instance,dc
=us
-west
-2,server
=ec2
-dcas
-address
-db
-01 memory_total
=8009556,memory_used
=1417488,memory_free
=244076,memory_shared
=118960,memory_buffered
=0,memory_cached
=6347992,memory_available
=6082012
insert instance,dc
=us
-west
-2,server
=ec2
-dcsindexsvc
-01 cpu_usage_user
=4.1,cpu_usage_system
=2.0,cpu_usage_idle
=97.7,cpu_usage_wait
=2.3
insert instance,dc
=us
-west
-2,server
=ec2
-dcsindexsvc
-01 memory_total
=32394732,memory_used
=11330204,memory_free
=5618464,memory_shared
=229908,memory_buffered
=0,memory_cached
=15446064,memory_available
=20433240
insert instance,dc
=us
-west
-2,server
=ec2
-autodenalicontentpoi
-01 cpu_usage_user
=13.6,cpu_usage_system
=0.8,cpu_usage_idle
=85.6,cpu_usage_wait
=0.6
insert instance,dc
=us
-west
-2,server
=ec2
-autodenalicontentpoi
-01 memory_total
=64990084,memory_used
=842448,memory_free
=348420,memory_shared
=17174872,memory_buffered
=0,memory_cached
=63799216,memory_available
=46397536
注意:
- 插入的数据中measurement为instance,tag为dc和server,field为cpu***和memory***.
- 上述数据中,虽然插入了6条数据,但是每两条数据的tag都是重复的,根据Series集合的定义,在插入的6条数据中,属于3个series。
查看当前数据库的Series信息
> show series;
key
---
instance,dc=us-west-2,server=ec2-autodenalicontentpoi-01
instance,dc=us-west-2,server=ec2-dcas-address-db-01
instance,dc=us-west-2,server=ec2-dcsindexsvc-01
Series中的key为measurement,tag_key1=tag_value1,tag_key2=tag_value2..., value即为field_key1=field_value1,field_key2=field_value2...
InfluxDB学习(三):InfluxDB数据库series、points、shard概念
标签:span nali 定义 集合 tab sed base buffered server