X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=charts.d%2Fhddtemp.chart.sh;h=15895c5e160a71a845a586ab1f602492b26b3061;hb=b060bae83cc36fdc4f14120228e4c9b0d1ec42e8;hp=41c3e2478092a7df949fe8cb0c8ca353e0abe00b;hpb=3824a699715d85e0adf61570a4569d09922c7f5c;p=netdata.git diff --git a/charts.d/hddtemp.chart.sh b/charts.d/hddtemp.chart.sh old mode 100755 new mode 100644 index 41c3e247..15895c5e --- 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 +# 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