diff options
-rwxr-xr-x | munin/ups_ | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 } |