Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add space level metrics #1365

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ Graph 服务提供了两份初始配置文件`nebula-graphd.conf.default`和`neb
| ------------------- | ------------------------ | ------------------------------------------ |
| `system_memory_high_watermark_ratio` | - |内存高水位报警机制的触发阈值,默认为`0.9`。系统内存占用率高于该值会触发报警机制,Nebula Graph 会停止接受查询。|

## metrics 配置

| 名称 | 预设值 | 说明 |
| ------------------- | ------------------------ | ------------------------------------------ |
| `enable_space_level_metrics` | `false` | 开启后可打开图空间级别的监控,对应的监控指标名称中包含图空间的名称,例如`query_latency_us{space=basketballplayer}.avg.3600`。支持的监控指标可用`curl`命令查看,详细说明参见[查询监控指标](../../6.monitor-and-metrics/1.query-performance-metrics.md)。 |

## experimental 配置

| 名称 | 预设值 | 说明 |
Expand Down
10 changes: 10 additions & 0 deletions docs-2.0/6.monitor-and-metrics/1.query-performance-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ Nebula Graph 的每个监控指标都由三个部分组成,中间用英文句
|统计类型|`sum`|指标统计的方法。当前支持 SUM、COUNT、AVG、RATE 和 P 分位数(P75、P95、P99、P99.9)。|
|统计时间|`600`|指标统计的时间范围,当前支持 5 秒、60 秒、600 秒和 3600 秒,分别表示最近 5 秒、最近 1 分钟、最近 10 分钟和最近 1 小时。|

### 图空间监控指标

Graph 服务支持一系列基于图空间的监控指标(Space Level Metrics),对不同图空间的数据分别记录。

图空间指标的名称中以`{space=space_name}`的形式包含图空间名,例如`query_latency_us{space=basketballplayer}.avg.3600`。

如需开启图空间监控指标,先在 Graph 服务的配置文件中将`enable_space_level_metrics`参数的值修改为`true`,再启动 Nebula Graph。修改配置的详细方式参见[配置管理](../5.configurations-and-logs/1.configurations/1.configurations.md)。

支持的图空间指标可根据下方的说明用 `curl` 命令查询。

## 通过 HTTP 端口查询监控指标

### 语法
Expand Down