Coder Social home page Coder Social logo

fritzbox_exporter's Issues

test fails

followed instructions: https://github.com/ndecker/fritzbox_exporter#building
but received error before using

 △ github.com/ndecker/fritzbox_exporter @ raspberrypi ./fritzbox_exporter -h                                                                                      master :: 784d :: ⬢
Usage of ./fritzbox_exporter:
  -gateway-address string
        The hostname or IP of the FRITZ!Box (default "fritz.box")
  -gateway-port int
        The port of the FRITZ!Box UPnP service (default 49000)
  -listen-address string
        The address to listen on for HTTP requests. (default ":9133")
  -test
        print all available metrics to stdout

 △ github.com/ndecker/fritzbox_exporter @ raspberrypi ./fritzbox_exporter -test                                                                                   master :: 784d :: ⬢
panic: EOF

goroutine 1 [running]:
panic(0x2d94e0, 0x10726058)
        /usr/lib/go-1.7/src/runtime/panic.go:500 +0x33c
main.test()
        /root/go/src/github.com/ndecker/fritzbox_exporter/main.go:285 +0xa8
main.main()
        /root/go/src/github.com/ndecker/fritzbox_exporter/main.go:312 +0x2c

Panic when network is unreachable

Would be nice to handle this without aborting the program. Happened after a reboot with the systemd service starting before the network was up. DNS resolution worked because it was done on the local box.

panic: Get http://fritz.box:49000/igddesc.xml: dial tcp 192.168.0.1:49000: connect: network is unreachable
goroutine 1 [running]:
panic(0x852280, 0xc8201108a0)
        /usr/lib/go/src/runtime/panic.go:481 +0x3e6
main.main()
        .../src/src/github.com/ndecker/fritzbox_exporter/main.go:250 +0xbf

Thanks for creating this by the way, it's a nice source of data for my Grafana dashboard (using it for used bandwidth, available DSL bandwidth & uptime)

Remote Monitoring?

Hello,

Is it possible to remote monitore a fritzbox with this exporter? Auf so, how can it be done using only the fritz box at the other network, no additional device.
Some Upnp Port opening on the fritzbox?

Hope to get some help thanks great work

Crashes at start: 606 - Action Not Authorized

I am using the latest published docker version and a 6660 (cable).
From the logs, it seems that the connection is properly established but it breaks right after.

LOG LEVEL READ FROM CONFIG
2021-09-02 20:11:10,168     INFO fritzexporter | registering 192.168.178.1 to collector
2021-09-02 20:11:10,984     INFO fritzexporter.fritzdevice | Connection to 192.168.178.1 successful, reading capabilities
2021-09-02 20:11:10,984    DEBUG fritzexporter.fritzcapability | Capability DeviceInfo set to {self.present} on device {device.host}
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/app/fritzexporter/__main__.py", line 74, in <module>
    main()
  File "/app/fritzexporter/__main__.py", line 58, in main
    FritzDevice(dev['hostname'], dev['username'], dev['password'], dev['name']))
  File "/app/fritzexporter/fritzdevice.py", line 35, in __init__
    self.capabilities = FritzCapabilities(self)
  File "/app/fritzexporter/fritzcapabilities.py", line 75, in __init__
    self.checkPresent(device)
  File "/app/fritzexporter/fritzcapabilities.py", line 99, in checkPresent
    self.capabilities[c].checkCapability(device)
  File "/app/fritzexporter/fritzcapabilities.py", line 46, in checkCapability
    device.fc.call_action(svc, action)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 227, in call_action
    return self.soaper.execute(service, action_name, arguments)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 238, in execute
    return handle_response(response)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 222, in handle_response
    raise_fritzconnection_error(response)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 147, in raise_fritzconnection_error
    raise exception(message)
fritzconnection.core.exceptions.FritzSecurityError: UPnPError: 
errorCode: 606
errorDescription: Action Not Authorized

Creating a Fork, reviving the project.

Hello everyone,

reading through the state of this repository, it seems like the author has moved on. Which is completely fine! I have much appreciation and would like to thank @ndecker a lot for the awesome project he has created!

I have not really found that many alternatives to this project. There are some projects like https://github.com/wbwue/FritzExporter by @wbwue or https://github.com/pdreker/fritzbox_exporter by @pdreker , which are worth exploring and contacting.

My go experience is only average, but I have several ideas on how to push this project forward. I would like to start by creating a fork and eventually finding a few co-maintainer. They should be OK with the PR-based workflow and have at least some existing FOSS-Contribution history, then I am happy to add them as maintainer to the fork.
The goal would be to get things into shape with fixes tests, moving from vendoring to go modules.

Then collect issues and existing PRs and throw everything into the coming Hacktoberfest and hack on it.

With this issue I want to call out of anyone interested in helping or maybe there is already such an ongoing effort I have overlooked!

Happy to hear from anyone.

I'll do the next steps hopefully by the weekend.

Release Package no usable

Maybe it is due to my lack of understanding of the GO language, but downloading and trying to use your release packe does not seem possible.

package .
imports ./vendor/github.com/prometheus/client_golang/prometheus: must be imported as github.com/prometheus/client_golang/prometheus

If I get all of that right it means I have to install directly from GitHub. So what is the purpose of the release package?

I prefer release packages as they ensure if I have them stored locally I can re-use them 10 years from now, weather you deleted your project or not.

Please advise if this is just my lack of understanding.

Chances to get the PRs merged?

Hi,

found this project today and noticed that there are some interesting PRs pending and some other forks ongoing...

Hence the question if the PRs will be merged or if this fork is sort of abandoned?

TIA

/tklein

Incompatible with latest go versions

Hi,

go get github.com/ndecker/fritzbox_exporter

works under

  • ubuntu 20.04 with ubuntu-packaged go 1.13.8
  • alpine 3.13 with go 1.15.12

but not with

  • alpine 3.14 with go 1.16.5
  • ubuntu 20.04 with snap package go 1.16.6

Error message in both cases:

go/pkg/mod/github.com/ndecker/[email protected]/main.go:326:26: undefined: prometheus.Handler

Idea: Allow to scrape multiple fritzboxes

Currently the exporter can connect to exactly one fritzbox. So in order so monitor multiple devices multiple exporters need to be setup. And a new port assigned to each.

Other exporters that pull in metrics from other sources like the snmp_exporter or the blackbox_exporter allow to fetch from multiple sources at once.

I propose to extend the exporter to support multiple devices with a single process.
Most probaly the best way would be through a config file specifying which fritz boxes to scrape or torough paramters sent from prometheus like it is done for blackbox_exporter. So something like: http://localhost:9133/probe?address=fritz.box&port=49000.

Does this feature make sense or does it just over complicate stuff?

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.