fritzbox-munin icon indicating copy to clipboard operation
fritzbox-munin copied to clipboard

support for multiple boxes and username authentication

Open CWempe opened this issue 8 years ago • 3 comments

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

CWempe avatar Mar 02 '17 22:03 CWempe

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.

Tafkas avatar Mar 02 '17 22:03 Tafkas

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. 😄

CWempe avatar Mar 02 '17 23:03 CWempe

Any reason that this has not been merged? I'd also like to monitor multiple boxes instead of just one

kripton avatar Dec 18 '20 21:12 kripton