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 = (
net => {
graph_category => 'Freebox',
#graph_category => 'freebox',
graph_args => '--base 1000 -l 0',
graph_scale => 'yes',
graph_info => 'The upload and download rate of the Freebox Revolution.',
@ -30,7 +30,7 @@ my %graph = (
'.db' => "net",
},
temp => {
graph_category => 'Freebox',
#graph_category => 'freebox',
graph_args => '--base 1000 -0',
graph_scale => 'no',
graph_info => 'The temperature of various sensors on the Freebox Revolution',
@ -44,7 +44,7 @@ my %graph = (
'.db' => "temp",
},
fan => {
graph_category => 'Freebox',
#graph_category => 'freebox',
graph_args => '--base 1000 -0',
graph_scale => 'no',
graph_info => 'The fan speed of the Freebox Revolution',
@ -56,7 +56,7 @@ my %graph = (
'.db' => "temp",
},
dsl_rate => {
graph_category => 'Freebox',
#graph_category => 'freebox',
graph_args => '--base 1000 -l 0',
graph_scale => 'yes',
graph_info => 'The xDSL rate stats of the Freebox Revolution',
@ -68,7 +68,7 @@ my %graph = (
'.db' => "dsl",
},
dsl_snr => {
graph_category => 'Freebox',
#graph_category => 'freebox',
graph_args => '--base 1000 -l 0',
graph_scale => 'no',
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};
if (defined $arg and $arg eq 'config') {
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";
}
exit 0;

Loading…
Cancel
Save