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

categraf版本升级后采集的es指标lable标签不兼容 #1105

Open
gpfhaha opened this issue Dec 9, 2024 · 10 comments
Open

categraf版本升级后采集的es指标lable标签不兼容 #1105

gpfhaha opened this issue Dec 9, 2024 · 10 comments

Comments

@gpfhaha
Copy link

gpfhaha commented Dec 9, 2024

场景:
categraf V0.2.35升级之后categraf V0.3.82
仪表盘无法展示对应的指标数据
问题:
发现升级之后采集的指标标签字段发生变化,无法兼容
截图如下:
image
image

@kongfei605
Copy link
Collaborator

两个修改方式,一个是把大盘中老的label修改为新的label。 另一个是采集端 配置relable,把采集端的label修改为和大盘一样的relabel。

relabel是用的prometheus的relabel语法,找个在线的网站转为toml格式即可。
如下,是将cluster_name 修改为cluster的一个例子

[[instances.relabel_configs]]
source_labels = [ "cluster_name"]
target_label = "cluster"
action = "replace"

@gpfhaha
Copy link
Author

gpfhaha commented Dec 9, 2024

有对应标签更新的changelog吗?我根据changelog直接批量处理好了,不然我到仪表盘里面一个一个找才行

@kongfei605
Copy link
Collaborator

有对应标签更新的changelog吗?我根据changelog直接批量处理好了,不然我到仪表盘里面一个一个找才行

https://github.com/flashcatcloud/categraf/blob/main/inputs/elasticsearch/README.md

@gpfhaha
Copy link
Author

gpfhaha commented Dec 9, 2024

有对应新版本仪表盘的json嘛,我直接使用https://github.com/flashcatcloud/categraf/blob/main/inputs/elasticsearch/dashboard.json 这个的似乎并不能直接使用(夜莺里面)
导入时候的提示:
image
按照提示操作之后,读取不到任何数据
image

@kongfei605
Copy link
Collaborator

仪表盘现在都在n9e的integration中

@gpfhaha
Copy link
Author

gpfhaha commented Dec 9, 2024

这里我也看了下,对应修改的指标名的,json里面并没有更新成新的指标,我先自己处理下吧
image
image

@gpfhaha
Copy link
Author

gpfhaha commented Dec 9, 2024

对应的json里面lable用到的service,现在采集的指标中也是没有的。。。都是cluster

@kongfei605
Copy link
Collaborator

service这种可以配置文件中添加。labels= { servcie=“自定义label” }

@gpfhaha
Copy link
Author

gpfhaha commented Dec 9, 2024

太多这种场景了。。。。我还是根据https://github.com/flashcatcloud/categraf/blob/main/inputs/elasticsearch/README.md
这个重新自定义仪表盘吧

@kongfei605
Copy link
Collaborator

欢迎把新仪表盘提个PR,方便其他后续用户

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

2 participants