From 5e4884250001c0de169e5a00bff749b65f0b75d2 Mon Sep 17 00:00:00 2001 From: Kris Popendorf Date: Tue, 23 Apr 2013 23:59:32 +0900 Subject: [PATCH] update documentation --- plugins/network/bandwidth_ | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/network/bandwidth_ b/plugins/network/bandwidth_ index 8e1d3865..24c14d01 100755 --- a/plugins/network/bandwidth_ +++ b/plugins/network/bandwidth_ @@ -23,6 +23,11 @@ public IP and if so it will suggest monitoring those interfaces. If all IP addresses are private the setup will have to be done manually. Suggest does not handle IPv6 addresses. +Environment Variables: + +* monthlycap => monthly cap to draw warnings at in bytes +* uploadonly => if set display (and count against warnings) only upload bytes + =head1 USAGE Any device found in /proc/net/dev can be monitored. Examples include ipsec*, @@ -267,7 +272,8 @@ sub sum_old { sub munin_output { my $period = $unix_ts - $oldest_ts; return unless $period; #can't estimate anything from a single point, so don't. - my $total30 = $input_30days + $output_30days; + my $total30 = $output_30days; + $total30 += $input_30days unless $ENV{uploadonly}; my $average30 = $total30 / $period; print "average.value $average30\n"; print "monthly.value " . $average30 * $count30 . "\n";