Grafana 何去何从;json:无法将字符串解组到Go结构字段Event.No中。排队的事件类型为uint64“;

Grafana 何去何从;json:无法将字符串解组到Go结构字段Event.No中。排队的事件类型为uint64“;,grafana,prometheus,exporter,maxscale,Grafana,Prometheus,Exporter,Maxscale,我正在尝试在我的本地环境中实现“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 uin

我正在尝试在我的本地环境中实现“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”是如何运作的,但这似乎是演员的问题

我已经安装了普罗米修斯,它正在运行。 我正在使用PMM工具包进入galera集群的站点(运行良好)[使用mysql\u exporter和linux]部分

我遵循了下面提到的说明

https://github.com/mariadb-corporation/maxscale_exporter
我无法集成这个maxscale exporter(我假设它应该像普罗米修斯的其他部分一样工作)并在grafana中显示良好

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


从go文件中提到的一堆变量和repo中提到的预期输出中,我只从maxscale中获得了4个变量。

如果您使用的是较新的maxscale版本,一些值已被删除,因为maxscale的改进使其过时。为导出程序编写的MaxScale版本可能具有不同的输出


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

这看起来像是一个解组错误。您是否检查了json端点是否正确(使用curl)?@MichaelDoubez我将curl设置为“curl”,并得到响应{“version”:“1.17.1”},我希望这就是您的意思。以及Maxscale statistics端点(端口8003)?