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

pika exporter has error when rocksdb conf not enable #1981

Closed
machinly opened this issue Sep 13, 2023 · 1 comment
Closed

pika exporter has error when rocksdb conf not enable #1981

machinly opened this issue Sep 13, 2023 · 1 comment
Assignees

Comments

@machinly
Copy link
Collaborator

machinly commented Sep 13, 2023

当 pika 实例的地址是域名时,请求 exporter 会有下面的错误。
image

metrics 可以正常返回

# TYPE pika_used_memory gauge
pika_used_memory{addr="pika-cluster-pika-group-1-0.pika-cluster-pika-group-1-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-1-1.pika-cluster-pika-group-1-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-2-0.pika-cluster-pika-group-2-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-2-1.pika-cluster-pika-group-2-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-3-0.pika-cluster-pika-group-3-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-3-1.pika-cluster-pika-group-3-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-4-0.pika-cluster-pika-group-4-headless.default.svc:9221",alias=""} 20480
pika_used_memory{addr="pika-cluster-pika-group-4-1.pika-cluster-pika-group-4-headless.default.svc:9221",alias=""} 20480
@machinly machinly changed the title pika exporter pika exporter has some issue for supporting domain addresses. Sep 13, 2023
@machinly machinly self-assigned this Oct 13, 2023
@machinly machinly changed the title pika exporter has some issue for supporting domain addresses. pika exporter has error when rocksdb conf not enable Oct 20, 2023
@machinly
Copy link
Collaborator Author

问题不是由域名引起的,是因为注册了未使用的 metrics 项目引起的。
由以下两个因素叠加导致。

  1. 当 info.toml 中的
  • rocksdb 为 false 时,exporter 通过info命令 pika 信息。
  • rocksdb 为 true时,会使用 info all。
  1. rocksdb 的 metrics 匹配会始终注册。

所以,当 rocksdb 选项为 false 时,exporter 拿不到 rocksdb 的信息,所以匹配失败报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant