summaryrefslogtreecommitdiffstats
path: root/charts.d/hddtemp.chart.sh
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-01-24 15:21:09 +0000
committerLennart Weller <lhw@ring0.de>2017-01-24 15:21:09 +0000
commit3ed3b02ed96ddab1c084811f3579b3a2aec83e04 (patch)
tree7a61ab288ae47800c4f11be5677d6ad8288dcd98 /charts.d/hddtemp.chart.sh
parentNew upstream version 1.4.0+dfsg (diff)
downloadnetdata-upstream/1.5.0+dfsg.tar.xz
netdata-upstream/1.5.0+dfsg.zip
New upstream version 1.5.0+dfsgupstream/1.5.0+dfsg
Diffstat (limited to 'charts.d/hddtemp.chart.sh')
-rwxr-xr-xcharts.d/hddtemp.chart.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/charts.d/hddtemp.chart.sh b/charts.d/hddtemp.chart.sh
index 41c3e2478..15895c5e1 100755
--- a/charts.d/hddtemp.chart.sh
+++ b/charts.d/hddtemp.chart.sh
@@ -1,5 +1,12 @@
# no need for shebang - this file is loaded from charts.d.plugin
+# netdata
+# real-time performance and health monitoring, done right!
+# (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
+# GPL v3+
+#
+# contributed by @paulfantom with PR #511
+
# if this chart is called X.chart.sh, then all functions and global variables
# must start with X_
hddtemp_host="localhost"
@@ -13,7 +20,8 @@ hddtemp_priority=90000
# _check is called once, to find out if this chart should be enabled or not
hddtemp_check() {
- nc $hddtemp_host $hddtemp_port &>/dev/null && return 0 || return 1
+ require_cmd nc || return 1
+ run nc $hddtemp_host $hddtemp_port && return 0 || return 1
}
# _create is called once, to create the charts