mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
squash! [plugins/transmission] Fixups for consistency
Only show host in title when not localhost
This commit is contained in:
parent
e254623ba1
commit
897de1bbba
1 changed files with 4 additions and 3 deletions
|
@ -84,11 +84,12 @@ host = os.getenv('host','localhost')
|
|||
port = os.getenv('port',9091)
|
||||
user = os.getenv('user')
|
||||
passwd = os.getenv('pass')
|
||||
title_host = '' if host in ['localhost', '127.0.0.1', '::1'] else ' on ' + host
|
||||
|
||||
|
||||
def config():
|
||||
conf = Template("""multigraph ${plugin_name}_throughput
|
||||
graph_title Transmission throughput
|
||||
graph_title Transmission throughput${title_host}
|
||||
graph_vlabel bytes/${graph_period} in (-) / out (+)
|
||||
graph_args --base 1000
|
||||
graph_category network
|
||||
|
@ -105,7 +106,7 @@ up.draw AREA
|
|||
up.min 0
|
||||
|
||||
multigraph ${plugin_name}_activity
|
||||
graph_title Transmission activity
|
||||
graph_title Transmission activity${title_host}
|
||||
graph_vlabel torrents
|
||||
graph_args --base 1000
|
||||
graph_category network
|
||||
|
@ -119,7 +120,7 @@ paused.draw STACK
|
|||
paused.min 0
|
||||
paused.colour COLOUR8
|
||||
""")
|
||||
print conf.safe_substitute(plugin_name=plugin_name, host=host)
|
||||
print conf.safe_substitute(plugin_name=plugin_name, host=host, title_host=title_host)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue