仰起嘴角 2020-04-21
InfluxDB中的series是一种集合的概念,在同一个database中,相同retention policy、相同measurement、相同tag的数据属于一个series集合,同一个series的数据在物理上按照时间顺序排列在一起。
将以下数据插入到InfluxDB中。
insert 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
注意:
查看当前数据库的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...