Smit Shah
Smit Shah

Reputation: 344

HO to fix "json: cannot unmarshal string into Go struct field Event.No. Events Queued of type uint64"

I am trying to implement "maxscale_exporter" in my local env. but I am not get all status in Prometheus which is related to maxscale, I am also getting some repetitive error like below.

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

I don't know how "go lang" works but it's seems like casting issue.

I have installed Prometheus which is up and working. I am using PMM tool kit to get in site of galera cluster (which is working fine)[with mysql_exporter and linux] section.

I had followed instruction which is mention in below

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

I am not able to integrate this maxscale exporter(I am assuming It should be working just like other section in Prometheus) and display fine in grafana.

"maxscale_exporter" should be also working fine just like "mysqld_exporter"

I only get 4 variables from maxscale out of bunch of variables which is mention in that go file and expected output which is mention in repo.

Upvotes: 2

Views: 4099

Answers (1)

markusjm
markusjm

Reputation: 2562

If you are using a newer MaxScale version, some of the values have been removed as they were made obsolete by improvements in MaxScale. It is possible that the MaxScale version that the exporter was written for has different output.

I'd recommend removing any of the code that causes those errors and see if that fixes it.

Upvotes: 1

Related Questions