aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpellematic-time9
1 files changed, 5 insertions, 4 deletions
diff --git a/pellematic-time b/pellematic-time
index 03df3d9..3ccdf05 100755
--- a/pellematic-time
+++ b/pellematic-time
@@ -24,6 +24,7 @@ import json
username = os.getenv('username', 'oekofen')
password = os.getenv('password', username)
debug = os.getenv('debug')
+url = os.getenv('url')
# The items we want to fetch:
items = { "off": "CAPPL:FA[0].L_sillstandszeit",
@@ -43,6 +44,8 @@ graph_period hour
coefficient.label runtime coefficient
coefficient.type GAUGE
coefficient.draw LINE1
+coefficient.warning 0.9
+coefficient.critical 0.95
"""
def fetch_raw(url):
@@ -103,11 +106,9 @@ def fetch_values(url):
def main(args):
- target = os.getenv('address')
- if not target:
- print >>sys.stderr, "No ip address configured"
+ if not url:
+ print >>sys.stderr, "No url configured"
return 1
- url = 'http://%s' % target
if len(args) > 1:
if args[1] in [ 'autoconf', 'detect' ]:
try: