Comments (10)
Thanks Patrick,
Fritz!Box upgrade seems not available. Maybe only in Germany ?
fritzconnection python module downgrade did not help.
But shortening the password to 12 characters did it !
The script starts without error, and is working:
root@prometheus:/opt/fritzbox_exporter# lsof -Pni | grep python.*LISTEN
python 31763 root 4u IPv4 29204367 0t0 TCP *:9787 (LISTEN)
root@prometheus:/opt/fritzbox_exporter# curl http://localhost:9787/metrics
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 98.0
python_gc_objects_collected_total{generation="1"} 291.0
python_gc_objects_collected_total{generation="2"} 0.0
Thanks for you help !
P.S.: I updated to the current version (fritzconnection==1.4.0) and it works as well. So, definitely a password problem.
from fritz_exporter.
Normally that's what happens, if the login did not succeed, as you already hinted at.
I'm speculating here, but any "funny" characters in the password? If so, could you try "pure" alphanumerical, just to see, if that's it?
Also the example from the REPL does not explicitly use authentication (unless, you have the appropriate environment vars set, which are different from the the exporter.
Could you try logging in directly from the python shell:
fc = FritzConnection(address='192.168.178.1', user='monitoring', password='YOUR_PASSWORD')
Also: i've been "shoving" the code around a bit today, depending on when you downloaded it, I might have broken something. I'll check that on my end, but the actual exporter should not have taken a hit...
from fritz_exporter.
Thanks Patrick,
The password is exclusively alphanumeric. To compensate it's longer...
In [4]: len(password)
Out[4]: 32
In [5]: from fritzconnection import FritzConnection
In [6]: fc = FritzConnection(address='192.168.178.1', user='monitoring', password=password)
In [7]: fc.modelname
Out[7]: 'FRITZ!Box 7530'
from fritz_exporter.
Could you try downgrading fritzconnection to 1.2.1 (before 1.3.0, to be precise)?
I have a hunch, that this might be connected to kbr/fritzconnection#82 (Older FritzOS Version... you are running 7.13, while 7.21 is current).
Checking on my end the current master branch works for me in docker as well as native on my Macbook against my 7590 with 7.21.
from fritz_exporter.
I have a hunch, that this might be connected to kbr/fritzconnection#82 (Older FritzOS Version... you are running 7.13, while 7.21 is current).
I'll state the obvious, just for completeness: upgrading Fritz!OS may also be an option... But I won't be the guy saying "Upgrade, closed" ;-)
from fritz_exporter.
I found another vector: Could you please check that under "network settings" (My Fritz!Box runs german locale... There it is under "Heimnetz" (Home Network?) -> Netzwerk (Network) -> Netzwerkeinstellung (Tab at the top - network settings)) you have enabled "access for applications" and "statusinformation using UPnP"? To my understanding "access for applications" should be enough, but both are mentioned in the context of fritzconnection.
from fritz_exporter.
Thanks Patrick,
Those are default options (that I did not changed):
I'll check for upgrading the Fritz!Box first. But when I checked this afternoon it just shows it's up to date and there's no higher version... I'll check again.
from fritz_exporter.
Check https://avm.de/nc/service/downloads/productsupport//fritzbox-7530/, that where I have the information, that 7.21 is available for the 7530.
No guarantees though.
Please report back.
from fritz_exporter.
Here's another one to test:
Go into python shell und try the following sequence using fritzconnection:
from fritzconnection import FritzConnection
fc = FritzConnection(address='192.168.178.1', user='monitoring', password=password)
fc.call_action('DeviceInfo:1', 'GetInfo')
This should return a dictionary containing basic information about the FritzBox (model name, serial, software version, uptime). The reasoning behind this is that this is the exact call in the exporter, which triggers the error and is actually the first communication the exporters makes with the box.
I still find it interesting, that the fritzconnection module seems to work but then the first basic call to the box fails with "401 Unauthorized". I have also checked the AVM documentation, and the error can mean several things, only one of which actually is "Unauthorized". In the "call_action context it can also mean that the action called is unknown or obsolete.
TR064 normally requires some kind of "discovery" and the exporter (currently) just blindly uses whatever my 7490/7590 returned to test calls.
Could you maybe simply do a curl 192.168.178.1:49000/tr64desc.xml
and put the resulting XML up somewhere and link it here? This basically contains a description of protocol information and what services are actually available on your box.
from fritz_exporter.
Closed
from fritz_exporter.
Related Issues (20)
- a lot duplicate metrics when FRITZ_HOST_INFO is enabled HOT 5
- develop @748beb8 does not honor log_level from config file.
- Yet another dashboard for Grafana HOT 6
- No cable data for FritzBox 6660 Cable HOT 15
- Exporter does not handle devices which disappear
- Set default wifi HOT 2
- Docker image can't be build out of the box HOT 2
- Fritzbox 7270 UPnPError: 402 Invalid Args HOT 2
- Counter for fritz_wan_data_bytes_total sometimes going backwards (not due to counter reset) HOT 8
- Possible implementation of Smart Home metrics? HOT 7
- Is there a way to get window/door sensor readings? HOT 16
- AttributeError: 'NoneType' object has no attribute 'strip'
- 2.3.0 packaged, tests fine, doesn't start HOT 6
- Additional Fritz!Box Fiber metrics HOT 4
- Feature idea - Export DSL syncronisations HOT 2
- Invalid GMT offset HOT 3
- Reading AHA/Homeautomation stats seems to be really slow HOT 2
- Wifi Load
- v2.1.0 HostInfo Capability enabled HOT 1
- Capability merging may be redundant
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fritz_exporter.