grafana - HO 修复“json:无法将字符串解组到 Go struct 字段 Event.No. uint64 类型的排队事件”
问题描述
我正在尝试在我的本地环境中实现“maxscale_exporter”。但是我没有在 Prometheus 中获得与 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”一样工作正常
我只从 go 文件中提到的一堆变量和 repo 中提到的预期输出中从 maxscale 中得到 4 个变量。
解决方案
如果您使用的是较新的 MaxScale 版本,则某些值已被删除,因为它们已因 MaxScale 的改进而过时。为导出器编写的 MaxScale 版本可能具有不同的输出。
我建议删除任何导致这些错误的代码,看看是否可以修复它。
推荐阅读
- android - 我需要一个设置注册按钮的解决方案,检查第 7 行,注册活动在 Android Studio 上显示为红色
- tumblr - 如何摆脱 tumblr 上照片转发页面上的转发/点赞历史记录?
- solr - 返回 solr 中一个文档的扩展结果
- xml - 为 Dynamics 365 执行 XML xrmtoolbox 出现错误“字典中不存在给定的键”
- java - 如何编写代码(当按下回车键时会显示下一个)java
- excel - 在 VBA Excel 中创建插入语句
- javascript - 克隆时如何修改对象的值?
- matlab - Matlab中矩阵的最大尺寸
- ssh - 一种使用 ssh 将特定文件从树莓派传输到应用程序的方法
- ios - 快速突出显示所选单元格的内容视图