diff --git a/plugins/hg612_errors b/plugins/hg612_errors index 9fd0985..a29e60d 100755 --- a/plugins/hg612_errors +++ b/plugins/hg612_errors @@ -37,7 +37,7 @@ if [ "$1" = "config" ]; then echo "graph_title Errors" echo "graph_args --base 1000" - echo "graph_vlabel errors down (-) / up (+) per ${graph_period}" + echo 'graph_vlabel errors down (-) / up (+) per ${graph_period}' echo "graph_category hg612" echo "graph_scale no" diff --git a/plugins/hg612_interleaving b/plugins/hg612_interleaving new file mode 100755 index 0000000..05b3eca --- /dev/null +++ b/plugins/hg612_interleaving @@ -0,0 +1,58 @@ +#!/bin/sh +# -*- sh -*- + +statsfile="/etc/munin/huawei/output.txt" + +: << =cut + +=head1 NAME + +Line Stats - Plugin to get Huawei HG612 line stats + +=head1 NOTES + +Fetches current SNR + +=head1 AUTHOR + +Adam Smith + +=head1 LICENSE + +GPL + +=head1 MAGIC MARKERS + + #%# family=auto + #%# capabilities=autoconf + +=cut + +if [ "$1" = "autoconf" ]; then + echo yes + exit 0 +fi + +if [ "$1" = "config" ]; then + + echo 'graph_title Interleave Depth' + echo 'graph_args --base 1000' + echo 'graph_vlabel Interleave Depth' + echo 'graph_category hg612' + echo 'graph_scale no' + echo 'graph_order upstream downstream' + echo 'downstream.label Downstream' + echo 'downstream.draw LINE' + echo 'upstream.label Upstream' + echo 'upstream.draw LINE' + exit 0 +fi; + + +echo -n "upstream.value " +echo $(grep ^D: $statsfile | head -n 1 | awk '{ print $3 }') +echo -n "downstream.value " +echo $(grep ^D: $statsfile | head -n 1 | awk '{ print $2 }') + + exit 0 +fi diff --git a/plugins/hg612_ptm1 b/plugins/hg612_ptm1 index e4c0bd7..6fe7d04 100755 --- a/plugins/hg612_ptm1 +++ b/plugins/hg612_ptm1 @@ -37,7 +37,7 @@ if [ "$1" = "config" ]; then echo "graph_title ptm1 traffic" echo "graph_args --base 1000" - echo "graph_vlabel bytes per ${graph_period}" + echo 'graph_vlabel bytes per ${graph_period}' echo "graph_category hg612" echo "down.label received" echo "down.type DERIVE"