diff options
Diffstat (limited to '')
-rw-r--r-- | collectors/charts.d.plugin/apcupsd/Makefile.inc | 13 | ||||
-rw-r--r-- | collectors/charts.d.plugin/apcupsd/README.md (renamed from python.d/python_modules/bases/FrameworkServices/__init__.py) | 0 | ||||
-rw-r--r-- | collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh (renamed from charts.d/apcupsd.chart.sh) | 7 | ||||
-rw-r--r-- | collectors/charts.d.plugin/apcupsd/apcupsd.conf (renamed from conf.d/charts.d/apcupsd.conf) | 0 |
4 files changed, 18 insertions, 2 deletions
diff --git a/collectors/charts.d.plugin/apcupsd/Makefile.inc b/collectors/charts.d.plugin/apcupsd/Makefile.inc new file mode 100644 index 000000000..19cb9cad7 --- /dev/null +++ b/collectors/charts.d.plugin/apcupsd/Makefile.inc @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +# THIS IS NOT A COMPLETE Makefile +# IT IS INCLUDED BY ITS PARENT'S Makefile.am +# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT + +# install these files +dist_charts_DATA += apcupsd/apcupsd.chart.sh +dist_chartsconfig_DATA += apcupsd/apcupsd.conf + +# do not install these files, but include them in the distribution +dist_noinst_DATA += apcupsd/README.md apcupsd/Makefile.inc + diff --git a/python.d/python_modules/bases/FrameworkServices/__init__.py b/collectors/charts.d.plugin/apcupsd/README.md index e69de29bb..e69de29bb 100644 --- a/python.d/python_modules/bases/FrameworkServices/__init__.py +++ b/collectors/charts.d.plugin/apcupsd/README.md diff --git a/charts.d/apcupsd.chart.sh b/collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh index 9878fd36c..e26ef566a 100644 --- a/charts.d/apcupsd.chart.sh +++ b/collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh @@ -1,9 +1,10 @@ +# shellcheck shell=bash # no need for shebang - this file is loaded from charts.d.plugin +# SPDX-License-Identifier: GPL-3.0-or-later # netdata # real-time performance and health monitoring, done right! # (C) 2016 Costa Tsaousis <costa@tsaousis.gr> -# GPL v3+ # apcupsd_ip= @@ -43,11 +44,12 @@ apcupsd_check() { for host in "${!apcupsd_sources[@]}" do run apcupsd_get "${apcupsd_sources[${host}]}" >/dev/null + # shellcheck disable=2181 if [ $? -ne 0 ] then error "cannot get information for apcupsd server ${host} on ${apcupsd_sources[${host}]}." failed=$((failed + 1)) - elif [ $(apcupsd_get "${apcupsd_sources[${host}]}" | awk '/^STATUS.*/{ print $3 }') != "ONLINE" ] + elif [ "$(apcupsd_get "${apcupsd_sources[${host}]}" | awk '/^STATUS.*/{ print $3 }')" != "ONLINE" ] then error "APC UPS ${host} on ${apcupsd_sources[${host}]} is not online." failed=$((failed + 1)) @@ -183,6 +185,7 @@ END { print \"SET time = \" time; print \"END\" }" + # shellcheck disable=SC2181 if [ $? -ne 0 ] then failed=$((failed + 1)) diff --git a/conf.d/charts.d/apcupsd.conf b/collectors/charts.d.plugin/apcupsd/apcupsd.conf index 679c0d61b..679c0d61b 100644 --- a/conf.d/charts.d/apcupsd.conf +++ b/collectors/charts.d.plugin/apcupsd/apcupsd.conf |