If you need OceanBase Migration Service (OMS) to collect and display historical monitoring data, deploy a time-series database (TSDB). This topic describes how to deploy a TSDB and the limits.
Limits
A TSDB can be deployed in OMS V2.1.0 and later. Currently, InfluxDB 1.8 is deployed as a TSDB.
You need to use port 8086 to deploy a TSDB.
A time series database (TSDB) supports only one-node deployment and does not support high availability. You need to deploy only one TSDB. You can deploy the TSDB and OMS on the same host. When the service fails, monitoring data becomes unavailable.
Procedure
Log on to the host where the TSDB is to be deployed.
Load the image of InfluxDB 1.8.
Click here to download the InfluxDB image, and upload it to the host where the time-series database is to be deployed.
sudo docker load -i ${influxdb_image}Start the Docker container and ensure that data can be written to the mounted data disk.
sudo docker run -dit -p 8086:8086 -p 14444:14444 \ -v {Mounted data disk}:/var/lib/influxdb \ --env INFLUXDB_BIND_ADDRESS=127.0.0.1:14444 \ --env INFLUXDB_HTTP_AUTH_ENABLED=true \ --env INFLUXDB_HTTP_PING_AUTH_ENABLED=true \ --name=oms-influxdb \ influxdb:1.8To enable authentication for the InfluxDB service, create an account and set the password.
Go to the InfluxDB container.
docker exec -it ${INFLUXDB_NAME} bashGo to the InfluxDB console.
cd /usr/bin ./influxCreate an account, set the password, and grant the admin permissions to the account.
create user "${USER_NAME}" with password '${PASSWORD}' with all privilegesNotice
You must first create the admin user in InfluxDB before you enable authentication.
Save the account and password for the configuration of the
config.yamlfile.
Log on to InfuxDB again and run the following command:
show users;To view the database, log on to InfluxDB again and then run the
SHOW DATABASEScommand.
Exit the container where the TSDB resides.