This topic describes the performance metrics related to the number of sessions within an OceanBase Database tenant. A session is a connection established between an application and a database. The related metrics include all_session and active_session. The all_session metric indicates the total number of sessions within the tenant and the active_session metric indicates the number of active sessions within the tenant. You can specify a statistical range to query the number of sessions in a single zone or on a single OBServer of an OceanBase Database tenant.
active_session
Definition
The number of active sessions within a tenant.
Description
| Metric | Metric name | Unit |
|---|---|---|
| active_session | active_session | N/A |
Calculation expression
sum(ob_active_session_num{@LABELS}) by (@GBLABELS)
all_session
Definition
The total number of sessions within a tenant.
Description
| Metric | Metric name | Unit |
|---|---|---|
| all_session | all_session | N/A |
Calculation expression
sum(ob_all_session_num{@LABELS}) by (@GBLABELS)