Code Monkey home page Code Monkey logo

Comments (7)

DRuggeri avatar DRuggeri commented on July 28, 2024

Hi there, @DanielYWoo - yes, definitely. You can use the --clientdebug option when starting the exporter or set the environment variable NETGEAR_EXPORTER_CLIENT_DEBUG=true.

from netgear_exporter.

DanielYWoo avatar DanielYWoo commented on July 28, 2024

I use the R8000P as a fat AP and its login address is 10.0.0.5.
firmware version: V1.4.1.50_1.3.10

export NETGEAR_EXPORTER_URL=http://10.0.0.5
export NETGEAR_EXPORTER_USERNAME=xxx
export NETGEAR_EXPORTER_PASSWORD=xxx
export NETGEAR_EXPORTER_CLIENT_DEBUG=true

Then the response code shows "content-type: text/html" instead of xml, the response body is not printed anyway. I hope the response body is printed even the response code is not 2xx.

2020/04/03 00:09:15 netgear_client.go: Response code: 401
2020/04/03 00:09:15 netgear_client.go: Response headers:
2020/04/03 00:09:15 netgear_client.go:   Www-Authenticate: Basic realm="NETGEAR R8000P"
2020/04/03 00:09:15 netgear_client.go:   X-Frame-Options: SAMEORIGIN
2020/04/03 00:09:15 netgear_client.go:   Set-Cookie: XSRF_TOKEN=1363636311; Path=/
2020/04/03 00:09:15 netgear_client.go:   Content-Type: text/html
ERRO[0011] Error while collecting traffic statistics: XML syntax error on line 4: element <meta> closed by </head>  source="traffic_collector.go:126"

Then I tried the python version and it seems work:

python -m pynetgear --password xxx  --user xxx --host 10.0.0.5  --no-ssl login
{"result": true}

So I guess this is the go version client problem? If you can print non-200 response body with debug mode, it would be cool

from netgear_exporter.

AndreyNikiforov avatar AndreyNikiforov commented on July 28, 2024

@DanielYWoo try using 5000 port for communicating with router, e.g. --url="http://routerlogin.com:5000"

from netgear_exporter.

DanielYWoo avatar DanielYWoo commented on July 28, 2024

@AndreyNikiforov thanks, it looks better now. 401 is gone but now I see new errors.

ERRO[0080] Error while collecting system info: Post http://10.0.0.5:5000/soap/server_sa/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)  source="system_info_collector.go:110"
ERRO[0080] Error while collecting client statistics: Post http://10.0.0.5:5000/soap/server_sa/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)  source="clients_collector.go:122"

from netgear_exporter.

AndreyNikiforov avatar AndreyNikiforov commented on July 28, 2024

@DanielYWoo I saw these errors in a log once or twice. Did not get a chance to dig deeper and now they are gone. I don't think I changed anything (other than restarting)

from netgear_exporter.

AndreyNikiforov avatar AndreyNikiforov commented on July 28, 2024

@DanielYWoo also try NETGEAR_EXPORTER_TIMEOUT: 10

from netgear_exporter.

DanielYWoo avatar DanielYWoo commented on July 28, 2024

@AndreyNikiforov don't understand why it takes 7 seconds to get the response, but it works with 10 seconds timeout settings, thanks alot!

from netgear_exporter.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.