From fcf05fbece7a1de93276f035d6e7db5df09f707f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 28 Apr 2006 16:18:20 +0000 Subject: change AC frequency to input and output frequency git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@70 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- munin/ups_ | 13 ++++++++----- 1 file 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 } -- cgit v1.2.3