Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:44:54 +08:00
commit eb309b7b59
133 changed files with 21979 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
---
slug: /obshell-overview
---
# Overview
OceanBase Shell (obshell) is a local database command-line tool provided by OceanBase for administrators and developers. It is a no-installation, out-of-the-box tool. obshell supports cluster and standalone (seekdb) operations, enabling unified management of different ecosystem products for the same database. This simplifies integration with third-party tools and reduces the complexity and cost of managing OceanBase databases.
obshell does not require additional installation. By default, after you install OceanBase seekdb through any method, you can find the obshell executable file in the `usr/bin` directory of the installation directory.

View File

@@ -0,0 +1,151 @@
---
slug: /error
---
# Error codes
This topic describes error messages that may occur during obshell usage and provides solutions.
The error codes of obshell use strings with literal meanings to facilitate user understanding. When an operation fails, you can view the corresponding error code in the <code>obshell.log</code> log file and then refer to the <b>Solution</b> section in the following table for troubleshooting.
:::info
If an error occurs while using obshell Dashboard, you can also view the HTTP response result by using the browser developer tools to obtain the error code (<code>errCode</code>).
:::
| Error code | Error message | Description | Solution |
| --- | --- | --- | --- |
| Agent.AlreadyInitialized | Agent already initialized | The obshell node has already been initialized | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Current.UnderMaintenance | Agent is under maintenance | The current obshell node is under maintenance | Wait for the maintenance task to finish, or use task commands/APIs to roll back, retry, or skip the failed maintenance task. |
| Agent.Daemon.StartFailed | Daemon start failed | Failed to start the daemon process | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Daemon.ServeOnUnixSocketFailed | Daemon serve on socket listener failed | The daemon process failed to serve on the socket listener | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Identify.NotSupportOperation | '%s' is '%s', instead of '%s', does not support this operation | The current node identity does not support this operation | Please check the node identity and try again. |
| Agent.Identify.Unknown | Unknown agent identity: %s | The identity of the obshell node is unknown | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Info.NotEqual | Agent info not equal, input is %v, meta is %v | The obshell node information does not match | Please check the obshell node information. |
| Agent.IP.InconsistentWithOBServer | Agent IP inconsistent with observer | The obshell node IP does not match the seekdb node IP | Please check the IP configuration. |
| Agent.Load.OBConfigFailed | Load ob config from config file failed | Failed to load seekdb configuration from the config file | Please check the configuration file. |
| Agent.NotInitialized | Agent not initialized | The obshell node has not been initialized | Please initialize the corresponding obshell node first. |
| Agent.OBVersionNotSupported | Unsupported ob version '%s', the minimum supported version is '%s' | The current OceanBase seekdb version is not supported | Please use a supported OceanBase seekdb version. |
| Agent.OceanBase.DB.NotOcs | The current database is not ocs | The current database is not OCS | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.OceanBase.NotHold | Agent is not holding OceanBase seekdb | The obshell node does not have an OceanBase seekdb connection | Please restart the obshell node and try again. |
| Agent.Oceanbase.Password.LoadFailed | Check password of root in sqlite failed | Failed to check the root password in SQLite | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.OceanBase.Useless | The current database is useless | The current OceanBase seekdb is unavailable | Please check whether OceanBase seekdb is available. |
| Agent.Package.NotFound | Package %v is not found | The installation package could not be found | Please check the installation package and try again. |
| Agent.Rebuild.PortNotSame | Agent port is not the same, agent port in all_agents: %d, agent port now: %d | The obshell node ports are inconsistent | Rebuild obshell using the same port. |
| Agent.Rebuild.VersionNotSame | Agent version is not the same, agent version in all_agents: %s, agent version now: %s | obshell version inconsistency | Rebuild obshell using the same version. |
| Agent.Response.DataEmpty | Response data is empty | Response data is empty | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Response.DataFormatInvalid | Response data is not map | Response data format is invalid | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.RPC.RequestError | Request [%s]%s to %s error: %v | Error occurred when sending internal request between nodes | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.RPC.RequestFailed | Request [%s]%s to %s failed: %s | Failed to send internal request between nodes | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.ServeOnTcpSocketFailed | Serve on tcp listener failed | Failed to serve on TCP listener | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.ServeOnUnixSocketFailed | Serve on unix listener failed | Failed to serve on Unix listener | Please check system resources and permissions. |
| Agent.Sqlite.DB.NotInit | The sqlite db is not initialized | SQLite database not initialized | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Start.ObserverFailed | Start observer via flag failed | Failed to start seekdb | Please check seekdb configuration. |
| Agent.Start.WithInvalidInfo | Agent start with invalid info: %v | obshell start information is invalid | Please check the startup parameters. |
| Agent.TakeOverFailed | Take over or rebuild failed | Takeover or rebuild failed | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.TCP.Listener.CreateFailed | Create tcp listerner failed | Failed to create TCP listener | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.UnderMaintenanceDag | %s is under maintenance by dag [%s:%s] | Current obshell node is under maintenance | Wait for the maintenance task to complete, or use task commands/APIs to rollback, retry, or skip the failed maintenance task. |
| Agent.UnderMaintenance | %s is under maintenance | Current obshell node is under maintenance | Wait for the maintenance task to complete, or use task commands/APIs to rollback, retry, or skip the failed maintenance task. |
| Agent.Unix.Socket.Listener.CreateFailed | Create unix socket listerner failed | Failed to create Unix socket listener | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Upgrade.KillOldServerTimeout | Wait obshell server killed timeout | Timeout while waiting for obshell server termination | Please contact the OceanBase technical support team for troubleshooting. |
| Agent.Upgrade.ToLowerVersion | Target version %s is not greater than current version %s. Please verify if the params have been filled out correctly | Upgrade target version is not higher than the current version | Please verify that the parameters are correctly filled in and provide a valid target version. |
| Agent.Version.Inconsistent | obshell version is not consistent between %s(%s) and %s(%s) | obshell version inconsistency | Please use obshell with consistent versions. |
| Cli.FlagRequired | Required flag(s) "%s" not set | Required command options not set | Please configure all required options. |
| Cli.NotFound | %s not found | Corresponding resource not found | Please check if the resource exists. |
| Cli.OperationCancelled | Operation cancelled | Operation cancelled | Please re-execute the operation as needed. |
| Cli.UnixSocket.RequestFailed | Request unix-socket [%s]%s failed: %v | Unix socket request failed | Please contact the OceanBase technical support team for troubleshooting. |
| Cli.Upgrade.NoValidTargetBuildVersionFound | No valid target build version in pkg_directory found by '%s' | No valid target build version found | Please check the installation packages in the directory or provide a specific version number. |
| Cli.Upgrade.PackageNotFoundInPath | No valid %s package found in %s | No valid installation package found | Please check the package location. |
| Cli.UsageError | Incorrect usage: %s | Command usage error | Please check the command syntax. You can use the `-h`/`--help` option for help information on the corresponding command. |
| Common.BadRequest | Bad request: %v | Invalid request | Please check the request parameters and try again. |
| Common.BindJsonFailed | Bind JSON failed: %v | Failed to bind JSON | Please check the JSON format and try again. |
| Common.DirNotEmpty | Dir '%s' is not empty | Directory is not empty | Please check the directory and try again. |
| Common.FileNotExist | File '%s' does not exist | File does not exist | Please check the file path and try again. |
| Common.FilePermissionDenied | No read/write permission for file '%s' | No read/write permission for the file | Please ensure you have read/write permissions for the file before retrying. |
| Common.IllegalArgument | Illegal argument | Invalid argument | Please check the arguments and try again. |
| Common.InvalidAddress | '%s' is not a valid address | Invalid address | Please check the address and try again. |
| Common.InvalidIp | '%s' is not a valid IP address | Invalid IP address | Please check the IP address and try again. |
| Common.InvalidPath | Path '%s' is not valid: %s | Invalid path format | Please check the path format and try again. |
| Common.InvalidPort | The port '%s' is invalid, must in (1024, 65535]. | Invalid port | Please check the port. Valid port range is (1024, 65535]. |
| Common.InvalidTimeDuration | Time duration '%s' is invalid: %s | Invalid time duration | Please check the time duration and try again. |
| Common.NotFound | Element not found: %v | API request not found | Please check if the URI is correct. |
| Common.PathNotDir | '%s' is not a directory | The configured path is not a directory | Please check the path and try again. |
| Common.PathNotExist | '%s' does not exist | Path does not exist | Please check the path and try again. |
| Common.Unauthorized | Unauthorized | Authentication failed | Please check permissions and try again. |
| Common.Unexpected | Unexpected error: %s | Unexpected error | Please contact the OceanBase technical support team for troubleshooting. |
| Environment.DiskSpaceNotEnough | The remaining disk space is insufficient, the remaining disk space is %d, and the required disk space is %d | Insufficient disk space | Please free up disk space and try again, or switch to another disk with sufficient space. |
| Gorm.NoRowAffected | %s: no row affected | This operation did not make any changes to the OceanBase database | Please contact the OceanBase technical support team for troubleshooting. |
| Log.FileNameExtensionMismatched | File name '%s' extension mismatched | File extension does not match | Please contact the OceanBase technical support team for troubleshooting. |
| Log.FileNamePrefixMismatched | File name '%s' prefix mismatched | File name prefix does not match | Please contact the OceanBase technical support team for troubleshooting. |
| Log.WriteExceedMaxSize | Write length %d exceeds maximum file size %d | Write length exceeds maximum file size | Please contact the OceanBase technical support team for troubleshooting. |
| MySQL.Error | Occur error when execute sql | Error occurred while executing SQL | Please contact the OceanBase technical support team for troubleshooting. |
| OB.Binary.Version.Unexpected | Unexpected observer binary version. | OceanBase database version is unexpected | Please contact the OceanBase technical support team for troubleshooting. |
| SeekDB.MinorFreezeTimeout | Minor freeze timeout | Minor Freeze timeout | Please contact the OceanBase technical support team for troubleshooting. |
| SeekDB.NotInitialized | seekdb has not been initialized, please initialize it first | seekdb has not been initialized | Please contact the OceanBase technical support team for troubleshooting. |
| SeekDB.Password.Incorrect | The seekdb root password is incorrect | The provided seekdb root user password is incorrect | Please check the password and try again. |
| SeekDB.UnderMaintenance | seekdb is under maintenance, please try again later | seekdb is under maintenance | Wait for the maintenance task to complete, or use task commands/APIs to rollback, retry, or skip the failed maintenance task. |
| SeekDB.UnderMaintenanceWithDag | seekdb is under maintenance by DAG: %s | seekdb is under maintenance | Wait for the maintenance task to complete, or use task commands/APIs to rollback, retry, or skip the failed maintenance task. |
| SeekDB.Database.NotExist | Database %s of tenant %s | The specified database does not exist in seekdb | Please configure an existing database and try again. |
| SeekDB.Compaction.Status.NotIdle | seekdb is in '%s' status, operation not allowed | seekdb is not in idle status | Please wait until it is idle before trying the operation again. |
| SeekDB.Process.CheckFailed | Check seekdb process exist: %s | Failed to check seekdb process | Please contact the OceanBase technical support team for troubleshooting. |
| SeekDB.Process.NotExist | seekdb process does not exist | seekdb process does not exist | Please start the seekdb process and try again. |
| SeekDB.Variable.Empty | Variable name or value is empty. | Variable name or value is empty | Please check the configured variable and try again. |
| SeekDB.Variable.Invalid | Variable '%s' is invalid: %s | Invalid variable | Please check the variable and try again. |
| SeekDB.Variable.Name.Empty | Variable name is empty | Variable name is empty | Please provide a valid variable name. |
| SeekDB.Variable.NotExist | Variable '%s' is not found | Variable does not exist | Please check whether the variable exists. |
| SeekDB.User.Name.Empty | User name is empty | User name cannot be empty | Please provide a valid user name. |
| SeekDB.Privilege.NotSupported | Unsupported privilege %s | Operation privilege not supported | Please configure the required privileges for the user. |
| Package.Compression.NotSupported | Unsupported compression '%s', the supported compression is 'xz' | Unsupported package compression format | The supported compression format is `xz`. Please visit [OceanBase Download Center](https://en.oceanbase.com/softwarecenter) to download the corresponding installation package and re-upload. |
| Package.Format.Invalid | Unsupported payload format '%s', the supported payload format is 'cpio' | Unsupported payload format | The supported payload format is `cpio`. Please visit [OceanBase Download Center](https://en.oceanbase.com/softwarecenter) to download the corresponding installation package and re-upload. |
| Package.NameMismatch | RPM package name %s not match %s | Package name mismatch | Please check the package name. |
| Package.ReleaseFormat.Invalid | Release format %s is illegal | Release format is invalid | Please visit [OceanBase Download Center](https://en.oceanbase.com/softwarecenter) to download the corresponding installation package and re-upload. |
| Package.ReleaseInvalid | RPM package release %s not match format | Package release version does not meet format requirements | Please check the package format requirements. |
| Request.Body.Decrypt.AES.ContentLength.Invalid | Decrypted string length is not a multiple of the block size | Decrypted string length is not a multiple of the block size | Please check the encrypted body in the HTTP request (using AES encryption). |
| Request.Body.Decrypt.AES.KeyAndIv.Invalid | AES key and iv size error | AES key and IV size error | Please provide a valid key and IV in the request header. |
| Request.Body.Decrypt.AES.NoKey | No key for aes | Missing AES key | Please contact the OceanBase technical support team for troubleshooting. |
| Request.Body.Decrypt.SM4.NoKey | No key for sm4 | Missing SM4 key | Please contact the OceanBase technical support team for troubleshooting. |
| Request.Body.ReadFailed | Failed to read request body: %s | Failed to read HTTP request body | Please contact the OceanBase technical support team for troubleshooting. |
| Request.File.Missing | File %s in the request is missing: %s | Missing file in request | Please check the requested file. |
| Request.Header.NotFound | X-OCS-Header not found in http request header. | X-OCS-Header not found in HTTP request header | Please set the correct X-OCS-Header in the HTTP request header to authenticate. |
| Request.Header.Type.Invalid | Header type error | Header type error | HTTP header type is invalid; please check the HTTP request header and try again. |
| Request.Method.NotSupport | %s method not support | Method not supported | Please contact the OceanBase technical support team for troubleshooting. |
| Request.Query.Param.Empty | Query param %s is empty | Query parameter is empty | Please provide the path parameter and try again. |
| Request.Query.Param.Illegal | Query param %s is illegal | Query parameter is invalid | Please provide a valid query parameter and try again. |
| Security.Authentication.Expired | Authentication expired | Authentication information has expired | Please update the authentication information and try again. |
| Security.Authentication.File.Sha256Mismatch | File sha256 mismatch | File SHA256 value mismatch | The file in the request does not match the SHA256 in the HTTP header. Please check and re-upload. |
| Security.Authentication.Header.DecryptFailed | Decrypt http header failed: %s | Failed to decrypt HTTP request header | Please check if the encryption public key is correct. |
| Security.Authentication.Header.UriMismatch | URI mismatch | URI in request header does not match actual request URI | Please check the request URI set in the HTTP header and try again. |
| Security.Authentication.IncorrectSeekDBPassword | seekdb root password is incorrect | Incorrect root user password in seekdb instance | Please check the root user password in seekdb and try again after confirming it is correct. |
| Security.Authentication.Timestamp.Invalid | Invalid timestamp: %s, err: %s | Invalid timestamp | Please provide a valid timestamp in the HTTP header and try again. |
| Security.Authentication.Unauthorized | Authentication failed | Authentication failed | Please check your request and try again. |
| Security.User.PermissionDenied | Permission denied | Insufficient user permissions | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Dag.Operator.CancelFinishedDag | Failed to cancel dag: dag is finished | Cannot cancel a finished DAG | Only DAGs in the RUNNING state can be canceled. |
| Task.Dag.Operator.CancelNotAllowed | Failed to cancel dag: node %s can not cancel | The DAG contains nodes that cannot be canceled | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Dag.Operator.NotSupport | Not support operator %s | Unsupported DAG operation | Please perform a supported task operation. |
| Task.Dag.Operator.PassNotAllowed | Failed to pass dag: node %s can not pass | The DAG contains nodes that cannot be skipped | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Dag.Operator.PassNotFailedDag | Failed to pass dag: dag is not failed | Cannot skip a DAG that is not in the failed state | Only failed DAGs can be skipped. |
| Task.Dag.Operator.RetryNotAllowed | Failed to set dag retry: node %s can not retry | The DAG contains nodes that cannot be retried | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Dag.Operator.RetryNotFailedDag | Failed to set dag retry: dag state is not failed | Cannot retry a DAG that is not in the failed state | Only failed DAGs can be retried. |
| Task.Dag.Operator.RollbackNotAllowed | Failed to set dag rollback: node %s can not rollback | The DAG contains nodes that cannot be rolled back | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Dag.Operator.RollbackNotFailedDag | Failed to set dag rollback: dag state is not failed | Cannot roll back a DAG that is not in the failed state | Only failed DAGs can be rolled back. |
| Task.Dag.PassTimeout | Pass %d timeout after %d seconds | Task skip operation timed out | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Dag.State.Invalid | Invalid dag state '%d' | Invalid task state | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Data.ConvertFailed | Convert %s failed: %s | Failed to convert task data | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Data.NotSet | Data %s is not set | Required task data not set | Please contact the OceanBase technical support team for troubleshooting. |
| Task.GenericID.Invalid | Invalid id: %s | Invalid generic ID | Please provide a valid generic ID. |
| Task.LocalData.ConvertFailed | Convert %s failed: %s | Failed to convert local task data | Please check the local data format and try again. |
| Task.LocalData.NotSet | Task local data %s not set | Required local task data not set | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Node.Operator.NotSupport | Not support operator %s | Unsupported operation | Please perform a supported task operation. |
| Task.Node.Operator.PassNotAllowed | Failed to pass node: node %s can not pass | Task node cannot be skipped | Task node cannot be skipped. |
| Task.Node.Operator.PassNotFailedDag | Failed to pass node: assigned dag is not failed | Cannot skip task node when DAG is not failed | Only failed task nodes can be skipped. |
| Task.Node.Operator.PassNotFailedNode | Failed to pass node: node %s is not failed | Cannot skip a task node that is not failed | Only failed task nodes can be skipped. |
| Task.NotFound | Task not found: %v | Task not found | Please verify the task ID and try again. |
| Task.Param.ConvertFailed | Convert %s failed: %s | Failed to convert task parameter | Please contact the OceanBase technical support team for troubleshooting. |
| Task.Param.NotSet | Param %s is not set | Required task parameter not set | Please contact the OceanBase technical support team for troubleshooting. |
| Task.RemoteTask.Failed | Remote task %s %s failed | Remote task failed | Please contact the OceanBase technical support team for troubleshooting. |
| Task.SubDag.NotAllAdvanced | Sub dag of agents: %v not advanced, main dag failed | Some Agent subtasks failed to advance | Please check and resolve the blocked subtasks. |
| Task.SubDag.NotAllCreated | Sub dag of agents: %v not created, main dag failed | Some Agent subtasks failed to be created | Please check the availability and connectivity of the Agents. |
| Task.SubDag.NotAllPassed | Not all sub dag passed, main dag failed | Some Agent subtasks failed to be skipped | Please check and resolve the failed subtasks. |
| Task.SubDag.NotAllReady | Sub dag of agents: %v not ready, can not advance main dag | Some Agent subtasks are not ready | Please wait until all subtasks are ready, or check for issues. |
| Task.SubDag.NotAllSucceed | Sub dag of agents: %v failed, main dag failed | Some Agent subtasks failed | Please check and resolve the failed subtasks. |
| Task.Template.Empty | Task template is empty | Task template is empty | Please contact the OceanBase technical support team for troubleshooting. |

View File

@@ -0,0 +1,92 @@
---
slug: /agent-commands
---
# obshell agent commands
This topic describes the obshell agent commands, which are used to manage obshell. You can use the `-h`/`--help` option in a command to view the help information of the command. For example, `obshell agent start -h --seekdb` is used to view the help information of the `start` command for seekdb. `--seekdb` indicates that the help information of the `start` command for seekdb is to be viewed.
## obshell agent start
Use this command to start obshell.
```shell
obshell agent start [-P] [--password] [--seekdb] [--base-dir] [-6]
# example
obshell agent start -P 2886 --base-dir /var/lib/oceanbase
```
The following table describes the options.
| Option | Required | Data type | Default value | Description |
| --- | --- | --- | --- | --- |
| -P/--port | No | int | 2886 | The port number to which the obshell is bound. |
| --password | No | string | N/A | This option is used only for taking over a seekdb instance. When you take over a seekdb instance, you must use this option to specify the password of the root user of the seekdb instance. You can also specify the root user password by using the `OB_ROOT_PASSWORD` environment variable. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. If you specify `--base-dir`, you can omit `--seekdb`. |
| --base-dir | No | string | N/A | The working directory of obshell. It must be consistent with the working directory of the corresponding seekdb instance. If you do not specify this option, the default value is the current directory. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
## obshell agent stop
Use this command to stop obshell.
```shell
obshell agent stop [--port] [--seekdb] [-6]
# example
obshell agent stop --seekdb --port 2886
```
The following table describes the options.
| Option | Required | Data type | Default value | Description |
| --- | --- | --- | --- | --- |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can specify the obshell port by using the `OBSHELL_PORT_FOR_SEEKDB` environment variable. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
## obshell agent restart
Use this command to restart obshell.
```shell
obshell agent restart [-P] [--password] [--seekdb] [-6]
# example
obshell agent restart --seekdb --port 2886
```
The following table describes the options.
| Option | Required | Data type | Default value | Description |
| --- | --- | --- | --- | --- |
| -P/--port | No | int | 2886 | The port number to which the obshell is bound. |
| --password | No | string | N/A | This option is used only for taking over a seekdb instance. When you take over a seekdb instance, you must use this option to specify the password of the root user of the seekdb instance. You can also specify the root user password by using the `OB_ROOT_PASSWORD` environment variable. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
## Upgrade obshell
You can run this command to upgrade obshell.
```shell
obshell agent upgrade -d [-V] [-t] [--port] [--seekdb] [-6] [-y] [-v]
# example
obshell agent upgrade -d /home/oceanbase/upgrade/ -V 4.2.2.0-20231224224959 --port 2886 --seekdb
```
The following table describes the options.
| Option | Required | Data type | Default value | Description |
| --- | --- | --- | --- | --- |
| -d/--pkg_directory | Yes | string | N/A | The path where the upgrade package is stored. |
| -V/--target_version | No | string | N/A | The target version. The value must be in the correct format, such as `4.2.2.0` or `4.2.2.0-20231224224959`. If you do not specify this option, the highest version of the obshell RPM package in the directory specified by the `-d` option is selected. |
| -t/--tmp_directory | No | string | `${home_path}`/upgrade | The temporary directory for the upgrade process. This directory stores the downloaded installation package and all files generated during the decompression and installation process. The value must be an absolute path. |
| --port | No | int | 2886 | The port number of obshell. If you do not specify this option, you can specify the obshell port by setting the `OBSHELL_PORT_FOR_SEEKDB` environment variable. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command is applied to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If you specify this option, the system does not prompt you for confirmation when it performs an upgrade. |
| -v/--verbose | No | N/A | N/A | This option does not require a value. If you specify this option, the system displays detailed execution information. |

View File

@@ -0,0 +1,93 @@
---
slug: /seekdb-commands
---
# obshell seekdb commands
This topic describes the seekdb commands in obshell. You can use the commands to manage a seekdb instance. You can use the `-h`/`--help` option in a command to view the help information of the command, for example, `obshell seekdb start -h`. You can also use the `-v`/`--verbose` option to view the detailed execution process of the command.
:::info
The seekdb commands are designed for managing a seekdb instance. You do not need to explicitly specify the <code>--seekdb</code> option when you execute these commands.
:::
## obshell seekdb start
You can run this command to start seekdb.
```shell
obshell seekdb start [--port] [--seekdb] [-6]
# example
obshell seekdb start --port 2886
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can also specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
## obshell seekdb restart
You can run this command to restart seekdb.
```shell
obshell seekdb restart [-t] [--port] [--seekdb] [-6] [-y]
# example
obshell seekdb restart -t --port 2886
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -t/--terminate | No | N/A | N/A | This option does not require a value. If you specify this option, the `MINOR FREEZE` command is triggered before seekdb is restarted. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can also specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If you specify this option, the confirmation for the restart operation is skipped. |
## obshell seekdb stop
You can run this command to stop seekdb.
```shell
obshell seekdb stop [-t] [--port] [--seekdb] [-6] [-y]
# example
obshell agent stop -t --port 2886
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -t/--terminate | No | N/A | N/A | This option does not require a value. If you specify this option, the `MINOR FREEZE` command is triggered before the seekdb process is stopped. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can also specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If you specify this option, the confirmation for the stop operation is skipped. |
## obshell seekdb show
You can run this command to view the configurations and status of seekdb.
```shell
obshell seekdb show [-d] [--port] [--seekdb] [-6]
# example
obshell agent show
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -d/--show_detail | No | N/A | N/A | This option does not require a value. If you specify this option, the command displays the details of seekdb. |
| --port | No | int | 2886 | Specifies the port number of obshell. If you do not want to specify the port number by using this option, you can also specify the port number of obshell by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |

View File

@@ -0,0 +1,134 @@
---
slug: /utilities-commands
---
# obshell task commands
This topic describes the task commands of obshell, which are used to manage obshell tasks. You can use the `-h`/`--help` option in a command to view the help information of the command. For example, you can run the `obshell task show -h --seekdb` command to view the help information of the `show` command for seekdb. In this command, `--seekdb` indicates that the help information of the `show` command for seekdb is to be viewed.
## obshell task show
You can run this command to view information about a task.
```shell
obshell task show [-i] [-d] [--port] [--seekdb] [-6] [-v]
# example
obshell task show --seekdb --port 2886
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -i/--id | No | string | N/A | The ID of the task to be viewed. If this option is not specified, the current task is displayed. If no task is being executed, no task information is displayed. |
| -d/--show_detail | No | N/A | N/A | This option does not require a value. If this option is specified, detailed information about the task is displayed. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If this option is specified, the command is applied to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If this option is specified, IPv6 is used. |
| -v/--verbose | No | N/A | N/A | This option does not require a value. If this option is specified, detailed execution process information is displayed. |
## obshell task cancel
You can run this command to cancel an uncompleted task.
```shell
obshell task cancel -i [--port] [--seekdb] [-6] [-y]
# example
obshell task cancel -i 11 --seekdb
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -i/--id | Yes | string | N/A | The ID of the task to be canceled. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If this option is specified, the command is applied to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If this option is specified, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If this option is specified, the command skips the confirmation. |
## obshell task rollback
You can run this command to roll back a failed task.
```shell
obshell task rollback -i [--port] [--seekdb] [-6] [-y]
# example
obshell task rollback -i 11 --seekdb
```
The following table describes the options.
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -i/--id | Yes | string | N/A | The ID of the task to be rolled back. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If this option is specified, the command is applied to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If this option is specified, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If this option is specified, the command skips the confirmation. |
## obshell task retry
You can run this command to retry a failed task.
```shell
obshell task retry -i [--port] [--seekdb] [-6] [-y]
# example
obshell task retry -i 11 --seekdb
```
The options are described in the following table:
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -i/--id | Yes | string | N/A | The ID of the task to be retried. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can also specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If you specify this option, the command skips the confirmation. |
## obshell task pass
You can run this command to skip a failed task.
```shell
obshell task pass -i [--port] [--seekdb] [-6] [-y]
# example
obshell task pass -i 11 --seekdb
```
The options are described in the following table:
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -i/--id | Yes | string | N/A | The ID of the task to be skipped. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can also specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |
| -y/--yes | No | N/A | N/A | This option does not require a value. If you specify this option, the command skips the confirmation. |
## obshell task watch
You can run this command to view the execution progress of a specified task in real time.
```shell
obshell task watch -i [--port] [--seekdb] [-6]
# example
obshell task watch -i 11 --seekdb
```
The options are described in the following table:
| Option | Required | Data Type | Default Value | Description |
| --- | --- | --- | --- | --- |
| -i/--id | Yes | int | N/A | The ID of the running task to be viewed. |
| --port | No | int | 2886 | The port number of obshell. If you do not want to specify the port number by using this option, you can also specify it by using the environment variable `OBSHELL_PORT_FOR_SEEKDB`. |
| --seekdb | No | N/A | N/A | This option does not require a value. If you specify this option, the command applies to seekdb. |
| -6/--use-ipv6 | No | N/A | N/A | This option does not require a value. If you specify this option, IPv6 is used. |

View File

@@ -0,0 +1,40 @@
---
slug: /dashboard-overview
---
# obshell Dashboard
obshell Dashboard is a Web-based visual management interface provided by OceanBase. It supports resource management of seekdb and provides monitoring capabilities for key resources and performance metrics, helping users efficiently manage seekdb.
The obshell Dashboard service is fully integrated into the obshell process. Users can manage seekdb by accessing the service address where obshell is deployed. This design simplifies the management process and ensures minimal resource overhead, providing a simple and user-friendly control experience.
## Features
The obshell Dashboard currently supports the following features for managing seekdb:
* Instance management: View instance information, including status, deployment specifications, creation/start time, working directory, and more. It also allows you to start/stop instances and modify instance allowlists. For more information, see [Manage instances](200.dashboard-instance.md).
* Database management: Manage databases under an instance. For more information, see [Manage databases](300.dashboard-db.md).
* User management: Manage users under an instance. For more information, see [Manage users](400.dashboard-user.md).
* Alarm center: View alarm rules and events for an instance and support shielding alarms. For more information, see [Manage alarms](500.dashboard-alarm.md).
* Performance monitoring: Monitor real-time **Performance and SQL**, **Transaction**, **Storage and Cache**, and **Host performance** metrics of a seekdb instance. For more information, see [Monitor performance](600.dashboard-monitor.md).
* Parameter management: View and modify parameters of a seekdb instance. For more information, see [Manage parameters](700.dashboard-parameter.md).
* Package management: Upload packages and upgrade obshell by uploading the target version of the package. For more information, see [Manage packages](800.dashboard-package.md).
* Task center: View and manage tasks generated during instance operations. For more information, see [Manage tasks](900.ob-dashboard-task.md).
## Log in and log off
obshell provides a graphical interface for visual management of seekdb. After successfully installing obshell, you can access the obshell Dashboard (the visual management page of obshell) by using the IP address and port number of an obshell node. By default, you log in as the root user, and the password is the password of the root user in the instance. If the root user password is empty, you can directly click **Login** to log in.
After logging in to the obshell Dashboard console, hover the cursor over the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/100.ob-dashboard-overview-01.png" alt="User" style={{ height: '20px' }}/></span> icon in the upper-right corner and click **Log out**. In the dialog box that appears, click **OK** to log off.
## View the version
After logging in to the obshell Dashboard console, click **Help** > **About obshell Dashboard** in the upper-right corner to view the version of obshell Dashboard.

View File

@@ -0,0 +1,85 @@
---
slug: /dashboard-instance
---
# Instance management
Log in to the obshell Dashboard console. The **instance management** page is displayed by default. This topic describes the information displayed on the **instance management** page and the operations that you can perform on the page.
The **instance management** page displays the basic information of seekdb, the IP address whitelist, the instance status, and the start and end times of the last major compaction. You can also start, stop, and restart seekdb on the **instance management** page. You can also upgrade obshell and perform a major compaction on an instance on the page.
## Basic information
The **Basic information** module displays the instance status, seekdb version, instance specification, number of databases and users in the instance, port, creation time, working directory, and other basic information. For more information about the displayed items, see the following figure.
After you click the refresh icon next to **instance management**, the **Basic information** module will be refreshed to show the latest instance information. You can click the number next to **Number of databases** or **Number of users** to go to the **Database Management** or **User Management** page, where you can view database or user information. You can click the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/100.ob-dashboard-tenant-01.png" alt="Copy" style={{ height: '20px' }}/></span> icon next to **Connection string** to copy the connection string for later use.
![Basic information](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/200.dashboard-instance-01.png)
## Start and stop instances
:::info
obshell Dashboard does not support starting or stopping seekdb instances managed by systemd. If your current seekdb instance is started by systemd, execute the <code>systemctl stop seekdb</code>/<code>systemctl start seekdb</code> command to stop or start the instance.
:::
When the status of an instance is **Available**, click the **Stop** button in the upper-right corner of the **instance management** page. In the confirmation dialog box that appears, click **Stop**. On the obshell Dashboard, the system submits a stop task and displays the task ID. Click the displayed task ID to view the task execution status.
:::tip
Stopping an instance will cause business disruption. Please proceed only after you have confirmed the potential risks.
:::
![Start or stop instances](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/200.dashboard-instance-02.png)
After the stop task is completed, the instance status changes to **Stopped**. On the **instance management** page, click **Start** in the upper-right corner, and in the confirmation dialog box that appears, click **Start**. The obshell Dashboard will submit a start task and display the task ID. You can click the task ID to view the task details.
## Reboot an instance
On the Instance Management page, click **Restart** in the upper-right corner of the page. On the confirmation dialog box that appears, click **Restart**. The Dashboard displays the ID of the restart task. You can click the task ID to view the task details.
:::tip
Restarting the instance will cause a business interruption. Please confirm the relevant risks before performing this operation.
:::
![Reboot instance](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/200.dashboard-instance-03.png)
## Upgrade obshell
Hover the cursor over **···** in the upper-right corner and click **Upgrade obshell**.
In the **Agent Upgrade Version** window, configure the **obshell Agent Version**. The version is selected from the uploaded obshell software packages. If there are no obshell software packages with a version higher than the current one in the obshell Dashboard, click **+ Upload Package** in the drop-down list to upload a package.
:::info
Make sure that the required installation package exists locally. If it does not exist, click <b>Download RPM Package</b> on the <b>Upload Package</b> page to download the corresponding software package from the open-source mirror site.
:::
After the configuration is completed, click **Upgrade** and then click **OK** in the window that appears. The obshell Dashboard will submit a task to upgrade obshell. You can click **View Tasks** in the pop-up window to view the task execution status.
![upgrade obshell](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/200.dashboard-instance-04.png)
## White List
The **White List** module displays the list of IP addresses that can connect to the instance. You can click the icon in the right side of the module to modify the whitelist.
![modify whitelist](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/200.dashboard-instance-05.png)
You can customize the accessible IP address or set all IP addresses to be accessible. When you select the custom setting, you can specify the list of clients that can log in to the instance in the **Custom IP** field. After you enter an IP address, press the Enter key or enter a comma (,) to configure multiple node IP addresses. Hover the cursor over **View Configuration Instructions** to view the configuration description. The following table describes the supported IP address formats:
* IP address, for example: 127.0.0.10,127.0.0.11
* Subnet/mask, for example: 127.0.0.0/24
* Fuzzy match, for example: 127.0.0.% or 127.0.0._
* Mixed multiple formats, for example: 127.0.0.10,127.0.0.2,127.0.0.%,127.0.0._,127.0.0.1/24
:::info
If you set the value to <code>%</code>, all clients can connect to the instance. This may cause security risks. Proceed with caution.
:::
## Consolidation Management
The **Consolidation Management** module displays the **Status**, **Last merge start time**, and **Last consolidation end time** of the current instance. Click **Initiate Merger** after **Status** and then click **OK** in the window that appears to initiate a major compaction.
![initiate major compaction](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/200.dashboard-instance-06.png)
## References
[Manage software packages](800.dashboard-package.md)

View File

@@ -0,0 +1,41 @@
---
slug: /dashboard-db
---
# Database Management
You can log in to the obshell Dashboard console and click **Database Management** in the left-side navigation pane to go to the **Database Management** page. This topic describes the information on the **Database Management** page and operations that you can perform on the page.
## Basic information
The **Database Management** page displays **Database Name**, **character set**, **Collation**, **JDBC connection string**, **Creation time**, whether the database is **Read Only**, and the actions that can be performed. To copy the JDBC connection string, click the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/100.ob-dashboard-tenant-01.png" alt="Copy" style={{ height: '20px' }}/></span> icon next to the **JDBC connection string** column.
You can click the **Sort by Create Time** icon in the column header to display databases in ascending or descending order. To search for databases on the page, enter the name of the database you want to search for in the search box in the upper-right corner.
![Overview](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/300.dashboard-db-01.png)
## Create a database
Click **New Database** in the upper-right corner of the **Database Management** page. In the **New Database** dialog box, specify **Database Name**, **character set**, **Collation**, and the read-only option. Click **Submission** to complete the operation.
![Create a database](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/300.dashboard-db-02.png)
| Parameter | Description |
|-------|------|
| Database Name | Specify the name of the database to be created. The name must meet the following criteria:<ul><li>The length of the name must be 2 to 128 characters.</li><li>The name can contain lowercase English letters, digits, and underscores. The name must start with a lowercase English letter.</li></ul> |
| character set | The default value is `utf8mb4`, and you can select a different character set from a drop-down list. |
| Collation | You can select the desired collation in a drop-down list. |
| Read Only | Specifies whether the new database is a read-only database. |
## Modify the database
To modify the **Collation**, **character set**, and read-only status of a database, select the database in the **Operation** column and click **Edit**. After making the necessary changes, click **Submission** to complete the database modification.
![Edit database](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/300.dashboard-db-03.png)
## Delete a database
In the **Operation** column, click the **Delete** field and enter `delete` in the field that appears, and then click **Delete**.
![Delete a database](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/300.dashboard-db-04.png)

View File

@@ -0,0 +1,68 @@
---
slug: /dashboard-user
---
# User management
Log in to the obshell Dashboard console and click **User Management** in the left-side navigation pane to go to the **User Management** page.
On the **User Management** page, you can view all users in the instance. You can click the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/100.ob-dashboard-tenant-01.png" alt="Copy" style={{ height: '20px' }}/></span> icon in the **Login connection string** column to copy the connection string for a user. If the instance contains a large number of users, you can use the search bar in the upper-right corner to search for and view the information about a specified user.
![Overview](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/400.dashboard-user-01.png)
## Create a user
On the **User Management** page, click **New User** in the upper-right corner. On the **New Database User** page, set the **User Name**, **Password**, **Global Permissions**, and **Database Permissions**. After the settings are completed, click **Submission**.
![Create a user](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/400.dashboard-user-02.png)
| Parameter | Description |
|-------|------|
| User Name | Set the name of the new user. The username must meet the following requirements:<ul><li>Length: 2 to 64 characters.</li><li>Contains lowercase letters, digits, and underscores, and must start with a letter.</li></ul> |
| Password | The password must meet the following requirements:<ul><li>Length: 8 to 32 characters</li><li>Contains at least 2 of each of the following four types of characters: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters (<code>~!@#%^&*_-+=\|(){}[]:;,.?/</code>). </li></ul> After the password is configured, click **Copy Password** to copy the password for later use. |
| Confirm Password | Re-enter the password to confirm the configuration. If the two passwords are inconsistent, a prompt is displayed: `The new password entered twice is inconsistent, please re-enter.`. |
| Global Permissions (Optional) | You can select the privileges that the user can have from the drop-down list. The privileges apply to all databases. For more information about the privileges, see [Privilege types in MySQL mode](https://en.oceanbase.com/docs/common-oceanbase-database-10000000001974758). If no privileges are selected, the user has no privileges. |
| Database Permissions | Set the privileges of the new user for each database. The privileges apply to all targets in the specified database. To set the privileges, perform the following steps:<ol><li>Select one or more databases from the left list. The left list displays all databases in the current instance. You can also search for a specified database in the search box of the left list.</li><li>Click **>** in the middle. The selected databases are moved to the right list.</li><li>Select the privileges that the user can have in the specified database from the right list. Click **All** in the upper-right corner of the specified database to grant all privileges to the user.</li><li>Repeat steps 1, 2, and 3 to set the privileges for other databases. You can also search for a specified database in the search box of the right list.</li><li>To cancel the privileges of the user for a specified database, click **Delete** in the upper-right corner of the database in the right list to move the database back to the left list. You can also click **Remove All** in the upper-right corner of the right list, and then click **Determine** in the dialog box that appears to move all databases in the right list back to the left list. </li></ol> |
## Lock a user
You can click the switch icon in the **Lock** column to lock or unlock a user. If the user is not locked, click <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/400.ob-dashboard-tenant-user-01.png" alt="switch" style={{ height: '20px' }}/></span> in the **Lock** column. In the dialog box that appears, click **OK** to lock the user. A locked user cannot log in. Proceed with caution. If the user is locked, click <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/400.ob-dashboard-tenant-user-02.png" alt="switch" style={{ height: '20px' }}/></span> in the **Lock** column. In the dialog box that appears, click **OK** to unlock the user. An unlocked user can log in.
![Lock a user](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/400.dashboard-user-03.png)
## Change a password
Click the **Change Password** field in the **Operation** column. In the dialog box that appears, enter the **New Password** and **Confirm Password**. After you complete the entries, click **OK** to change the password. The password must meet the following requirements:
* The password must be 8 to 32 characters long.
* The password must contain at least two characters of each of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters (<code>~!@#%^&*_-+=\|(){}[]:;,.?/</code>).
After you configure the password, click **Copy Password** to copy the password for later use.
![Change a password](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/400.dashboard-user-04.png)
## Modify permissions
Click the **Modify Permissions** field in the **Operation** column to modify the global and database permissions of the corresponding user. You can directly select a global permission from the drop-down list. To modify the database permissions of the user, perform the following steps:
1. In the left list, select one or more databases. The left list displays all databases in the current instance. You can also search for a specific database in the left search field.
2. Click **>** in the middle. The selected databases are moved to the right list.
3. In the right list, select the permissions that the user can have in the specified database. To grant all permissions to the user in the specified database, click **All** in the upper-right corner of the database.
4. Repeat steps 1, 2, and 3 to set the user permissions for different databases. You can also search for a specific database in the right search field.
5. To revoke the user permissions of a specified database, click **Delete** in the upper-right corner of the database in the right list. This moves the database back to the left list. You can also click **Remove All** in the upper-right corner of the right list. In the dialog box that appears, click **Determine** to move all databases in the right list back to the left list.
6. After you complete the settings, click **Submission**.
![Modify permissions](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/400.dashboard-user-05.png)
## Delete a user
Click the **Delete** field in the **Operation** column. In the dialog box that appears, enter `delete` in the input field and click **Delete**. This deletes the specified user. The objects and data under the user will also be deleted. Proceed with caution.
![Delete a user](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/400.dashboard-user-06.png)

View File

@@ -0,0 +1,98 @@
---
slug: /dashboard-alarm
---
# Alert management
Log in to the obshell Dashboard console and click **Alarm Center** in the left-side navigation pane to go to the **Alarm Center** page.
The **Alarm Center** page allows you to centrally manage and monitor alert events in a seekdb instance. You can view and manage alert events, set alert suppression rules, and configure alert rules on this page. This helps you respond to and handle exceptions in a timely manner, ensuring system stability.
:::info
When you log in to the Alert Center page for the first time, you need to enter the Alertmanager address, username, and password. If you have not installed Alertmanager, we recommend that you install it by following the instructions in [Configure monitoring components](../900.configure-monitor.md).
:::
## Filter
You can filter the content in the **Alarm event**, **Alarm Shielding**, and **Alarm Rules** tabs based on the conditions. The supported conditions vary across tabs. You can configure the conditions and then perform precise searches. Click **Reset** to clear the query content and re-enter the query content.
| Parameter | Description |
| --- | --- |
| Alarm level | You can select an alert level from the drop-down list. The alert levels are **Serious**, **Warning**, **Attention**, and **Reminder**.<ul><li><b>Serious</b>: The system availability has declined and needs to be fixed immediately to avoid complete unavailability. </li><li><b>Warning</b>: The system is still available, but it is about to reach an unavailable state. Measures must be taken to prevent the availability from declining. </li><li><b>Attention</b>: Key performance metrics of the system are declining, but they have not reached the level that triggers a major alert. Potential issues can be identified and resolved to avoid major alerts. </li><li><b>Reminder</b>: This is an operational notice, not an alert. It is usually triggered by an administrator performing an important operation. </li></ul> |
| Keywords | The keyword for the alert. You can enter a custom keyword and search for the corresponding alert. |
| Start Time | The start time of the alert. |
| End Time | The end time of the alert. |
## Events
You can view the details of each alert in the **Event List** tab, including **Alarm event**, **Alarm level**, **Alarm status**, **Generation time**, **End Time**, and the actions that you can perform on the event. You can sort the alerts by **Alarm level**, **Alarm status**, **Generation time**, and **End Time**.
![Events](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-01.png)
### Mute an alert
If you do not need to pay attention to an alert, you can click **Shielding** in the **Operation** column of the alert to quickly mute the alert.
After you click **Shielding**, the page switches to the **Alarm Shielding** tab and the **Shielding conditions** drawer appears. The **Shielding conditions** drawer is automatically filled with the **Masking alarm rules** and **Label** information corresponding to the selected alert. You only need to select **Mask End Time** and enter **Note Information**. You can set the **Mute End Time** in the following two ways:
* Click the selection box and use the time selector to customize the end time.
* Click the selection box and set a fixed mute duration. For example, if you click **6 hours**, the system will fill in the current time + 6 hours into the box.
After an alert is muted, the **Alarm Shielding** tab will display a new mute record. In the **Alarm event** tab, the status of the corresponding alert will change from **Active** to **Inhibit**. Muted alerts will not be sent before the set end time. If you need to send the alert earlier, you can modify the mute record in the **Alarm Shielding** tab or **Unmask** the alert. For more information, see [Edit a suppression rule](#Edit%20a%20suppression%20rule) and [Remove a suppression rule](#Remove%20a%20suppression%20rule).
![Mute](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-02.png)
## Alert suppression
In the suppression list, you can view the **Masking alarm rules**, **Mask End Time**, **Creator**, **Status**, **Creation time**, and **Remarks** of the suppression rules, as well as the operations that can be performed. You can sort the suppression rules based on **Mask End Time**, **Status**, and **Creation time**. You can also edit or remove specific suppression rules. When you hover the pointer over the **Masking alarm rules** column, the alert rule details are displayed.
![Alert suppression](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-03.png)
### Create a suppression rule
On the **Alarm Shielding** tab, click **New Shield**. In the **Shielding conditions** drawer, configure the suppression conditions and click **Submission**. The system returns to the **Alarm Shielding** tab and adds the suppression rule to the suppression list.
| Parameter | Description |
| --- | --- |
| Masking alarm rules | In the drop-down list, select the alert rule that you want to suppress. You can select multiple alert rules. The alert rules in the **Rule List** list on the **Alarm Rules** tab are consistent with those in this drop-down list. You can view the details of an alert rule on the **Alarm Rules** tab. |
| Label | Optional. You can specify the tag matching condition for alert suppression. You can specify a value or a regular expression. An alert is suppressed only when all the conditions are met. <main id="notice" type="explain"><p>Generally, you do not need to configure this parameter. </p></main> |
| Mask End Time | The end time of alert suppression. Alerts are not sent before the end time. You can configure the end time in one of the following ways: <ul><li>Click the checkbox and use the time selector to specify the end time. </li><li>Click the checkbox and set the fixed suppression duration. For example, if you click <b>6 hours</b>, the system automatically fills the current time plus 6 hours into the field. </li></ul> |
| Note Information | You can add remarks to the suppression rule for easy identification and reuse. |
:::info
To suppress an alert, we recommend that you go to the <b>Alarm event</b> tab and suppress the alert event. After you click the <b>Shielding</b> field in the <b>Operation</b> column, the system automatically jumps to the <b>Alarm Shielding</b> tab and displays the <b>Shielding conditions</b> drawer. In the drawer, the system automatically fills the <b>Masking alarm rules</b> and <b>Label</b> information associated with the alert event. You only need to configure the end time of alert suppression and add remarks. Then, the alert is suppressed.
:::
![Create an alert suppression rule](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-04.png)
### Edit a suppression rule
On the **Alarm Shielding** tab, in the **Mask List** section, click **Edit** in the **Operation** column. In the **Shielding conditions** drawer, you can edit the suppression rule.
The **Shielding conditions** drawer automatically fills the **Masking alarm rules**, **Label**, **Mask End Time**, and **Note Information** information of the suppression rule. You can modify the parameters as needed. For more information, see [Create a suppression rule](#Create%20a%20suppression%20rule). After you click **Submission**, the suppression rule is edited.
After a suppression rule is edited, the suppression list is updated with the new suppression rule. The status of the original suppression rule is changed from **Active** to **Expired** and no further operations can be performed on it.
![Edit a suppression rule](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-05.png)
### Remove a suppression rule
On the **Alarm Shielding** tab, in the **Mask List** section, click **Unmask** in the **Operation** column. In the confirmation dialog box that appears, click **Disarm**. The suppression rule is removed. After the suppression rule is removed, the status of the suppression rule is changed from **Active** to **Expired** and no further operations can be performed on it.
:::tip
After a suppression rule is removed, it cannot be recovered. Proceed with caution.
:::
![Remove a suppression rule](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-06.png)
## Alert rules
In the rule list, you can view the **Alarm rule name**, **Trigger rule**, **Duration**, **Object Type**, **Alarm level**, and **Type**. You can sort the rules by **Alarm level** and filter the rules by **Type** to view **Custom** or **Default** rules.
:::info
obshell Dashboard does not support custom alert rules. You can visit the <a href="https://github.com/oceanbase/obdeploy/blob/master/plugins/prometheus/2.37.1/prometheus_rules.yaml">GitHub repository</a> of obd to view the Prometheus alert rules provided by OceanBase.
:::
![Alert rules](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/500.dashboard-alarm-07.png)

View File

@@ -0,0 +1,48 @@
---
slug: /dashboard-monitor
---
# Performance monitoring
Log in to the obshell Dashboard console and click **Performance monitoring** in the left-side navigation pane. On the **Performance monitoring** page, you can view the icons of the performance metrics of seekdb.
:::info
When you log in for the first time, you must enter the address, username, and password of Prometheus. If you have not installed Prometheus, we recommend that you install it by following the instructions in [Configure monitoring components](../900.configure-monitor.md).
:::
The **Performance monitoring** page provides real-time monitoring capabilities for the **Performance and SQL**, **Transaction**, **Storage and Cache**, and **Host performance** metrics of a seekdb instance. This helps you quickly locate performance bottlenecks and optimize system resource usage.
By default, the **Performance monitoring** page displays the monitoring information of the **Performance and SQL** tab. Different tabs support viewing different monitoring metrics, as shown in the following table.
| Tab | Monitoring metrics |
| --- | --- |
| Performance and SQL | This tab displays the following performance metrics: **QPS**, **Response time**, **SQL execution plan category**, **SQL execution plan time**, **Number of sessions**, **Waiting for events**, **Waiting for event time**, **Request waiting queue**, **Request waiting queue time consuming**, **CPU cost**, **Thread usage**, **memory usage percent**, **MemStore usage percent**, **Cursors**, and **GTS request count**. |
| Transaction | This tab displays the following performance metrics: **TPS**, **Transaction response time**, **Transaction response time detail**, **Transaction rollback ratio**, **Number of transaction logs**, **Transaction log volume**, **Transaction log time-consuming**, **Number of transaction lock waits**, **Average time to wait for transaction lock**, **Transaction count**, and **MemStore lock success ratio**. |
| Storage and Cache | This tab displays the following performance metrics: **MemStore**, **IOPS**, **IO time-consuming**, **I/O Throughput**, **Cache size**, **Cache hit rate**, **Cache request total count**, **Log Disk**, **Log Disk Percentage**, **Vector Memory**, and **Vector Memory Percentage**. |
| Host performance | This tab displays the following performance metrics: **Linux system load**, **CPU Usage**, **Memory**, **Memory usage**, **IOPS**, **IO time-consuming**, **I/O Throughput**, and **Network Throughput Rate**. |
## Procedure
1. You can customize the refresh frequency and time range at the top of the page based on your needs.
![Refresh](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/600.dashboard-monitor-01.png)
* By default, performance data does not refresh. Click the refresh button next to **Performance monitoring** to refresh the entire **Performance monitoring** page and display the **Performance and SQL** module. Click the refresh field to refresh the icon information and remain in the current module.
* You can customize the refresh frequency. Hover the cursor over the **Close** field to select the refresh frequency from the drop-down list. The refresh frequency options are `Off`, `5s`, `10s`, and `30s`, with `Off` as the default.
* You can use the time selector to customize the monitoring scope. Click the left side to select monitoring information for a specific period before the current time. For example, click **Last 30 Minutes** to view monitoring information for the last 30 minutes. By default, the last 1 hour of data is displayed. You can select a different period as needed. The right side displays the date and time. You can manually enter the date or select it from the calendar below. You can manually enter the time or select it by sliding the mouse.
![Time Selection](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/600.dashboard-monitor-02.png)
2. Hover the cursor over the question mark icon next to each monitoring item to view its description. Hover the cursor over any position on the monitoring chart to view the detailed information of the line chart. Click ▲ or ▼ in the upper-right corner of the icon to navigate to the previous or next page.
![View](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/600.dashboard-monitor-03.png)
3. You can perform operations on specific monitoring metrics.
Hover the cursor over the corresponding monitoring metric to display the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/SeekDB/obshell/600.dashboard-monitor-05.png" alt="Focus" style={{ height: '20px' }}/></span> icon. Click this icon to display only the line trend of this monitoring metric, and the other colored line trends will be grayed out. Click the icon again to display all monitoring metrics.
Click the red box in the following figure to hide the corresponding colored line trend, which will be grayed out. Click the box again to display the corresponding colored line trend.
![Operations](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/600.dashboard-monitor-04.png)

View File

@@ -0,0 +1,16 @@
---
slug: /dashboard-parameter
---
# Parameter management
Log in to the obshell Dashboard console and click **Parameter Management** in the left-side navigation pane to go to the **Parameter Management** page. This topic describes how to view and modify parameters of a seekdb instance by using obshell Dashboard.
The **Parameter Management** page displays the **Parameter Name**, **Current Value**, and **Description** of the parameters in seekdb, and the operations that you can perform on the parameters. You can move the pointer over the **Description** column of a parameter to view the description of the parameter. You can also search for a parameter in the search box in the upper-right corner of the page.
![Overview of parameters](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/700.dashboard-parameter-01.png)
You can click **Modify Value** in the **Operation** column to modify the value of a parameter. After you modify the value, click **Submission** and confirm the modification.
![Modify a parameter](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/700.dashboard-parameter-02.png)

View File

@@ -0,0 +1,28 @@
---
slug: /dashboard-package
---
# Package management
Log in to the obshell Dashboard console and choose **System Management** > **Software package management** in the left-side navigation pane to go to the **Software package** page. This topic describes how to view or upload software packages in the obshell Dashboard.
## View package details
On the package page, the software package name, version, hardware architecture, size (MB), MD5 value, upload time, and available operations of the software package uploaded to the obshell Dashboard are displayed. Hover the pointer over the MD5 column in the corresponding row to view the software package's MD5 value.
You can use the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/100.ob-dashboard-tenant-02.png" alt="filter" style={{ height: '20px' }}/></span> icon in **Version** and **Hardware Architecture** to filter and view packages by version and hardware architecture. You can also use the <span style={{ verticalAlign: 'middle' }}><img src="https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/observer-enterprise/V4.3.5/700.reference/1500.Components-and-Tools/100.obshell/500.icon/100.ob-dashboard-tenant-03.png" alt="sort" style={{ height: '20px' }}/></span> icon in **Package Name** and **Upload time** to select whether to sort the packages in ascending or descending order. You can also use the search box in the upper right corner to search for a specific package if too many packages are uploaded.
![View](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/800.dashboard-package-01.png)
## Upload software packages
Click **Upload Software Package** in the upper-right corner of the **Software package** page, and click **Select Software Package** to upload an RPM package from the local server. Before you upload an RPM package, make sure that one meets the specified requirements on the local server. If no required RPM package is found on the local server, you can click the **RPM package download address** field to obtain it from the open source mirror.
![Upload a software package](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/800.dashboard-package-02.png)
## Uninstall a package
Click **Delete** in the **Operation** column of the corresponding package, and then click **Confirm** in the message that appears.
![Delete](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/800.dashboard-package-03.png)

View File

@@ -0,0 +1,34 @@
---
slug: /dashboard-task
---
# Task management
The **Mission Center** page displays all tasks in the obshell Dashboard. This topic describes the information on the **Mission Center** page and the operations that you can perform.
You can access the **Mission Center** page by using the following two methods:
* Method 1: Log in to the obshell Dashboard console and click **Tasks** in the upper-right corner.
* Method 2: Log in to the obshell Dashboard console and click **System Management** > **Mission Center** in the left-side navigation pane.
You can filter tasks by status or search for a specific task. To view the details of a task, click the task name.
![Tasks](https://obportal.s3.ap-southeast-1.amazonaws.com/doc/img/SeekDB-EN/900.ob-dashboard-task-01.png)
If a task is in the **In operation** state, you can click the task name to go to the task details page, and then click **Cancel Task** in the upper-right corner. After you confirm the operation, the task is canceled.
If a task is in the **Failed** state, you can perform the following operations:
* Click **Locate Current Progress**. The page jumps to the failed subtask page. You can troubleshoot the issue based on the log information displayed on the right side of the task details page.
* Click **Rollback Task**. In the confirmation window, click **Rollback**. The rollback operation rolls back all executed tasks from the point of failure.
* Click **Skip Task**. In the confirmation window, click **Skip**. The skip operation skips the entire task.
* Click **Retry**. In the confirmation window, click **Confirm**. The retry operation retries all failed nodes and continues execution from the failed node.
* Click **Download log** in the upper-right corner of the log details page. Download the current log file and post it to the [Q&A section](https://open.oceanbase.com/) on the official website. Our on-duty engineers will assist you in troubleshooting the issue.
<!-- ![Log details](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/SeekDB/obshell/900.ob-dashboard-task-02.png) -->

View File

@@ -0,0 +1,207 @@
---
slug: /configure-monitor
---
# Configure monitoring components
The performance monitoring and alerting features of obshell Dashboard depend on Prometheus and Alertmanager. This topic describes how to deploy the required monitoring components.
## Background
The performance monitoring feature of obshell Dashboard relies on obagent and Prometheus, while the alerting feature relies on Alertmanager. obagent provides an HTTP interface for data collection from seekdb. Prometheus periodically accesses obagent's interface to collect and persist monitoring data. obshell Dashboard displays the monitoring data collected by Prometheus. Alertmanager processes alerts from monitoring systems like Prometheus, offering features such as alert deduplication, grouping, routing, and muting.
## Install obagent
### Configure seekdb
1. Prepare a user
We recommend that you use a read-only user and grant the SELECT privilege on the oceanbase.* database to the user.
```shell
obclient> create user monitor identified by '******';
obclient> grant select on oceanbase.* to monitor;
```
2. Set the instance name
If you want to monitor multiple seekdb instances by using Prometheus, you must set different instance names for these instances. This way, you can better distinguish these instances.
```shell
obclient> alter system set `cluster` = 'obcluster';
```
:::tip
To set the instance name, you must add backticks (<code>`</code>) to the <code>cluster</code> parameter.
:::
### Configure obagent
1. Install obagent
Go to the [Open Source Image Library](https://mirrors.aliyun.com/oceanbase/community/stable/) and download the obagent installation package corresponding to the architecture of your environment. Then, run the following command to install obagent. We recommend that you install the latest version.
```shell
[root@test ~]# rpm -ivh obagent-*.rpm
```
By default, obagent is installed in the `/home/admin` directory.
2. Configure obagent
Run the following command to configure the account password for data collection and some necessary metadata information.
```shell
[root@test ~]# cd /home/admin/obagent
[root@test obagent]# bin/ob_agentctl config --update monagent.ob.monitor.user=monitor,monagent.ob.monitor.password=******,monagent.ob.cluster.name=obcluster,monagent.pipeline.ob.status=active,agent.http.basic.auth.metricAuthEnabled=false
```
The following table describes the command parameters.
* `monagent.ob.monitor.user`: specifies the account for data collection. The value is the read-only user created in seekdb. In this example, the value is `monitor`.
* `monagent.ob.monitor.password`: specifies the password for the account for data collection. The value is the password of the read-only user in seekdb.
* `monagent.ob.cluster.name`: specifies the instance name of the seekdb instance. After you connect to the instance, you can run the `SHOW PARAMETERS LIKE 'cluster';` command to query the instance name. The value in the `value` column is the instance name.
* `monagent.pipeline.ob.status`: specifies whether to collect metrics of seekdb. Set the value to `active` to enable the collection of metrics of seekdb.
* `agent.http.basic.auth.metricAuthEnabled`: specifies whether to enable basic authentication for the HTTP interface of obagent. Set the value to `false` to disable basic authentication for the HTTP interface of obagent.
The command output is as follows:
```shell
{"successful":true,"message":"success","error":""}
```
3. Start obagent
```shell
[root@test obagent]# bin/ob_agentctl start
```
The command output is as follows:
```shell
{"successful":true,"message":"ok","error":""}
```
### Verification
You can check whether obagent is started by viewing the process, or you can access the data query interface to verify whether you can obtain monitoring data.
* View the process.
```shell
[root@test obagent]# ps -ef | grep agent
```
The output is as follows:
```shell
root 27064 1 0 14:46 ? 00:00:00 /home/admin/obagent/bin/ob_agentd -c /home/admin/obagent/conf/agentd.yaml
root 27071 27064 0 14:46 ? 00:00:00 /home/admin/obagent/bin/ob_mgragent
root 27072 27064 0 14:46 ? 00:00:00 /home/admin/obagent/bin/ob_monagent
root 27116 26122 0 14:47 pts/0 00:00:00 grep --color=auto agent
```
* Access the data query interface.
```shell
[root@test obagent]# curl -L 'http://127.0.0.1:8088/metrics/ob/basic'
```
The output is as follows:
```shell
# HELP ob_active_session_num monitor collected message
# TYPE ob_active_session_num untyped
ob_active_session_num{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 0 1762135926015
# HELP ob_all_session_num monitor collected message
# TYPE ob_all_session_num untyped
ob_all_session_num{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 0 1762135926015
# HELP ob_plan_cache_access_total monitor collected message
# TYPE ob_plan_cache_access_total untyped
ob_plan_cache_access_total{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 33229 1762135926015
# HELP ob_plan_cache_hit_total monitor collected message
# TYPE ob_plan_cache_hit_total untyped
ob_plan_cache_hit_total{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 32051 1762135926015
# HELP ob_plan_cache_memory_bytes monitor collected message
# TYPE ob_plan_cache_memory_bytes untyped
ob_plan_cache_memory_bytes{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 1.15905078e+08 1762135926015
# HELP ob_server_num monitor collected message
# TYPE ob_server_num untyped
ob_server_num{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",obzone="",server_ips="127.0.0.1",status="ACTIVE",svr_ip="127.0.0.1",svr_port="2882"} 1 1762135926015
# HELP ob_sysstat monitor collected message
# TYPE ob_sysstat untyped
ob_sysstat{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",stat_id="10000",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 2673 1762135926015
ob_sysstat{app="OB",ob_cluster_id="0",ob_cluster_name="obcluster",ob_tenant_id="1",obzone="",stat_id="10001",svr_ip="127.0.0.1",svr_port="2882",tenant_name="sys"} 2.838626e+06 1762135926015
······# Subsequent outputs are omitted
```
## Configure Prometheus
For more information, visit the [Prometheus website](https://prometheus.io/) or [open source mirror](https://mirrors.aliyun.com/oceanbase/community/stable/). You can download and deploy the corresponding installation package of Prometheus based on the architecture of the environment in which you want to deploy Prometheus. Generally, one Prometheus instance is sufficient to monitor all seekdb instances. This section provides only a sample configuration. For more information, see [Prometheus documentation](https://prometheus.io/docs/prometheus/latest/getting_started/).
:::info
For more information about the Prometheus alerting rules provided by OceanBase, see the <a href="https://github.com/oceanbase/obdeploy/blob/master/plugins/prometheus/2.37.1/prometheus_rules.yaml">GitHub repository</a>.
:::
```shell
global:
scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 5s # Evaluate rules every 15 seconds. The default is every 1 minute.
# Alertmanager configuration, prometheus will push alerts to these addresses
alerting:
alertmanagers:
- static_configs:
- targets:
- localhost:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
- "prometheus_rules.yaml"
# - "second_rules.yml"
scrape_configs:
- job_name: "ob-basic"
metrics_path: "/metrics/ob/basic"
# Open the following configurations for Prometheus 3.x.
# fallback_scrape_protocol: PrometheusText0.0.4
static_configs:
- targets: ["127.0.0.1:8088"]
- job_name: "ob-extra"
metrics_path: "/metrics/ob/extra"
# prometheus 3.x needs to enable the following configuration.
# fallback_scrape_protocol: PrometheusText0.0.4
static_configs:
- targets: ["127.0.0.1:8088"]
- job_name: "ob-host"
metrics_path: "/metrics/node/host"
# Enable the following configuration for Prometheus 3.x:
# fallback_scrape_protocol: PrometheusText0.0.4
static_configs:
- targets: ["127.0.0.1:8088"]
```
After you configure Prometheus, you can access the Prometheus graphical interface, click **Status** in the left navigation pane, and select **Target** to check whether data is collected.
:::info
Different versions of Prometheus may have different interface terms. Therefore, <b>Target</b> is provided as an example only in this case.
:::
![Prometheus](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/SeekDB/obshell/900.configure-monitor-01.png)
### Configure Alertmanager
Go to [Prometheus](https://prometheus.io/) or [Open Source Mirror](https://mirrors.aliyun.com/oceanbase/community/stable/) and download and decompress the required installation package based on the architecture of your environment. Modify the configuration file (`alertmanager.yml`) as described in the [Alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/). Then, go to the working directory and run the following command to start Alertmanager:
```shell
[root@test alertmanager]# nohup ./alertmanager --config.file=alertmanager.yml --cluster.advertise-address=127.0.0.1:9093 > alertmanager.log 2>&1 &
```
In the example, `127.0.0.1:9093` indicates the service address, and `nohup` indicates that the alertmanager process is run in the background.