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

Update 2.rocksdb-statistics.md #1091

Merged
merged 1 commit into from
Oct 26, 2021
Merged
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
17 changes: 12 additions & 5 deletions docs-2.0/6.monitor-and-metrics/2.rocksdb-statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Nebula Graph 使用 RocksDB 作为底层存储,本文介绍如何收集和展

RocksDB 统计功能默认关闭,启动 RocksDB 统计功能,你需要:

1. 修改 `storaged.conf` 文件中 `--enable_rocksdb_statistics` 参数为 `true`。配置默认文件目录为 `/use/local/nebula/etc`。
1. 修改 `nebula-storaged.conf` 文件中 `--enable_rocksdb_statistics` 参数为 `true`。配置默认文件目录为 `/use/local/nebula/etc`。

2. 重启服务使修改生效。

Expand Down Expand Up @@ -49,12 +49,19 @@ rocksdb.bytes.read=1632

使用以下命令获取部分 JSON 格式的 RocksDB 统计信息:
```bash
curl -L "http://${storage_ip}:${port}/rocksdb_stats?stats=${stats_name}.&returnjson"
curl -L "http://${storage_ip}:${port}/rocksdb_stats?stats=${stats_name}&format=json"
```

例如使用以下语句获取 `rocksdb.bytes.read` 和 `rocksdb.block.cache.add`的统计信息并返回 JSON 的格式数据。
```bash
curl -L "http://172.28.2.1:19779/rocksdb_stats?stats=rocksdb.bytes.read,rocksdb.block.cache.add&returnjson"

[{"value":14,"name":rocksdb.block.cache.add},{"value":1632,"name":"rocksdb.bytes.read"}]
curl -L "http://172.28.2.1:19779/rocksdb_stats?stats=rocksdb.bytes.read,rocksdb.block.cache.add&format=json"

[
{
"rocksdb.block.cache.add": 1
},
{
"rocksdb.bytes.read": 160
}
]
```