mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 09:57:09 +00:00
Plugin-Gallery: Better 2nd level headings
This commit is contained in:
parent
349edaf819
commit
6ffdebec0d
17 changed files with 9 additions and 9 deletions
62
plugins/router/beboxstats
Executable file
62
plugins/router/beboxstats
Executable file
|
@ -0,0 +1,62 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
my ($Args) = @ARGV;
|
||||
|
||||
my $expecter = "/path/to/beboxstats.expect";
|
||||
|
||||
if ($Args) {
|
||||
|
||||
# work out line to grab
|
||||
if ($Args eq 'autoconf') {
|
||||
# Check the expect script that polls the router exists
|
||||
unless ( -e $expecter ) {
|
||||
print "no (Can't find expect script. Check value of \$expecter: $expecter)\n";
|
||||
} else {
|
||||
print "yes\n";
|
||||
}
|
||||
|
||||
} elsif ($Args eq 'config') { # print out plugin parameters
|
||||
printf("
|
||||
graph_title bebox line stats
|
||||
graph_vlabel deciBels
|
||||
graph_category network
|
||||
graph_info This graph shows the various line parameters
|
||||
attenuationdownstream.label Downstream Attenuation
|
||||
attenuationupstream.label Upstream Attenuation
|
||||
margindownstream.label Downstream Noise Margin
|
||||
marginupstream.label Upstream Noise Margin
|
||||
outputpowerdownstream.label Downstream Output Power
|
||||
outputpowerupstream.label Upstream Output Power
|
||||
margindownstream.type GAUGE
|
||||
outputpowerupstream.type GAUGE
|
||||
attenuationdownstream.type GAUGE
|
||||
marginupstream.type GAUGE
|
||||
outputpowerdownstream.type GAUGE
|
||||
attenuationupstream.type GAUGE
|
||||
");
|
||||
# .label is the Key on the graph
|
||||
} else {
|
||||
printf("Usage: $0
|
||||
No arguments: print line stats
|
||||
autoconf: print 'yes'
|
||||
config: print config info for Munin\n");
|
||||
}
|
||||
|
||||
} else {
|
||||
# if no arguments, just fetch the data and print it out
|
||||
|
||||
my @insplitted = split(' ', `$expecter | grep dB`);
|
||||
|
||||
print "margindownstream.value $insplitted[3]\n";
|
||||
print "marginupstream.value $insplitted[4]\n";
|
||||
|
||||
print "attenuationdownstream.value $insplitted[8]\n";
|
||||
print "attenuationupstream.value $insplitted[9]\n";
|
||||
|
||||
print "outputpowerdownstream.value $insplitted[13]\n";
|
||||
print "outputpowerupstream.value $insplitted[14]\n";
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue