pdreker / fritz_exporter

Prometheus exporter for Fritz!Box home routers
Other
144 stars 32 forks source link

Reading AHA/Homeautomation stats seems to be really slow #310

Open pdreker opened 3 months ago

pdreker commented 3 months ago

The current implementation (as of 2.4.3) of the homeautomation metrics makes several calls to the box per device found, which adds up to 20-30s per scrape, which may hit the Prometheus scape_timeout.

The code needs to be optimized, as it currently is pretty naive. AHA devices should prpbably only be scraped using the HTTP API and not a combination of TR-064 and HTTP to reduce the number of calls.

Also see the discussion in #303.

r0ckarong commented 3 months ago

Just to mention here, the FB I'm testing against is a 7530 on a 1 Gbit Ethernet connection. I have very little info to go on what the CPU difference between models is.

pdreker commented 3 months ago

This was not to say, that Fritz boxes are slow, just that they maybe too slow, if the exporter does not try to be "smarter" when reading the stats. ;-)