saphoooo / freebox_exporter

A prometheus exporter for freebox stats
Apache License 2.0
52 stars 26 forks source link

DSL metrics: cannot unmarshal object into Go struct field .result.data #47

Open bbc2 opened 4 years ago

bbc2 commented 4 years ago

I've just tried this exporter and I get the following error each time the program queries the Freebox:

2020/10/25 12:45:46 An error occured with DSL metrics: json: cannot unmarshal object into Go struct field .result.data of type []map[string]int64

I compiled 62a0ffdc3d6d930cb7d7d72177f5b2031f8ed088 locally for amd64.

Freebox:

Version du microgiciel: 4.2.5 Version du matériel: Freebox Server (r2) Type de connexion: FTTH

saphoooo commented 4 years ago

I will check

kwa29 commented 3 years ago

Thanks @saphoooo and same issue on my side where I got a 404 page not found at the end

Bono2007 commented 3 years ago

Bonjour, An error occured with freeplug metrics: json: cannot unmarshal object into Go struct field freeplug.result of type []main.freeplugNetwork de mon côté, Freebox Delta (autorisation qui ne passe pas non plus). Merci

saphoooo commented 3 years ago

Bonjour, ces prochains temps je n'aurai pas le temps de traiter les issues car très occupé ailleurs. Je t'invite si possible à proposer une PR. Sinon il faudra attendre un peu pour que je libère un peu de temps pour que je regarde.

arnaudmut commented 3 years ago

I've just tried this exporter and I get the following error each time the program queries the Freebox:

2020/10/25 12:45:46 An error occured with DSL metrics: json: cannot unmarshal object into Go struct field .result.data of type []map[string]int64

I compiled 62a0ffd locally for amd64.

Freebox:

Version du microgiciel: 4.2.5 Version du matériel: Freebox Server (r2) Type de connexion: FTTH

I had to add -fiber argument and the error disappeared. Type de connexion: FTTH

saphoooo commented 3 years ago

The fiber flag disable DSL metrics, that's why the error disappear with this flag turned on

You can turn on the debug flag an give me the output of the response body

h4wkmoon commented 3 years ago

voici. Bien entendu, ça se répète en boucle.

2021/09/14 11:42:39 {"success":true,"result":{"date_start":1631619740,"data":{},"date_end":1631619751}} 2021/09/14 11:42:39 An error occured with DSL metrics: json: cannot unmarshal object into Go struct field .result.data of type []map[string]int64