...
| 코드 블럭 |
|---|
|
DB # influx
Connected to http://localhost:8086 version 1.7.7
InfluxDB shell version: 1.7.7
> use telegraf
Using database telegraf
> select time, hostname, ifDescr, ifHCInOctets, ifHCOutOctets from interface limit 10
name: interface
time hostname ifDescr ifHCInOctets ifHCOutOctets
---- -------- ------- ------------ -------------
1564033501000000000 ........ Control Plane Interface 0 0
1564033501000000000 ........ EOBC0/0 523313485438 219027416263
1564033501000000000 ........ GigabitEthernet1/1 72976539034 13897483850
1564033501000000000 ........ GigabitEthernet1/10 0 0
1564033501000000000 ........ GigabitEthernet1/11 0 0
1564033501000000000 ........ GigabitEthernet1/12 0 0
1564033501000000000 ........ GigabitEthernet1/13 0 0
1564033501000000000 ........ GigabitEthernet1/14 0 0
1564033501000000000 ........ GigabitEthernet1/15 0 0
1564033501000000000 ........ GigabitEthernet1/16 0 0 |
| 코드 블럭 |
|---|
|
DB $ influx -database telegraf -execute "show series from interface limit 5"
key
---
interface,agent_host=...,host=localhost.localdomain,hostname=...,ifDescr=ae0
interface,agent_host=...,host=localhost.localdomain,hostname=...,ifDescr=ae0.0
interface,agent_host=...,host=localhost.localdomain,hostname=...,ifDescr=ae1
interface,agent_host=...,host=localhost.localdomain,hostname=...,ifDescr=ae1.0
interface,agent_host=...,host=localhost.localdomain,hostname=...,ifDescr=ae2
DB $ influx -database telegraf -execute "show series from interface" | wc -l
6018 |
...
duration : 0s → 보관주기 무한대
the duration of the retention policy is 0s which is an alias for infinite
https://stackoverflow.com/questions/41620595
| 코드 블럭 |
|---|
|
DB # influx
Connected to http://localhost:8086 version 1.7.7
InfluxDB shell version: 1.7.7
> show retention policies on telegraf
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
autogen 0s 168h0m0s 1 true |
...
용량은 큰 의미가 없음
데이터를 쌓으면서 압축하는 듯
| 코드 블럭 |
|---|
|
DB # date
Thu Jul 25 16:49:49 KST 2019
DB # du -h -d 0 /var/lib/influxdb/data/
63M /var/lib/influxdb/data/ |
...
| time | 용량(MB) |
|---|
| 2019-07-25 16:49 | 63 |
| 2019-07-26 08:35 | 56 |
| 2019-07-26 08:57 | 77 |
influxdb csv export
| 코드 블럭 |
|---|
|
DB $ influx -database telegraf -format csv -execute "select * from interface" > /tmp/influx.csv |
grafana 설치
yum repo 추가
yum 으로 설치
https://grafana.com/docs/installation/rpm/
...