DRuggeri / netgear_exporter

A Prometheus exporter for Netgear consumer routers
Other
31 stars 6 forks source link

Rate limits #6

Closed bwees closed 3 years ago

bwees commented 4 years ago

Do you know if there are rate limits on the router's soap server? I have been pinging it every 15 sec to be able to do some bandwidth calculations and there are "holes" in the data where it times out, I have the timeout set to 5 seconds. Here is the errors that I get:

level=error msg="Error while collecting client statistics: Post \"http://10.0.1.1/soap/server_sa/\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" source="clients_collector.go:122"

and

level=error msg="Error while collecting system info: The netgear_client is not logged in!" source="system_info_collector.go:110"

the Netgear_client login error does not appear frequently, about 1 time for every 10 of the first error.

DRuggeri commented 4 years ago

Hi there, @jcwimer. I can't say I'm an expert in their SOAP API server since, at least at the time I wrote this exporter, they still have not published any consumer information.

Based on my own experiences with the Orbi platform, I would be surprised if the SOAP server maintained a rate limiter... in my own experiences, it is very possible to overload the CPU on the router by scraping a lot of extra metrics. I saw this on my own network when enabling the client information for this exporter, for example. When enabled, I would see random network dropouts that coincided with scrapes. Do you happen to have client information being scraped, too? Have you tried tweaking the timeout at all?

bwees commented 4 years ago

I tweaked the timeout to 15s as it would take 11.5s on average to complete a request if I went to it from a browser or a curl. I am working now to restrict the info to only traffic info as I do not need anything else and I remember seeing that the router was at 75% CPU when I scrolled through the text sent back. Thanks for that tip. I will close this issue if that solves this.

bwees commented 4 years ago

How does the filter work with the --filter.collectors="" parameter? If I put in just "traffic" would I get traffic only or would it not get traffic?

bwees commented 4 years ago

I tried adding --filter.collectors="Traffic" to the command but I get the following error:


time="2020-11-04T01:29:19Z" level=error msg="Collector filter \"Traffic\" is not supported" source="netgear_exporter.go:189" ```
DRuggeri commented 3 years ago

Thanks, @bwees - you're correct - the --filter.collectors parameter is an inclusion list of filters to use. I can't duplicate the second report that the Traffic collector doesn't work. Can you confirm the version of the exporter you're running? I don't recall a bug with that ever not working...

bwees commented 3 years ago

I am using version 1.0.1 according to the output of the command.

DRuggeri commented 3 years ago

Hrm... that's.... odd. I don't recall ever releasing a 1.0.1. I just pushed 2.0.0 earlier today. Maybe give that one a try to see if that has the same issue?

DRuggeri commented 3 years ago

I'll go ahead and close this in the hopes that everything's square. If that's not accurate, feel free to add a comment and let me know what your results are.