If you need OceanBase Migration Service (OMS) to collect and display historical monitoring data, deploy a time-series database. This topic describes how to deploy a time-series database and the limits.
Limits
A time-series database can be deployed in OMS V2.1.0 and later. Currently, InfluxDB 1.8 is deployed as a time-series database.
You need to use port 8086 to deploy a time-series database.
A time series database supports only one-node deployment and does not support high availability. You need to deploy only one TiDB. The time-series database supports only the single-node deployment mode and does not provide high availability. You can deploy the time-series database and OMS on the same host. When the service fails, monitoring data becomes unavailable.
Procedure
Log on to the host where the time-series database 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.
Access the InfluxDB container.
docker exec -it ${INFLUXDB_NAME} bashAccess the InfluxDB console.
cd /usr/bin ./influxCreate an account, set the password, and grant the admin privileges to the account.
Notice:
You must first create the admin user in InfluxDB before you enable authentication.
Save the account and password for configuration of the
config.yamlfile.
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.
Run the
authcommand.Run the
show userscommand.To view the database, run the
show databasescommand.
Exit the container where the TSDB resides.