fritzbox-munin
fritzbox-munin copied to clipboard
support for multiple boxes and username authentication
This PR is supposed to fix the following issues:
- FritzOS 6.50 #1 (was already fixed in this branch)
- How to add two fritzboxes? #3
- How to separate the graphy to a new node entry #4 At least I had that issue. 😕
- support authentication with username #9 I am not sure if this breaks support for authentication without username!
Tested with FRITZ!OS 6.51 and 6.80
Hi Christoph,
thank you for your PR. I think it looks good. One minor thing, though. You mentioned the authentication with username/password might break the password-only option. How about this:
check if there is a a username set with os.getenv instead of os.environ. The latter will raise an exception in Python 2.7, while the former will return None.
I added some comments in the code as well.
Thank you for your suggestions. I think this should handle non-username scenarios now.
btw: The API request worked with the username-URL even when authentication was configured for password-only.
As someone who never used python before, I am pretty proud of myself. 😄
Any reason that this has not been merged? I'd also like to monitor multiple boxes instead of just one