mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Update multibandwidth
I will update more changes in the next days
This commit is contained in:
parent
a1cc26f2d3
commit
1ae4ac09da
@ -1,38 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "$MUNIN_LIBDIR/plugins/plugin.sh"
|
||||
|
||||
: <<=cut
|
||||
|
||||
=head1 NAME
|
||||
|
||||
multibandwidth - Plugin to monitor the bandwidth between localhost and serveral hosts.
|
||||
|
||||
=head1 APPLICABLE SYSTEMS
|
||||
|
||||
All systems with “bash”, and “munin”
|
||||
|
||||
=head1 REQUIREMENTS
|
||||
|
||||
bing installed.
|
||||
|
||||
You can install bing by using (Ubuntu/Debian): apt-get install bing
|
||||
|
||||
=head1 CONFIGURATION
|
||||
|
||||
The following is the default configuration
|
||||
|
||||
[multibandwidth]
|
||||
user root
|
||||
env.hosts example.org example2.org example3.org
|
||||
env.samples 15
|
||||
env.small_packet_size 44
|
||||
env.big_packet_size 108
|
||||
env.max_mbps 15728640
|
||||
|
||||
- env.hosts explanation: hostname or IP of the hosts to calculate the bandwidth.
|
||||
|
||||
- env.samples explanation: Reset stats after sending samples ECHO_REQUEST packets.
|
||||
#!/bin/sh
|
||||
|
||||
. "$MUNIN_LIBDIR/plugins/plugin.sh"
|
||||
|
||||
: <<=cut
|
||||
|
||||
=head1 NAME
|
||||
|
||||
multibandwidth - Plugin to monitor the bandwidth between localhost and serveral hosts.
|
||||
|
||||
=head1 APPLICABLE SYSTEMS
|
||||
|
||||
All systems with “bash”, and “munin”
|
||||
|
||||
=head1 REQUIREMENTS
|
||||
|
||||
bing installed.
|
||||
|
||||
You can install bing by using (Ubuntu/Debian): apt-get install bing
|
||||
|
||||
=head1 CONFIGURATION
|
||||
|
||||
The following is the default configuration
|
||||
|
||||
[multibandwidth]
|
||||
user root
|
||||
env.hosts example.org example2.org example3.org
|
||||
env.samples 15
|
||||
env.small_packet_size 44
|
||||
env.big_packet_size 108
|
||||
env.max_mbps 15728640
|
||||
|
||||
- env.hosts explanation: hostname or IP of the hosts to calculate the bandwidth.
|
||||
|
||||
- env.samples explanation: Reset stats after sending samples ECHO_REQUEST packets.
|
||||
|
||||
- env.small_packet_size explanation: Specifies the number of data bytes to be sent in the small
|
||||
packets. The default and minimum value is 44.
|
||||
@ -107,7 +107,7 @@ for host in $hosts; do
|
||||
VALUE=`echo "$SPEED" | sed 's/.$//'`
|
||||
RATE=`echo "$VALUE * 1048576" | bc -l`
|
||||
|
||||
if [ $(echo "$RATE" >= "$max_mbps" | bc >/dev/null && echo "no" || echo "yes") = "yes" ]; then
|
||||
if [ `echo "$RATE > $max_mbps" | bc` -eq "1" ]; then
|
||||
echo "$max_mbps"
|
||||
else
|
||||
echo "$RATE"
|
||||
|
Loading…
Reference in New Issue
Block a user