Browse Source

Fix field order issue

master
Nicolas Massé 12 years ago
parent
commit
2649c61001
  1. 12
      Munin-Plugin-For-Freebox-Revolution/fb_

12
Munin-Plugin-For-Freebox-Revolution/fb_

@ -18,7 +18,7 @@ my %db_fields = (
my %graph = ( my %graph = (
net => { net => {
graph_category => 'Freebox', #graph_category => 'freebox',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
graph_scale => 'yes', graph_scale => 'yes',
graph_info => 'The upload and download rate of the Freebox Revolution.', graph_info => 'The upload and download rate of the Freebox Revolution.',
@ -30,7 +30,7 @@ my %graph = (
'.db' => "net", '.db' => "net",
}, },
temp => { temp => {
graph_category => 'Freebox', #graph_category => 'freebox',
graph_args => '--base 1000 -0', graph_args => '--base 1000 -0',
graph_scale => 'no', graph_scale => 'no',
graph_info => 'The temperature of various sensors on the Freebox Revolution', graph_info => 'The temperature of various sensors on the Freebox Revolution',
@ -44,7 +44,7 @@ my %graph = (
'.db' => "temp", '.db' => "temp",
}, },
fan => { fan => {
graph_category => 'Freebox', #graph_category => 'freebox',
graph_args => '--base 1000 -0', graph_args => '--base 1000 -0',
graph_scale => 'no', graph_scale => 'no',
graph_info => 'The fan speed of the Freebox Revolution', graph_info => 'The fan speed of the Freebox Revolution',
@ -56,7 +56,7 @@ my %graph = (
'.db' => "temp", '.db' => "temp",
}, },
dsl_rate => { dsl_rate => {
graph_category => 'Freebox', #graph_category => 'freebox',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
graph_scale => 'yes', graph_scale => 'yes',
graph_info => 'The xDSL rate stats of the Freebox Revolution', graph_info => 'The xDSL rate stats of the Freebox Revolution',
@ -68,7 +68,7 @@ my %graph = (
'.db' => "dsl", '.db' => "dsl",
}, },
dsl_snr => { dsl_snr => {
graph_category => 'Freebox', #graph_category => 'freebox',
graph_args => '--base 1000 -l 0', graph_args => '--base 1000 -l 0',
graph_scale => 'no', graph_scale => 'no',
graph_info => 'The xDSL SNR stats of the Freebox Revolution', graph_info => 'The xDSL SNR stats of the Freebox Revolution',
@ -118,7 +118,7 @@ my $graph_info = $graph{$mode};
my @fields = sort map { m/\.info/ ? m/(.*)\./ : () } keys %{$graph_info}; my @fields = sort map { m/\.info/ ? m/(.*)\./ : () } keys %{$graph_info};
if (defined $arg and $arg eq 'config') { if (defined $arg and $arg eq 'config') {
print "graph_order ", (join " ", @fields), "\n"; print "graph_order ", (join " ", @fields), "\n";
foreach my $key (sort grep /^[^.]/, keys %{$graph_info}) { foreach my $key ((sort grep /^graph_/, keys %{$graph_info}), (sort grep /^.+\..+/, keys %{$graph_info})) {
print $key, " ", $graph_info->{$key}, "\n"; print $key, " ", $graph_info->{$key}, "\n";
} }
exit 0; exit 0;

Loading…
Cancel
Save