summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmunin/ups_13
1 files changed, 8 insertions, 5 deletions
diff --git a/munin/ups_ b/munin/ups_
index 5b112c3..3c7e5e5 100755
--- a/munin/ups_
+++ b/munin/ups_
@@ -11,6 +11,7 @@
# 2006-04-28 Peter Palfrader:
# - add runtime and temperature graphs
# - append @localhost to UPS variable
+# - change AC frequency to input and output frequency
#
# usage: ups_upsid_function
#
@@ -89,12 +90,14 @@ function frequency() {
echo "graph_title $UPS input AC frequency"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel frequency 1/s"
- echo "acfreq.label AC frequency"
- echo "acfreq.type GAUGE"
- echo "acfreq.max 100"
- echo "acfreq.min 5"
+ for i in input output; do
+ echo "${i}.label ${i} frequency"
+ echo "${i}.type GAUGE"
+ echo "${i}.max 100"
+ echo "${i}.min 5"
+ done
else
- upsc $UPS | sed -n '/freq/{s/.*:/acfreq.value/;p}'
+ upsc $UPS | sed -n '/frequency/{s/frequency:/value/;p}'
fi
}