git.cweiske.de
/
munin-heatpump.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
92cd67b
)
add connection error checking
author
Christian Weiske
<cweiske@cweiske.de>
Sun, 9 Dec 2012 19:48:13 +0000
(20:48 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Sun, 9 Dec 2012 19:48:13 +0000
(20:48 +0100)
heatpump-dimplex-wpm_
patch
|
blob
|
history
diff --git
a/heatpump-dimplex-wpm_
b/heatpump-dimplex-wpm_
index 0539946e1114e01b5c77b3a2cdcd084000296200..cbdf74f01493c1f829a88f80a2a358e733fa9645 100755
(executable)
--- a/
heatpump-dimplex-wpm_
+++ b/
heatpump-dimplex-wpm_
@@
-102,7
+102,13
@@
if [ "$1" = "config" ]; then
exit 0
fi
exit 0
fi
-data=`curl -s "http://$host/usr-cgi/xml.cgi?A|1|125|D|1|150|I|1|100" | xsltproc paths.xsl -`
+xml=`curl -fs "http://$host/usr-cgi/xml.cgi?A|1|125|D|1|150|I|1|100"`; ret=$?
+if [ "$ret" -ne 0 ]; then
+ echo "Error fetching data from heatpump server: $host"
+ exit 1
+fi
+
+data=`echo "$xml" | xsltproc paths.xsl -`
#Outdoor temperature
echo 'multigraph heatpump_dimplex_wpm_outtemp'
#Outdoor temperature
echo 'multigraph heatpump_dimplex_wpm_outtemp'