Closed Ldwg2002 closed 1 year ago
As all here, I have one fritzbox as router (with wifi), 7490. Since I deploy a Debian-based NAS (OpenMediaVault6) I would like to monitor this fritzbox with these plugins and munin. Despite the miserable documentation part 'installation' as far as details are concerned, it's easy. Only because I found the old 'Update README' https://github.com/oe73773/fritzbox-munin#installation--configuration I was able to run monitoring for at least four fritzboxes >=06.87.
Two years ago I configured a bunch of elder fritzboxes as 'real' access point (IP-Client-Modus, the yellow RJ45 row is a switch, one cable connects to the LAN for the backhaul) for around 20 people and it works fine, including a concept of permissions and access control. Only fritzbox _traffic, _wifi_devices, _cpu_temperature, _cpu_usage, _memory_usage are expected from the access points. _traffic is expected empty, because the switch carries the backhaul into the LAN.
The errors from misconfig above, like server = os.environ["fritzbox_ip"] KeyError: 'fritzbox_ip'
, I solved with the afore mentioned old 'Update README' and found the correct configuration of the plugins for munin now.
Starting with the three access points >= 06.87 out of seven (some very old ones)
**fw41-7390os0687**
**fw42-7272os0688** fw43-7270v3os0606
**fw44-7272os0688** fw45-7270v3os0606
fw46-3270v3os0554 fw47-3131os0457
now I really have all used five plugins broken_wifi_devices _cpu_usage _traffic _cpu_temperature _memory_usage
No problems I expected with 7390 listed compatible and 7272 with os06.88, but surprise, surprise. Any help or bugfixing is appreciated.
Resolved [*]:4949 to [::]:4949, IPv6
Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::] IPv6
Binding to TCP port 4949 on host :: with IPv6
Setting gid to "0 0"
2023/01/11-00:00:01 CONNECT TCP Peer: "[::ffff:127.0.0.1]:56822" Local: "[::ffff:127.0.0.1]:4949"
2023/01/11-00:00:01 CONNECT TCP Peer: "[::ffff:127.0.0.1]:56836" Local: "[::ffff:127.0.0.1]:4949"
2023/01/11-00:00:01 CONNECT TCP Peer: "[::ffff:127.0.0.1]:56824" Local: "[::ffff:127.0.0.1]:4949"
2023/01/11-00:00:01 CONNECT TCP Peer: "[::ffff:127.0.0.1]:56818" Local: "[::ffff:127.0.0.1]:4949"
2023/01/11-00:00:01 CONNECT TCP Peer: "[::ffff:127.0.0.1]:56846" Local: "[::ffff:127.0.0.1]:4949"
2023/01/11-00:00:01 CONNECT TCP Peer: "[::ffff:127.0.0.1]:56858" Local: "[::ffff:127.0.0.1]:4949"
2023/01/11-00:00:04 [143010] Error output from fw41_wifi_devices:
2023/01/11-00:00:04 [143010] Couldn't retrieve connected fritzbox wifi devices
2023/01/11-00:00:04 [143010] Service 'fw41_wifi_devices' exited with status 1/0.
2023/01/11-00:00:04 [143012] Error output from fw44_cpu_usage:
2023/01/11-00:00:04 [143012] Couldn't retrieve fritzbox cpu usage
2023/01/11-00:00:04 [143012] Service 'fw44_cpu_usage' exited with status 1/0.
2023/01/11-00:00:05 [143011] Error output from fw42_wifi_devices:
2023/01/11-00:00:05 [143011] Couldn't retrieve connected fritzbox wifi devices
2023/01/11-00:00:05 [143011] Service 'fw42_wifi_devices' exited with status 1/0.
2023/01/11-00:00:05 [143010] Error output from fw41_traffic:
2023/01/11-00:00:05 [143010] Couldn't retrieve fritzbox traffic
2023/01/11-00:00:05 [143010] Service 'fw41_traffic' exited with status 1/0.
tail: /var/log/munin/munin-node.log: Datei abgeschnitten
2023/01/11-00:00:08 [143010] Error output from fw41_cpu_usage:
2023/01/11-00:00:08 [143010] Couldn't retrieve fritzbox cpu usage
2023/01/11-00:00:08 [143010] Service 'fw41_cpu_usage' exited with status 1/0.
2023/01/11-00:00:09 [143012] Error output from fw44_wifi_devices:
2023/01/11-00:00:09 [143012] Couldn't retrieve connected fritzbox wifi devices
2023/01/11-00:00:09 [143012] Service 'fw44_wifi_devices' exited with status 1/0.
2023/01/11-00:00:10 [143010] Error output from fw41_cpu_temperature:
2023/01/11-00:00:10 [143010] Traceback (most recent call last):
2023/01/11-00:00:10 [143010] File "/etc/munin/plugins/fw41_cpu_temperature", line 62, in <module>
2023/01/11-00:00:10 [143010] get_cpu_temperature()
2023/01/11-00:00:10 [143010] File "/etc/munin/plugins/fw41_cpu_temperature", line 36, in get_cpu_temperature
2023/01/11-00:00:10 [143010] data = json.loads(xhr_data)
2023/01/11-00:00:10 [143010] File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
2023/01/11-00:00:10 [143010] return _default_decoder.decode(s)
2023/01/11-00:00:10 [143010] File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
2023/01/11-00:00:10 [143010] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2023/01/11-00:00:10 [143010] File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
2023/01/11-00:00:10 [143010] raise JSONDecodeError("Expecting value", s, err.value) from None
2023/01/11-00:00:10 [143010] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023/01/11-00:00:10 [143010] Service 'fw41_cpu_temperature' exited with status 1/0.
2023/01/11-00:00:11 [143012] Error output from fw44_memory_usage:
2023/01/11-00:00:11 [143012] Couldn't retrieve fritzbox memory usage
2023/01/11-00:00:11 [143012] Service 'fw44_memory_usage' exited with status 1/0.
2023/01/11-00:00:12 [143011] Error output from fw42_cpu_usage:
2023/01/11-00:00:12 [143011] Couldn't retrieve fritzbox cpu usage
2023/01/11-00:00:12 [143011] Service 'fw42_cpu_usage' exited with status 1/0.
2023/01/11-00:00:12 [143010] Error output from fw41_memory_usage:
2023/01/11-00:00:12 [143010] Couldn't retrieve fritzbox memory usage
2023/01/11-00:00:12 [143010] Service 'fw41_memory_usage' exited with status 1/0.
2023/01/11-00:00:14 [143012] Error output from fw44_cpu_temperature:
2023/01/11-00:00:14 [143012] Traceback (most recent call last):
2023/01/11-00:00:14 [143012] File "/etc/munin/plugins/fw44_cpu_temperature", line 62, in <module>
2023/01/11-00:00:14 [143012] get_cpu_temperature()
2023/01/11-00:00:14 [143012] File "/etc/munin/plugins/fw44_cpu_temperature", line 36, in get_cpu_temperature
2023/01/11-00:00:14 [143012] data = json.loads(xhr_data)
2023/01/11-00:00:14 [143012] File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
2023/01/11-00:00:14 [143012] return _default_decoder.decode(s)
2023/01/11-00:00:14 [143012] File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
2023/01/11-00:00:14 [143012] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2023/01/11-00:00:14 [143012] File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
2023/01/11-00:00:14 [143012] raise JSONDecodeError("Expecting value", s, err.value) from None
2023/01/11-00:00:14 [143012] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023/01/11-00:00:14 [143012] Service 'fw44_cpu_temperature' exited with status 1/0.
2023/01/11-00:00:14 [143011] Error output from fw42_cpu_temperature:
2023/01/11-00:00:14 [143011] Traceback (most recent call last):
2023/01/11-00:00:14 [143011] File "/etc/munin/plugins/fw42_cpu_temperature", line 62, in <module>
2023/01/11-00:00:14 [143011] get_cpu_temperature()
2023/01/11-00:00:14 [143011] File "/etc/munin/plugins/fw42_cpu_temperature", line 36, in get_cpu_temperature
2023/01/11-00:00:14 [143011] data = json.loads(xhr_data)
2023/01/11-00:00:14 [143011] File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
2023/01/11-00:00:14 [143011] return _default_decoder.decode(s)
2023/01/11-00:00:14 [143011] File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
2023/01/11-00:00:14 [143011] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2023/01/11-00:00:14 [143011] File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
2023/01/11-00:00:14 [143011] raise JSONDecodeError("Expecting value", s, err.value) from None
2023/01/11-00:00:14 [143011] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023/01/11-00:00:14 [143011] Service 'fw42_cpu_temperature' exited with status 1/0.
2023/01/11-00:00:16 [143011] Error output from fw42_memory_usage:
2023/01/11-00:00:16 [143011] Couldn't retrieve fritzbox memory usage
2023/01/11-00:00:16 [143011] Service 'fw42_memory_usage' exited with status 1/0.
These plugins seem broken ...
/var/log/munin/munin-node.log
is produced with the configuration details below:later I can check the plugins with ... 7272os06.88 7270v3os06.06 3270v3os05.54 3131os04.57
Now it is working, but showed a lot of errors, I address here ... should not be an issue of user rights inside the fritzbox. The
trusted
user has everything granted exceptWhat am I did wrong before? The journey to the sirens ...
User rights are ok, Sym.links are present ...
Really confused ???, did nothing wrong according to the README https://github.com/Tafkas/fritzbox-munin which is unclear with multiple devices, but even one fritzbox did not work.
The real important information is concealed here https://github.com/oe73773/fritzbox-munin#installation--configuration and referred here https://github.com/Tafkas/fritzbox-munin/issues/39
A really malicious trap, takes me hours to discover, how to deal right with multiple or even one fritzbox. In the README the links are mentioned as sym-links, created with '''ln -d''' I used '''ln -s''' on Debain/11 based System.
This config worked at once, the plugins were listed and produced the above log-file.