边缘部署,指标等正常,页面机器列表中无对应主机

Viewed 27

版本:6.7.3

categraf 指向 edge后,指标等数据可以正常采集,但在页面的机器列表中无对应主机,同时edge中出现报错:ERROR idents/idents.go:82 failed to update targets: unexpected status code: 401。

categraf 配置如下:

[[writers]]
url = "http://127.0.0.1:19000/prometheus/v1/write"

# Basic auth username
basic_auth_user = ""

# Basic auth password
basic_auth_pass = ""

......

[heartbeat]
enable = true

# report os version cpu.util mem.util metadata
url = "http://127.0.0.1:19000/v1/n9e/edge/heartbeat"

# interval, unit: s
interval = 10

# Basic auth username
basic_auth_user = ""

# Basic auth password
basic_auth_pass = ""
1 Answers

n9e 的配置文件里有个 HTTP.APIForService.BasicAuth 配置了各个服务访问 n9e 的接口所需的认证信息,n9e-edge 需要访问 n9e ,所以 n9e-edge 的配置文件中要配置 n9e 的 url 和认证信息,和 HTTP.APIForService.BasicAuth 中指定的认证信息一致