summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve8291 <hambling8@gmail.com>2019-05-27 06:50:44 -0400
committerChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-05-27 12:50:44 +0200
commit51a16baf0828516e7e7563fa47f1b854a7a67ecd (patch)
treea58f8d5a305c37dcefd2fdfd47dca747c7a69227
parent46e0aa85b8b0d7791d07af68fc2f7d130b987477 (diff)
Add modules to charts.d.conf (#6120)
* Fix incorrect module name: energi I think this should be "energid" because that is the name of the module and currently setting it to "no" in the config file does not turn it off. * Update charts.d.conf Add apcupsd and libreswan to conf as default enabled. * Update apcupsd.chart.sh
-rw-r--r--collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh4
-rw-r--r--collectors/charts.d.plugin/charts.d.conf2
2 files changed, 4 insertions, 2 deletions
diff --git a/collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh b/collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh
index f5c4d7959c..1c1ce67b76 100644
--- a/collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh
+++ b/collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh
@@ -47,8 +47,8 @@ apcupsd_check() {
error "cannot get information for apcupsd server ${host} on ${apcupsd_sources[${host}]}."
failed=$((failed + 1))
else
- apcupsd_status = "$(apcupsd_get ${apcupsd_sources[${host}]} | awk '/^STATUS.*/{ print $3 }')"
- if [ ${apcupsd_status} != "ONLINE" ] && [ ${apcupsd_status} != "ONBATT" ]; then
+ apcupsd_status=$(apcupsd_get ${apcupsd_sources[${host}]} | awk '/^STATUS.*/{ print $3 }')
+ if [ "$apcupsd_status" != "ONLINE" ] && [ "$apcupsd_status" != "ONBATT" ]; then
error "APC UPS ${host} on ${apcupsd_sources[${host}]} is not online."
failed=$((failed + 1))
else
diff --git a/collectors/charts.d.plugin/charts.d.conf b/collectors/charts.d.plugin/charts.d.conf
index acb2a6fae3..94c40cf6fc 100644
--- a/collectors/charts.d.plugin/charts.d.conf
+++ b/collectors/charts.d.plugin/charts.d.conf
@@ -34,6 +34,8 @@
# BY DEFAULT ENABLED MODULES
# ap=yes
+# apcupsd=yes
+# libreswan=yes
# nut=yes
# opensips=yes