-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hey.
Just a quick note / remark / feature request : as is, this "bbox_exporter" does not work with most recent BBOX boxes.
Indeed, on my side i recently switched to the "fiber only" BBOX offer ;), and have received a "F@st5688b" one
With these specific versions :
Version du firmware opérationnel : 24.1.14
Date du firmware opérationnel : 27.08.2024
Version du firmware de secours : 24.1.14
Date du firmware de secours : 27.08.2024
Version du loader : 14.0.2
Version du loader : 24.0.2
Version du SPL : 3.6.2
Version du TPL : 3.6.2
Out of the box, this project fails with this BBOX / this firmware version ... but it's just a few changes here and there (especially some values reported previously by the API as "string" (like network speed, ...) are now reported as "int" or "float" (or the opposite), which is making the GO unmarshalling failing, and because of that, the whole exporter is stopping (that means, as soon as there is one single error somewhere, everything is discarded)).
Example of error :
bbox-exporter[3220432]: level=error ts=2024-12-19T21:28:15.106Z caller=exporter.go:88 msg="Bbox API error" err="device metrics : json: cannot unmarshal string into Go struct field .device.cpu.time.idle of type float64"
With extra logs :
Dec 19 22:28:15 saturne bbox-exporter[3220432]: [
Dec 19 22:28:15 saturne bbox-exporter[3220432]: {
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "device": {
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "cpu": {
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "time": {
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "total": 40045276,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "user": 20197296,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "nice": 5168,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "system": 19462924,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "io": 180,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "idle": "1237954511",
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "irq": 379888
Dec 19 22:28:15 saturne bbox-exporter[3220432]: },
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "process": {
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "created": 2714096,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "running": 1,
Dec 19 22:28:15 saturne bbox-exporter[3220432]: "blocked": 0
Dec 19 22:28:15 saturne bbox-exporter[3220432]: }
Dec 19 22:28:15 saturne bbox-exporter[3220432]: }
Dec 19 22:28:15 saturne bbox-exporter[3220432]: }
Dec 19 22:28:15 saturne bbox-exporter[3220432]: }
Dec 19 22:28:15 saturne bbox-exporter[3220432]: ]
(i had to add that kind of extra logs as without that, it was very difficult to diagnose / debug what was happening)
So i don't know what would be the best :
- have a "non blocking" behavior in case of errors ? (some metrics would be not available, but several ones would still be there)
- fork the repo - this one (as it is) for older boxes, and the new fork for newer boxes ?
- have different objects / structures inside the same project, for the various versions (maybe something "versioned" to be able to integrate future evolutions, if any)
- etc.
What is your view on that ?
Otherwise, with a few changes here and there in local, it's now working on my side (i can detail the changes if needed (like a diff / patch), but obviously, my changes at this time have "overridden" the compatibility with older boxes, and hence are probably not suitable as a pull request)
Also, as a side topic, I quickly started to recreate a GRAFANA dashboard (i've not been able to find any one published somewhere) :