HO修复“json:无法将字符串解组为Go struct field Event.No。排名类型为uint64的事件“

问题描述 投票:1回答:1

我想在我的本地环境中实现“maxscale_exporter”。但我并没有得到普罗米修斯与maxscale相关的所有状态,我也得到了一些重复的错误,如下所示。

json: cannot unmarshal string into Go struct field Status.Value of type float64
json: cannot unmarshal string into Go struct field Event.No. Events Queued of type uint64
json: cannot unmarshal string into Go struct field Server.Port of type int
json: cannot unmarshal string into Go struct field Service.No. Sessions of type float64
json: cannot unmarshal string into Go struct field Status.Value of type float64
json: cannot unmarshal string into Go struct field Event.No. Events Queued of type uint64
json: cannot unmarshal string into Go struct field Server.Port of type int
json: cannot unmarshal string into Go struct field Service.No. Sessions of type float64

我不知道“go lang”是如何工作的,但它似乎是铸造问题。

我安装了Prometheus,它正常运行。我正在使用PMM工具包进入galera集群的网站(工作正常)[与mysql_exporter和linux]部分。

我遵循了下面提到的指示

https://github.com/mariadb-corporation/maxscale_exporter

我无法集成这个maxscale导出器(我假设它应该像Prometheus中的其他部分一样工作)并且在grafana中显示正常。

“maxscale_exporter”也应该像“mysqld_exporter”一样正常工作

我只从变量串中获得了4个变量,这些变量在go文件中提到,并且在repo中提到了预期的输出。

grafana prometheus exporter maxscale
1个回答
0
投票

如果您使用的是较新的MaxScale版本,则某些值已被删除,因为它们已被MaxScale中的改进淘汰。编写导出器的MaxScale版本可能具有不同的输出。

我建议删除导致这些错误的任何代码,看看是否修复了它。

© www.soinside.com 2019 - 2024. All rights reserved.