-
Notifications
You must be signed in to change notification settings - Fork 64
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
自建Prometheus获取不到聚合指标 #7
Comments
First, check if aggregated metrics data can be pulled inside the container: curl -g 'http://{REPLACE_ME_WITH_PROMETHEUS_ADDRESS}/api/v1/query?query=cpu_usage_avg_5m' curl -g 'http://{REPLACE_ME_WITH_PROMETHEUS_ADDRESS}/api/v1/query?query=mem_usage_avg_5m' Then, check non-aggregated metrics data: curl -g 'http://{REPLACE_ME_WITH_PROMETHEUS_ADDRESS}/api/v1/query?query=up' If the non-aggregated metrics data is ok but non-aggregated metrics data cannot be pulled, it indicates that the prometheus rules does not take effect, please refer to https://prometheus.io/docs/prometheus/latest/configuration/configuration |
output error |
I made a mistake, the command should be curl -g 'http://{REPLACE_ME_WITH_PROMETHEUS_ADDRESS}/api/v1/query?query=up' |
|
I think you can increase second intervals of |
I have same Problem。kubernetes version:1.23.10,crane version: v0.5.1,crane-scheduler-controller:v0.1.23. I have checked the aggregated metrics data and non-aggregated metrics data, both can be obtained, and the modification interval of cpu_usage_active is 5s, but I still cannot obtain the data and annotate Node. W0319 15:26:24.293385 1 node.go:61] failed to sync this node ["kse2/cpu_usage_avg_5m"]: can not annotate node[kse2]: failed to get data cpu_usage_avg_5m{kse2=}: Could you help me @xieydd ,Thanks very much. |
你好,我也是遇到这个问题,进入到crane-scheduler-controller容器,可以获取到聚合数据,但是crane-scheduler-controller容器日志一直提示错误:I0330 13:18:01.658598 1 node.go:75] Finished syncing node event "cn-hangzhou.i-bp19r762s7xryoo6fjmx/mem_usage_avg_5m" (35.978µs) |
升级promeetheus和node-exporter至最新版本试下 |
@sdnmw 取不到值的原因是,crane会把nodename 转换为节点ip,用节点ip作为instance标签的值去Prometheus去查询的。 |
1、看crane-scheduler-controller日志发现聚合指标的监控项指标都获取不到
W0626 20:55:02.198329 1 node.go:61] failed to sync this node ["k8s-node4/mem_usage_avg_5m"]: can not annotate node[k8s-node4]: failed to get data mem_usage_avg_5m{k8s-node4=}:
2、
The text was updated successfully, but these errors were encountered: