mirror of
https://github.com/Tafkas/fritzbox-munin.git
synced 2023-10-10 13:36:55 +02:00
Use the same env variables as FritzConnection
Signed-off-by: Olivier Mehani <shtrom@ssji.net> (cherry picked from commit 3b0c1395467fb942cbde026058a694780d530828)
This commit is contained in:
parent
a20ac8808b
commit
15cc928242
@ -84,7 +84,8 @@ If you are using the scripts on a different Fritz!Box model please let me know b
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip <ip_address_to_your_fritzbox>
|
||||
env.fritzbox_password <fritzbox_password>
|
||||
env.FRITZ_USERNAME <optional: fritzbox username>
|
||||
env.FRITZ_PASSWORD <FRITZ_PASSWORD>
|
||||
env.traffic_remove_max true # if you do not want the possible max values
|
||||
host_name fritzbox
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
@ -28,10 +28,10 @@ def get_cpu_temperature():
|
||||
"""get the current cpu temperature"""
|
||||
|
||||
server = os.environ['fritzbox_ip']
|
||||
password = os.environ['fritzbox_password']
|
||||
password = os.environ['FRITZ_PASSWORD']
|
||||
|
||||
if "fritzbox_username" in os.environ:
|
||||
fritzuser = os.environ['fritzbox_username']
|
||||
if "FRITZ_USERNAME" in os.environ:
|
||||
fritzuser = os.environ['FRITZ_USERNAME']
|
||||
session_id = fh.get_session_id(server, password, fritzuser)
|
||||
else:
|
||||
session_id = fh.get_session_id(server, password)
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
@ -28,10 +28,10 @@ def get_cpu_usage():
|
||||
"""get the current cpu usage"""
|
||||
|
||||
server = os.environ['fritzbox_ip']
|
||||
password = os.environ['fritzbox_password']
|
||||
password = os.environ['FRITZ_PASSWORD']
|
||||
|
||||
if "fritzbox_username" in os.environ:
|
||||
fritzuser = os.environ['fritzbox_username']
|
||||
if "FRITZ_USERNAME" in os.environ:
|
||||
fritzuser = os.environ['FRITZ_USERNAME']
|
||||
session_id = fh.get_session_id(server, password, fritzuser)
|
||||
else:
|
||||
session_id = fh.get_session_id(server, password)
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
@ -29,10 +29,10 @@ def get_memory_usage():
|
||||
"""get the current memory usage"""
|
||||
|
||||
server = os.environ['fritzbox_ip']
|
||||
password = os.environ['fritzbox_password']
|
||||
password = os.environ['FRITZ_PASSWORD']
|
||||
|
||||
if "fritzbox_username" in os.environ:
|
||||
fritzuser = os.environ['fritzbox_username']
|
||||
if "FRITZ_USERNAME" in os.environ:
|
||||
fritzuser = os.environ['FRITZ_USERNAME']
|
||||
session_id = fh.get_session_id(server, password, fritzuser)
|
||||
else:
|
||||
session_id = fh.get_session_id(server, password)
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
@ -31,10 +31,10 @@ def get_power_consumption():
|
||||
"""get the current power consumption usage"""
|
||||
|
||||
server = os.environ['fritzbox_ip']
|
||||
password = os.environ['fritzbox_password']
|
||||
password = os.environ['FRITZ_PASSWORD']
|
||||
|
||||
if "fritzbox_username" in os.environ:
|
||||
fritzuser = os.environ['fritzbox_username']
|
||||
if "FRITZ_USERNAME" in os.environ:
|
||||
fritzuser = os.environ['FRITZ_USERNAME']
|
||||
session_id = fh.get_session_id(server, password, fritzuser)
|
||||
else:
|
||||
session_id = fh.get_session_id(server, password)
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
@ -38,10 +38,10 @@ def get_uptime():
|
||||
"""get the current uptime"""
|
||||
|
||||
server = os.environ['fritzbox_ip']
|
||||
password = os.environ['fritzbox_password']
|
||||
password = os.environ['FRITZ_PASSWORD']
|
||||
|
||||
if "fritzbox_username" in os.environ:
|
||||
fritzuser = os.environ['fritzbox_username']
|
||||
if "FRITZ_USERNAME" in os.environ:
|
||||
fritzuser = os.environ['FRITZ_USERNAME']
|
||||
session_id = fh.get_session_id(server, password, fritzuser)
|
||||
else:
|
||||
session_id = fh.get_session_id(server, password)
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
[fritzbox_*]
|
||||
env.fritzbox_ip [ip address of the fritzbox]
|
||||
env.fritzbox_password [fritzbox password]
|
||||
env.fritzbox_username [optional: fritzbox username]
|
||||
env.FRITZ_PASSWORD [fritzbox password]
|
||||
env.FRITZ_USERNAME [optional: fritzbox username]
|
||||
|
||||
This plugin supports the following munin configuration parameters:
|
||||
#%# family=auto contrib
|
||||
@ -35,10 +35,10 @@ def get_connected_wifi_devices():
|
||||
"""gets the numbrer of currently connected wifi devices"""
|
||||
|
||||
server = os.environ['fritzbox_ip']
|
||||
password = os.environ['fritzbox_password']
|
||||
password = os.environ['FRITZ_PASSWORD']
|
||||
|
||||
if "fritzbox_username" in os.environ:
|
||||
fritzuser = os.environ['fritzbox_username']
|
||||
if "FRITZ_USERNAME" in os.environ:
|
||||
fritzuser = os.environ['FRITZ_USERNAME']
|
||||
session_id = fh.get_session_id(server, password, fritzuser)
|
||||
else:
|
||||
session_id = fh.get_session_id(server, password)
|
||||
|
Loading…
Reference in New Issue
Block a user