...
Code Block |
---|
|
systemctl start influxdb |
5. Enter Influx console and create database
Code Block |
---|
|
influx
Connected to http://localhost:8086 version 1.7.2
InfluxDB shell version: 1.7.2
Enter an InfluxQL query
>CREATE DATABASE wcs_oam |
The installation procedure for Influx DB on Debian / Ubuntu differs only in the method of adding the necessary repository.
Influx DB can be installed to the same server with monitoring backend server. By default, TCP port 8086 or UDP port 8089 is used to connect to Influx DB.
DB structure
When launched first time, backend server creates wcs_oam database in Influx DB The database to store metric values as time series . The database contains fields with the following keys:
...
Code Block |
---|
|
name: 3-7ecbd270-123e-11e9-bb40-b96debd59887
time VIDEO_RATE
---- ----------
1546839525823000000 28424000
1546839525960000000 1002914
1546839526169000000 727679
1546839526358000000 662007
1546839526575000000 645467
1546839526770000000 633490
1546839526967000000 583736
1546839527162000000 622472
1546839527365000000 593104
1546839527563000000 666688
1546839527796000000 638784
1546839527999000000 637000
1546839528192000000 647208
1546839528772000000 421640
1546839528775000000 587632
1546839528805000000 740064
1546839529031000000 753504
1546839529232000000 767672
1546839529431000000 931088
1546839529643000000 1090696
1546839529840000000 772440
1546839530028000000 755744
1546839530242000000 812624
1546839530429000000 867240
1546839530630000000 878008
1546839530833000000 873528
1546839531031000000 850352
... |
Metric storage duration (retention policy) configuration
The longer the metrics are stored and the more streams are published. to WCS, the more Influx DB size. It is necessary to configure metric storage duration, or retention policy, to limit database volume and memory requirements. For example, 1 day duration can be set up as follows:
Code Block |
---|
|
influx
Connected to http://localhost:8086 version 1.7.2
InfluxDB shell version: 1.7.2
Enter an InfluxQL query
>CREATE RETENTION POLICY "one_day_only" ON "wcs_oam" DURATION 23h60m REPLICATION 1 DEFAULT |