1
0
mirror of https://github.com/Tafkas/fritzbox-munin.git synced 2023-10-10 11:36:55 +00:00

Merge pull request #4 from thkukuk/master

Use correct values for traffic down and up
This commit is contained in:
oe73773 2021-06-12 20:46:39 +02:00 committed by GitHub
commit a37b7e1364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -57,7 +57,7 @@ def print_config():
max_traffic = conn.max_bit_rate
print("host_name %s" % hostname)
print("graph_title AVM Fritz!Box WAN traffic")
print("graph_title AVM Fritz!Box WAN traffic (received)")
print("graph_args --base 1000")
print("graph_vlabel bit down per ${graph_period}")
print("graph_category network")
@ -65,16 +65,15 @@ def print_config():
print("down.label bps")
print("down.type GAUGE")
print("down.draw AREA")
print("down.graph no")
print("down.min 0")
print("down.max %d" % max_traffic[1])
print("down.warning %.0f" % (max_traffic[1]*0.6))
print("down.critical %.0f" % (max_traffic[1]*0.8))
print("down.info Traffic of the WAN interface.")
if not os.environ.get('traffic_remove_max') or "false" in os.environ.get('traffic_remove_max'):
print("maxdown.label received")
print("maxdown.label MAX")
print("maxdown.type GAUGE")
print("maxdown.graph no")
print("maxdown.graph LINE1")
print("maxdown.info Maximum down speed of the WAN interface.")
if os.environ.get('host_name'):
print("host_name " + os.environ['host_name'])

View File

@ -57,7 +57,7 @@ def print_config():
max_traffic = conn.max_bit_rate
print("host_name %s" % hostname)
print("graph_title AVM Fritz!Box WAN traffic")
print("graph_title AVM Fritz!Box WAN traffic (send)")
print("graph_args --base 1000")
print("graph_vlabel bit up per ${graph_period}")
print("graph_category network")
@ -66,9 +66,9 @@ def print_config():
print("up.type GAUGE")
print("up.draw AREA")
print("up.min 0")
print("up.max %d" % max_traffic[1])
print("up.warning %.0f" % (max_traffic[1]*0.6))
print("up.critical %.0f" % (max_traffic[1]*0.8))
print("up.max %d" % max_traffic[0])
print("up.warning %.0f" % (max_traffic[0]*0.6))
print("up.critical %.0f" % (max_traffic[0]*0.8))
print("up.info Traffic of the WAN interface.")
if not os.environ.get('traffic_remove_max') or "false" in os.environ.get('traffic_remove_max'):
print("maxup.label MAX")