This topic describes the configuration files in OceanBase Deployer (OBD) and the parameters in the configuration files.
Terms
OBD
OBD is a tool for installing and deploying OceanBase clusters. For more information, see OBD Documentation.
ODP
OceanBase Database Proxy (ODP, also known as OBProxy) is a high-performance reverse proxy server for OceanBase Database. For more information, see ODP Documentation.
OBAgent
OceanBase Agent (OBAgent) is a data monitoring and collection framework for OceanBase Database. The framework supports both pushing and pulling modes for data collection in different scenarios.
OCP Express
OceanBase Cloud Platform (OCP) Express is a web-based management tool for OceanBase Database V4.x. Integrated with an OceanBase cluster, OCP Express allows you to view key performance metrics of the cluster and perform basic database management operations on the cluster. For more information, see OCP Express.
Config Server
Config Server allows you to register, store, and query the metadata of OceanBase Database. For more information, see ob-configserver.
Grafana
Grafana is an open-source data visualization tool that visualizes various metrics from data sources, allowing for a more intuitive understanding of system operation status and performance. For more information, visit the official website of Grafana.
Prometheus
Prometheus is an open-source service monitoring system and time-series database. It provides a general data model and fast data collection, storage, and querying APIs. For more information, visit the official website of Prometheus.
Sample configuration files
OBD provides sample configuration files required for deploying a cluster. You can modify them based on your server resources.
If OBD is directly downloaded and installed on your server, you can view the sample configuration files provided by OBD in the
/usr/obd/exampledirectory.If OBD is installed by decompressing the all-in-one package, you can view the sample configuration files provided by OBD in the
~/.oceanbase-all-in-one/obd/usr/obd/exampledirectory.You can also view the sample configuration files provided by OBD at GitHub.
Note
Configuration files are divided into two modes: small-scale development mode and professional development mode. The parameters in the configuration files of the two modes are basically the same, but the configuration specifications are slightly different. You can choose a mode based on your resources.
Small-scale development mode: suitable for personal devices (with a minimum of 8 GB memory). The configuration file name contains
miniormin.Professional development mode: suitable for high-configuration Elastic Compute Service (ECS) instances or physical servers (with available resources not lower than 16 CPU cores and 64 GB).
The following table describes several commonly used configuration files when deploying OceanBase Database.
| Configuration file | Description | Component |
|---|---|---|
mini-local-example.yaml/local-example.yaml |
Sample configuration files for the local standalone deployment of OceanBase Database. You can deploy OceanBase Database on a single local server without configuring user information. | OceanBase Database |
mini-single-example.yaml/single-example.yaml |
Sample configuration files for the standalone deployment of OceanBase Database. You can deploy OceanBase Database on any server by configuring user information. | OceanBase Database |
mini-single-with-obproxy-example.yaml/single-with-obproxy-example.yaml |
Sample configuration files for OceanBase Database standalone deployment and ODP. | OceanBase Database and ODP |
mini-distributed-example.yaml/distributed-example.yaml |
Sample configuration files for the distributed deployment of OceanBase Database. | OceanBase Database |
mini-distributed-with-obproxy-example.yaml/distributed-with-obproxy-example.yaml |
Sample configuration files for OceanBase Database distributed deployment and ODP. | OceanBase Database and ODP |
default-components-min.yaml/default-components.yaml |
Sample configuration files for OceanBase Database distributed deployment, ODP, and OCP Express. | OceanBase Database, ODP, OBAgent, and OCP Express |
all-components-min.yaml/all-components.yaml |
Sample configuration files for OceanBase Database distributed deployment and all other components. | OceanBase Database, ODP, OBAgent, OCP Express, Prometheus, and Grafana |
Note
If you plan to deploy OCP Express, you do not need to deploy Prometheus or Grafana.
In addition to the preceding sample configuration files, the example directory contains different folders that store various sample configuration files to accommodate different scenarios. Here are the details:
autodeploy: The sample configuration files in this folder are intended for the obd cluster autodeploy command. You only need to modify the IP address and directory in the sample configuration files, and OBD will automatically generate a complete configuration of the maximum specification based on the resources on the target server and deploy the cluster.
grafana: The sample configuration files in this folder are intended for deploying Grafana. You can use these sample configuration files to deploy Grafana separately or deploy Grafana and Prometheus together.
obagent: The sample configuration files in this folder are intended for deploying OBAgent. You can choose the corresponding sample configuration file based on the desired version of OBAgent to deploy it.
obproxy: The sample configuration files in this folder are intended for deploying ODP. You can use these sample configuration files to deploy ODP separately or deploy OceanBase Database and ODP together.
oceanbase-3.x: The sample configuration files in this folder are intended for adapting to OceanBase Database V3.x.
ocp-express: The sample configuration files in this folder are intended for deploying OCP Express. You can use these sample configuration files to deploy OCP Express separately.
prometheus: The sample configuration files in this folder are intended for deploying Prometheus. You can use these sample configuration files to deploy Prometheus separately or deploy OceanBase Database, OBAgent, and Prometheus together.
Configuration file format
The configuration files in OBD have a fixed format. The following explains the meaning of different sections in a configuration file:
# Configure the following parameters for remote logon only.
# user: # SSH logon configuration.
# username: The username.
# password: Optional. The password.
# key_file: Optional. The SSH key file path.
# port: The SSH port. Default value: 22.
# timeout: The SSH connection timeout period in seconds. Default value: 30.
oceanbase-ce: # The name of the component to deploy. The following are configurations of this component.
servers: # The node list.
- name: server1 # This parameter can be left empty. In this case, the node name is the same as the IP address. In this example, the node name is server1.
# Do not use the hostname. Only IP addresses are supported.
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
- name: server3
ip: 10.10.10.3
global: # The global configurations. You can write the identical configurations here.
# If a parameter has different values in the node configurations and global configurations, the value in the node configurations prevails.
devname: eth0
...
# Parameters are omitted here.
# In this example, multiple ob processes are supported on a single node, so different processes use different ports.
# If the cluster is deployed on multiple nodes, the port and path settings can be the same.
server1: # The node configurations. In this example, the configurations of the server1 node with the IP address 10.10.10.1 are written here. The node configurations have the highest priority.
mysql_port: 2881 # The external port for OceanBase Database. Default value: 2881.
rpc_port: 2882 # The internal port for OceanBase Database. Default value: 2882.
# Required. The working directory for OceanBase Database. OceanBase Database is started under this directory.
home_path: /home/admin/observer
zone: zone1
server2: # The node configurations. In this example, the configurations of the server2 node with the IP address 10.10.10.2 are written here.
mysql_port: 2881 # The external port for OceanBase Database. Default value: 2881.
rpc_port: 2882 # The internal port for OceanBase Database. Default value: 2882.
# Required. The working directory for OceanBase Database. OceanBase Database is started under this directory.
home_path: /home/admin/observer
zone: zone2
server3: # The node configurations. In this example, the configurations of the server3 node with the IP address 10.10.10.3 are written here.
mysql_port: 2881 # The external port for OceanBase Database. Default value: 2881.
rpc_port: 2882 # The internal port for OceanBase Database. Default value: 2882.
# Required. The working directory for OceanBase Database. OceanBase Database is started under this directory.
home_path: /home/admin/observer
zone: zone3
The following table describes the sections.
| Section | Description |
|---|---|
| user | User information is configured in this section. We recommend that you specify the admin user. Pay attention to the following parameters in this section:
Notice |
| oceanbase-ce | The name of the component to deploy. The contents in this section are the configurations of this component. |
| servers | Node information is configured in this section. Each server is specified in the format - name: server identifier (line break) ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address. |
| global | Global configurations are written in this section. If a parameter has different values in the node configurations and global configurations, the value in the node configurations prevails. |
| server1 | Node configurations are written in this section. The server1 node with the IP address 10.10.10.1 is used as an example here. You need to change the node name to the value specified by the name parameter in the servers section.
Note |
Parameters
This section describes the parameters of different components in configuration files.
This section uses the oceanbase-ce component in the distributed-with-obproxy-example.yaml configuration file in the example directory as an example to describe the key parameters for deploying OceanBase Database. For more information about how to deploy OceanBase Database by using a configuration file, see Deploy OceanBase Database on a single OBServer node.
oceanbase-ce:
# version: 4.2.0.0
# package_hash: 1cbd1fde8c6d7695015265da09738478c97e0e2f908fca6745dc9cc531860e74
# tag: dev
servers:
- name: server1
# Do not use the hostname. Only IP addresses are supported.
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
- name: server3
ip: 10.10.10.3
global:
# Set devname as the name of the network adapter whose IP address is the same as the one specified for the servers parameter.
# If the IP address specified for the servers parameter is "127.0.0.1", set devname as "lo".
# If the current IP address is 192.168.1.10, and the name of the network adapter with this IP address is "eth0", set devname as "eth0".
devname: eth0
# if current hardware's memory capacity is smaller than 50G, please use the setting of "mini-single-example.yaml" and do a small adjustment.
memory_limit: 64G # The maximum running memory for an observer
# The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
system_memory: 30G
datafile_size: 192G # Size of the data file.
datafile_next: 200G # the auto extend step. Please enter an capacity, such as 2G
datafile_maxsize: 1T # the auto extend max size. Please enter an capacity, such as 20G
log_disk_size: 192G # The size of disk space used by the clog files.
enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.
max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.
# observer cluster name, consistent with obproxy's cluster_name
appname: obcluster
root_password: ****** # root user password
proxyro_password: ****** # proxyro user password, consistent with obproxy's observer_sys_password, can be empty
# In this example , support multiple ob process in single node, so different process use different ports.
# If the cluster is deployed on multiple nodes, the port and path settings can be the same.
server1:
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
# The directory for data storage. The default value is $home_path/store.
# data_dir: /data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
# redo_dir: /redo
zone: zone1
server2:
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
# Required. The working directory for OceanBase Database. OceanBase Database is started under this directory.
home_path: /home/admin/observer
# The directory for data storage. The default value is $home_path/store.
# data_dir: /data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
# redo_dir: /redo
zone: zone2
server3:
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
# Required. The working directory for OceanBase Database. OceanBase Database is started under this directory.
home_path: /home/admin/observer
# The directory for data storage. The default value is $home_path/store.
# data_dir: /data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
# redo_dir: /redo
zone: zone3
The following table describes the key parameters. For more information about the parameters, see plugins/oceanbase/4.2.0.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| version | No | Latest version | The version of the component to deploy. Generally, you do not need to specify this parameter. The latest version is deployed by default. |
| package_hash | No | Latest version | The software package HASH value of the component to deploy. Generally, you do not need to specify this parameter. The latest version is deployed by default. |
| tag | No | None | The tag of the component to deploy. Generally, you do not need to specify this parameter. If you have set a tag for the OceanBase Database installation package that you compiled earlier, you can use the tag to specify the installation package. |
| servers | Yes | None | Specify each server in the format of - name: server identifier (line break) ip: server IP address. The server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address. |
| devname | No | None | The network interface controller (NIC) corresponding to the server IP addresses specified in servers. You can view the mappings between IP addresses and NICs by running the ip addr command. |
| memory_limit | No | 0 | The maximum memory that the observer process can obtain from the environment. If this parameter is not configured, the memory_limit_percentage parameter takes effect. For more information about the two parameters, see memory_limit and memory_limit_percentage. |
| system_memory | No | 0M | The reserved system memory, which is a part of memory_limit. If this parameter is not specified, OceanBase Database reserves memory for the system in adaptive mode. |
| datafile_size | No | 0 | The size of the data file block_file on the corresponding OBServer node. If this parameter is not specified, the datafile_disk_percentage parameter takes effect. For more information, see datafile_size and datafile_disk_percentage. |
| datafile_next | No | 0 | The automatic scale-out step of disk space. If this parameter is not configured and you want to enable automatic scale-out, see Configure automatic scale-out of disk space for data files. |
| datafile_maxsize | No | 0 | The maximum disk space allowed for automatic scale-out. If this parameter is not configured and you want to enable automatic scale-out, see Configure automatic scale-out of disk space for data files. |
| log_disk_size | No | 0 | The size of disk space for redo logs. If this parameter is not configured, the log_disk_percentage parameter takes effect. For more information, see log_disk_size and log_disk_percentage. |
| enable_syslog_wf | No | true | Specifies whether to print system logs above the WARN level to a separate log file. |
| enable_syslog_recycle | No | false | Specifies whether log files generated before the restart will be recycled after the restart. If you set this parameter to false, the log files generated before the restart are beyond the scope of the log files that may be recycled after the restart. |
| max_syslog_file_count | No | 0 | The maximum number of system log files that can be retained. 0 indicates to disable automatic recycling. |
| appname | No |
|
The name of the OceanBase cluster. |
| mysql_port | Yes | 2881 | The SQL port number. |
| rpc_port | Yes | 2882 | The Remote Procedure Call (RPC) port number, which is used for communication between the observer process and other node processes. |
| home_path | Yes | None | The installation path of OceanBase Database. |
| data_dir | No | $home_path/store | The directory for storing SSTables and other data. We recommend that you use a separate disk.
Note |
| redo_dir | No | Same as data_dir |
In OceanBase Database V3.x, the value of this parameter is the directory of clogs, ilogs, or slogs. In OceanBase Database V4.x, the value of this parameter is the directory of clogs. By default, the value of this parameter is the same as that of data_dir. We recommend that you use a separate disk. |
| root_password | No |
|
The password of the super administrator (root@sys) of the OceanBase cluster. We recommend that you set a complex password. If you do not specify this parameter in OBD V2.1.0 or later, a random string is automatically generated. |
| proxyro_password | No |
|
The password of the account for connecting the OceanBase cluster (proxyro@sys) through ODP. If you do not specify this parameter in OBD V2.1.0 or later, a random string is automatically generated. |
| zone | Yes | zone1 | The name of the zone to which the OBServer node belongs. |
This section uses the obproxy-only-example.yaml configuration file in the example/obproxy directory as an example to describe the key parameters for deploying ODP.
obproxy-ce:
servers:
- 10.10.10.4
global:
listen_port: 2883 # External port. The default value is 2883.
prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
home_path: /home/admin/obproxy
# The OceanBase root server list
# format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
rs_list: 10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881
# obproxy_config_server_url: http://10.10.10.1:9999/services?Action=GetObProxyConfig
enable_cluster_checkout: false
# observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
cluster_name: obcluster
skip_proxy_sys_private_check: true
enable_strict_kernel_release: false
obproxy_sys_password: ***** # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
observer_sys_password: ***** # proxyro user password, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
The following table describes the key parameters. For more information about the parameters, see plugins/obproxy/3.1.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | Specify each server in the format of - name: server identifier (line break) ip: server IP address. The server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address. |
| listen_port | Yes | 2883 | The listening port of ODP. |
| prometheus_listen_port | Yes | 2884 | The listening port of Prometheus. |
| home_path | Yes | None | The installation path of ODP. |
| rs_list | No | None | The OBServer node list of the OceanBase cluster, in the ip:mysql_port;ip:mysql_port format. If ODP is configured by using the RootService list, ODP can serve as a proxy only for the configured cluster.
NoticeYou need to only configure either |
| obproxy_config_server_url | No | None | The URL of Config Server. After this parameter is specified, ODP can serve as a proxy for all clusters registered with Config Server. If Config Server is not deployed, you can also specify the rs_list parameter. |
| enable_cluster_checkout | No | true | Specifies whether to verify the cluster name. If you set the value to true, ODP sends the cluster name to the OBServer node for verification during logon. |
| cluster_name | No | None | The name of the OceanBase cluster for which ODP can serve as a proxy. If a dependency exists, OBD obtains this value from the oceanbase-ce dependency. |
| enable_strict_kernel_release | Yes | false | Specifies whether to verify the kernel of the operating system. If you set the value to true, ODP supports only RedHat 5u, 6u, and 7u. If you set the value to false, the Linux kernel version is not verified. In this case, ODP may be unstable. |
| obproxy_sys_password | No |
|
The password of the ODP administrator account (root@proxysys). If you do not specify this parameter in OBD V2.1.0 or later, a random string is automatically generated. |
| observer_sys_password | No | The default value is the same as that of proxyro_password if the OceanBase Database dependency is configured. If the OceanBase Database dependency is not configured, the default value varies based on the OBD version.
|
The password of the account (proxyro@sys) used by ODP to connect to the OceanBase cluster. This password must be the same as the value of proxyro_password configured in OceanBase Database. |
This section uses the obagent-only-example.yaml configuration file in the example/obagent directory as an example to describe the key parameters for deploying OBAgent.
obagent:
servers:
- name: server1
# Do not use the hostname. Only IP addresses are supported.
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
- name: server3
ip: 10.10.10.3
global:
# The working directory for obagent. obagent is started under this directory. This is a required field.
home_path: /home/admin/obagent
# The port of monitor agent. The default port number is 8088.
monagent_http_port: 8088
# The port of manager agent. The default port number is 8089.
mgragent_http_port: 8089
# The log path. The default value is log/monagent.log.
log_path: log/monagent.log
# The log level of manager agent.
mgragent_log_level: info
# The total size of manager agent.Log size is measured in Megabytes. The default value is 30M.
mgragent_log_max_size: 30
# Expiration time for manager agent logs. The default value is 30 days.
mgragent_log_max_days: 30
# The maximum number for manager agent log files. The default value is 15.
mgragent_log_max_backups: 15
# The log level of monitor agent.
monagent_log_level: info
# The total size of monitor agent.Log size is measured in Megabytes. The default value is 200M.
monagent_log_max_size: 200
# Expiration time for monitor agent logs. The default value is 30 days.
monagent_log_max_days: 30
# The maximum number for monitor agent log files. The default value is 15.
monagent_log_max_backups: 15
# The username for HTTP authentication. The default value is admin.
http_basic_auth_user: admin
# Password for HTTP authentication.
http_basic_auth_password: ******
# Monitor password for OceanBase Database. The default value is empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the ocp_agent_monitor_password in oceanbase-ce.
monitor_password:
# The SQL port for observer. The default value is 2881. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the mysql_port in oceanbase-ce.
sql_port: 2881
# The RPC port for observer. The default value is 2882. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the rpc_port in oceanbase-ce.
rpc_port: 2882
# Cluster name for OceanBase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the appname in oceanbase-ce.
cluster_name: obcluster
# Cluster ID for OceanBase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the cluster_id in oceanbase-ce.
cluster_id: 1
# The redo dir for Oceanbase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the redo_dir in oceanbase-ce.
ob_log_path: /home/admin/observer/store
# The data dir for Oceanbase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the data_dir in oceanbase-ce.
ob_data_path: /home/admin/observer/store
# The work directory for Oceanbase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the home_path in oceanbase-ce.
ob_install_path: /home/admin/observer
# The log path for Oceanbase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the {home_path}/log in oceanbase-ce.
observer_log_path: /home/admin/observer/log
# Monitor status for OceanBase Database. Active is to enable. Inactive is to disable. The default value is active. When you deploy a cluster automatically, OBD decides whether to enable this parameter based on depends.
ob_monitor_status: active
server1:
# Zone name for your observer. The default value is zone1. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the zone name in oceanbase-ce.
zone_name: zone1
server2:
# Zone name for your observer. The default value is zone1. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the zone name in oceanbase-ce.
zone_name: zone2
server3:
# Zone name for your observer. The default value is zone1. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the zone name in oceanbase-ce.
zone_name: zone3
The following table describes the key parameters. For more information about the parameters, see plugins/obagent/1.3.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | Specify each server in the format of - name: server identifier (line break) ip: server IP address. The server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address.
Notice |
| home_path | Yes | None | The working directory of OBAgent. |
| monagent_http_port | Yes | 8088 | The port for the monitoring service of OBAgent. |
| mgragent_http_port | Yes | 8089 | The port for the management service of OBAgent. |
| log_path | Yes | log/monagent.log | The log path. |
| mgragent_log_level | No | None | The log level for the management service of OBAgent. |
| mgragent_log_max_size | No | 30 | The log file size for the management service of OBAgent, in MB. |
| mgragent_log_max_days | No | 30 | The maximum number of days for retaining log files of the management service of OBAgent. |
| mgragent_log_max_backups | No | 15 | The maximum number of backups for log files of the management service of OBAgent. |
| monagent_log_level | No | info | The log level for the monitoring service of OBAgent. |
| monagent_log_max_size | No | 200 | The log file size for the monitoring service of OBAgent, in MB. |
| monagent_log_max_days | No | 30 | The maximum number of days for retaining log files of the monitoring service of OBAgent. |
| monagent_log_max_backups | No | 15 | The maximum number of backups for log files of the monitoring service of OBAgent. |
| http_basic_auth_user | Yes | admin | The username for HTTP service authentication. |
| http_basic_auth_password | Yes | root | The password for HTTP service authentication. |
| monitor_password | No | Empty | The password for collecting monitoring data of OceanBase Database. The value must be the same as that of the ocp_agent_monitor_password parameter in OceanBase Database. |
| sql_port | No | 2881 | The SQL port of the OBServer node. The value must be the same as that of the mysql_port parameter in OceanBase Database. |
| rpc_port | No | 2882 | The RPC port of the OBServer node. The value must be the same as that of the rpc_port parameter in OceanBase Database. |
| cluster_name | No | obcluster | The name of the OceanBase cluster. The value must be the same as that of the appname parameter in the oceanbase-ce component. |
| cluster_id | No | 1 | The ID of the OceanBase cluster. The value must be the same as that of the cluster_id parameter in the oceanbase-ce component. |
| ob_log_path | No | None | The log disk path of the OBServer node. The value must be the same as that of the redo_dir parameter in the oceanbase-ce component. |
| ob_data_path | No | None | The data disk path of the OBServer node. The value must be the same as that of the data_dir parameter in the oceanbase-ce component. |
| ob_install_path | No | None | The installation directory of the OBServer node. The value must be the same as that of the home_path parameter in the oceanbase-ce component. |
| observer_log_path | No | None | The log path in the installation directory of the OBServer node. The value must be the same as that of the {home_path}/log parameter in the oceanbase-ce component. |
| ob_monitor_status | Yes | active | The metric collection status of OceanBase Database. The value active indicates that metric collection is enabled. The value inactive indicates that metric collection is disabled. |
| zone_name | No | zone1 | The name of the zone to which the OBServer node belongs. |
This section uses the ocp-express-only.yaml configuration file in the example/ocp-express directory as an example to describe the key parameters for deploying OCP Express. For more information about how to deploy OCP Express by using a configuration file, see Deploy OCP Express by using commands.
ocp-express:
servers:
- name: server1
ip: 10.10.10.1
global:
# The working directory for ocp express. ocp express is started under this directory. This is a required field.
home_path: /home/admin/ocp-express
log_dir: /home/admin/ocp-express/log # The log directory of ocp express server. The default value is {home_path}/log.
memory_size: 1G # The memory size of ocp-express server. The recommend value is 512MB + (expect node num + expect tenant num) * 60MB.
jdbc_url: jdbc:oceanbase://IP:PORT/meta_db # jdbc connection string to connect to the meta db
jdbc_username: user_name@tenant_name # username to connect to meta db
jdbc_password: '<meta db password>' # password to connect to meta db
port: 8180 # The http port to use.
cluster_name: obcluster # the cluster name of oceanbase cluster. Refer to the configuration item appname of oceanbase
ob_cluster_id: 1 # the cluster id of oceanbase cluster. Refer to the configuration item cluster_id of oceanbase
root_sys_password: <password for root@sys> # the pass of oceanbase cluster. Refer to the configuration item cluster_id of oceanbase
agent_username: <obagent> # The username of obagent
agent_password: <password> # The password of obagent
logging_file_total_size_cap: 10GB # The total log file size of ocp-express server.
# logging_file_max_history: 1 # The maximum of retention days the log archive log files to keep. The default value is unlimited
server_addresses: # The cluster info for oceanbase cluster
- address: 127.0.0.1 # The address of oceanbase server
svrPort: 2882 # The rpc port of oceanbase server
sqlPort: 2881 # The mysql port of oceanbase server
withRootServer: true # Is the oceanbase server a root server of cluster.
agentMgrPort: 8089 # The port of obagent manager process
agentMonPort: 8088 # The port of obagent monitor process
The following table describes the key parameters. For more information about the parameters, see plugins/ocp-express/4.1.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | Specify each server in the format of - name: server identifier (line break) ip: server IP address. The server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address. |
| home_path | Yes | None | The working directory of OCP Express. |
| log_dir | No | {home_path}/log | The log directory of OCP Express. The default value is the log directory in the path specified by the home_path parameter. |
| memory_size | Yes | None | The memory capacity of the OCP Express server. The recommended value is calculated as follows: memory_size = 512 MB + (Expected number of nodes × Expected number of tenants) × 60 MB. The sys tenant and OCP meta tenant must be included in this formula. |
| jdbc_url | No | None | The Java Database Connectivity (JDBC) connection string for connecting to the meta tenant. Make sure that the database specified in the connection string has been created. If OCP Express is deployed separately, this parameter is required. |
| jdbc_username | No | None | The name of the user for connecting to the meta tenant. Make sure that this user has been created. If OCP Express is deployed separately, this parameter is required.
Note: |
| jdbc_password | Yes | The password of the user for connecting to the meta tenant. | |
| port | Yes | 8180 | The HTTP port for accessing OCP Express. |
| cluster_name | No | obcluster | The name of the OceanBase cluster, which must be the same as the value of the appname parameter in the oceanbase-ce component. If OCP Express is deployed separately, this parameter is required. |
| ob_cluster_id | No | None | The ID of the OceanBase cluster, which must be the same as the value of the cluster_id parameter in the oceanbase-ce component. If OCP Express is deployed separately, this parameter is required. |
| root_sys_password | No | None | The password of the root@sys user in the OceanBase cluster. If OCP Express is deployed separately, this parameter is required. |
| agent_username | Yes | None | The username of OBAgent. |
| agent_password | Yes | None | The password of OBAgent. |
| logging_file_total_size_cap | Yes | 1 GB | The total size of log files. The default value is 1 GB.
Notice: |
| server_addresses->address | Yes | None | The IP address of the OBServer node. |
| server_addresses->svrPort | Yes | None | The RPC port of the OBServer node, which must be the same as the value of the rpc_port parameter of the corresponding node in the oceanbase-ce component. |
| server_addresses->sqlPort | Yes | None | The MySQL port of the OBServer node, which must be the same as the value of the mysql_port parameter of the corresponding node in the oceanbase-ce component. |
| server_addresses->agentMgrPort | Yes | None | The port for the management process of OBAgent, which must be modified based on the actual settings in OBAgent. |
| server_addresses->agentMonPort | Yes | None | The port for the monitoring process of OBAgent, which must be modified based on the actual settings in OBAgent. |
This section uses the prometheus-only-example.yaml configuration file in the example/prometheus directory as an example to describe the key parameters for deploying Prometheus. For more information about how to configure Prometheus by using a configuration file, see Add GUI-based monitoring for an existing cluster.
prometheus:
servers:
- 10.10.10.4
global:
# The working directory for prometheus. prometheus is started under this directory. This is a required field.
home_path: /home/admin/prometheus
address: 0.0.0.0 # The ip address to bind to. Along with port, corresponds to the `web.listen-address` parameter.
port: 9090 # The http port to use. Along with address, corresponds to the `web.listen-address` parameter.
enable_lifecycle: true # Enable shutdown and reload via HTTP request. Corresponds to the `web.enable-lifecycle` parameter.
data_dir: /home/admin/prometheus/data # Base path for metrics storage. Corresponds to the `storage.tsdb.path` parameter.
# basic_auth_users: # Usernames and passwords that have full access to the web server via basic authentication. Corresponds to the `basic_auth_users` parameter.
# <username>: <password> # The format of `basic_auth_users` : the key is the user name and the value is the password.
# web_config: # Content of Prometheus web service config file. The format is consistent with the file. However, `basic_auth_users` cannot be set in it. Please set `basic_auth_users` above if needed. Corresponds to the `web.config.file` parameter.
# tls_server_config:
# # Certificate and key files for server to use to authenticate to client.
# cert_file: <filename>
# key_file: <filename>
config: # Configuration of the Prometheus service. The format is consistent with the Prometheus config file. Corresponds to the `config.file` parameter.
rule_files:
- rules/*rules.yaml
scrape_configs:
- job_name: prometheus
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- job_name: node
basic_auth:
username: ********
password: ********
metrics_path: /metrics/node/host
scheme: http
file_sd_configs: # Set the targets to be collected by reading local files. The example is to collect targets corresponding to all yaml files in the 'targets' directory under $home_path.
- files:
- 'targets/*.yaml'
- job_name: ob_basic
basic_auth:
username: ********
password: ********
metrics_path: /metrics/ob/basic
scheme: http
file_sd_configs:
- files:
- 'targets/*.yaml'
- job_name: ob_extra
basic_auth:
username: ********
password: ********
metrics_path: /metrics/ob/extra
scheme: http
file_sd_configs:
- files:
- 'targets/*.yaml'
- job_name: agent
basic_auth:
username: **********
password: ********
metrics_path: /metrics/stat
scheme: http
file_sd_configs:
- files:
- 'targets/*.yaml'
# additional_parameters: # Additional parameters for Prometheus service, among which `web.listen-address`, `web.enable-lifecycle`, `storage.tsdb.path`, `config.file` and `web.config.file` cannot be set. Please set them in the corresponding configuration above if needed.
# - log.level: debug
The following table describes the key parameters. For more information about the parameters, see plugins/prometheus/2.37.1/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | Specify each server in the format of - name: server identifier (line break) ip: server IP address. The server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address. |
| home_path | Yes | None | The working directory of Prometheus. |
| address | Yes | 0.0.0.0 | The listening address of Prometheus. |
| port | Yes | 9090 | The listening port of Prometheus. |
| enable_lifecycle | Yes | true | Specifies whether to enable the feature of disabling and reloading by using HTTP requests. |
| data_dir | No | None | The data directory. |
| basic_auth_users | No | None | The web service authentication information of Prometheus. The key is the username and the value is the password. |
| web_config | No | None | The web service configurations of Prometheus. You can specify the certificate and key files used by the server to authenticate the client. |
| config | No | None | The configurations of Prometheus, in the same format as the Prometheus configuration file. The value corresponds to the config.file parameter. |
| additional_parameters | No | None | The startup parameters of Prometheus. |
This section uses the grafana-only-example.yaml configuration file in the example/grafana directory as an example to describe the key parameters for deploying Grafana. For more information about how to deploy Grafana by using a configuration file, see Add GUI-based monitoring for an existing cluster.
grafana:
servers:
- 10.10.10.4
global:
home_path: /home/admin/grafana
login_password: ******** # Grafana login password.
data_dir: # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used).$data_dir can be empty. The default value is $home_path/data.
logs_dir: # Directory where grafana can store logs, can be empty. The default value is $data_dir/log.
plugins_dir: # Directory where grafana will automatically scan and look for plugins, can be empty. The default value is $data_dir/plugins.
provisioning_dir: # folder that contains provisioning config files that grafana will apply on startup and while running, can be empty. The default value is $home_path/conf/provisioning.
temp_data_lifetime: 24h # How long temporary images in data directory should be kept. Supported modifiers h (hours), m (minutes), Use 0 to never clean up temporary files, can be empty. The default value is 24h.
log_max_days: 7 # Expired days of log file(delete after max days), can be empty. The default value is 7.
# domain: # The public facing domain name used to access grafana from a browser, can be empty. The default value is $server.ip.
# port: # The http port to use, can be empty. The default value is 3000.
# # list of datasources to insert/update depending on what's available in the database, can be empty.
# # For more parameter settings, please refer to https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources
# datasources:
# name: # name of the datasource. Required and should not be 'OB-Prometheus'
# type: # datasource type. Required
# access: # access mode. direct or proxy. Required
# url: # the url of datasource
# list of dashboards providers that load dashboards into Grafana from the local filesystem, can be empty.
# For more information, please refer to https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
# providers:
# name: # an unique provider name. Required and should not be 'OceanBase Metrics'
# type: # provider type. Default to 'file'
# options:
# path: # path to dashboard files on disk. Required when using the 'file' type
# # customize your Grafana instance by adding/modifying the custom configuration as follows
# # for more information, please refer to https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#configure-grafana
# # Here, setting parameters is required for format conversion.
# # For example, if the original grafana configuration format is
# #
# # [section1.section2]
# # key1 = value1
# # key2 = value2
# #
# # Then when writing the configuration below, you need to write it as
# #
# # section1:
# # section2:
# # key1: value1
# # key2: value2
# #
# # Here we only list one item, because there are more than 500 items. Please add them according to your own needs.
# customize_config:
# # original grafana configuration format is
# # [server]
# # protocol = http
# server:
# protocol: http
The following table describes the key parameters. For more information about the parameters, see plugins/grafana/7.5.17/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | Specify each server in the format of - name: server identifier (line break) ip: server IP address. The server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the - <ip> (line break)- <ip> format. In this case, - <ip> is equivalent to - name: server identifier (line break) ip: server IP address. |
| home_path | Yes | None | The working directory of Grafana. |
| login_password | Yes |
|
The password for logging on to Grafana. |
| data_dir | No | $home_path/data | The directory where Grafana stores sqlite3 data, temporary files, and session files. |
| logs_dir | No | $data_dir/log | The directory where Grafana stores logs. |
| plugins_dir | No | $data_dir/plugins | The directory that Grafana automatically scans to search for plug-ins. |
| provisioning_dir | No | $home_path/conf/provisioning | The path to the configuration files that are applied when Grafana is started and running. |
| temp_data_lifetime | No | 24h | The retention period for temporary images in the data directory of Grafana. Supported units are h (hours) and m (minutes). The value 0 indicates that temporary files are not cleaned up. |
| log_max_days | No | 7 | The maximum retention period for log files. Expired log files are deleted. |