mirror of https://github.com/mikaku/Monitorix.git
updated to include support for modules extra like 'traffacct'
This commit is contained in:
parent
4b50d18650
commit
2094b7922e
15
monitorix
15
monitorix
|
@ -254,7 +254,7 @@ EOF
|
|||
}
|
||||
}
|
||||
|
||||
if(scalar(my @tfl = split(',', $config{traffacct}->{list})) && lc($config{graph_enable}->{traffacct}) eq "y") {
|
||||
if(scalar(my @tfl = split(',', $config{traffacct}->{list})) && lc($config{traffacct}->{enabled}) eq "y") {
|
||||
print(OUT " <optgroup label='Traffic Accounting'>\n");
|
||||
print(OUT " <option value='traffacct.all'>All</option>\n");
|
||||
for($n = 0; $n < scalar(@tfl); $n++) {
|
||||
|
@ -452,9 +452,17 @@ if(open(OUT, "> " . $config{base_dir} . "/cgi-bin/monitorix.conf.path")) {
|
|||
flush_accounting_rules(\%config, $options{d});
|
||||
|
||||
logger("Initializing graphs.") unless !$options{d};
|
||||
foreach (split(',', $config{graph_name})) {
|
||||
foreach (split(',', $config{graph_name} . ", traffacct")) {
|
||||
my $g = trim($_);
|
||||
if(lc($config{graph_enable}->{$g}) eq "y") {
|
||||
my $e = "n";
|
||||
|
||||
if($g eq "traffacct") {
|
||||
$e = lc($config{$g}->{enabled});
|
||||
} else {
|
||||
$e = lc($config{graph_enable}->{$g});
|
||||
}
|
||||
|
||||
if($e eq "y") {
|
||||
my $init = $g . "_init";
|
||||
my $d = $g;
|
||||
|
||||
|
@ -476,7 +484,6 @@ foreach (split(',', $config{graph_name})) {
|
|||
}
|
||||
}
|
||||
|
||||
print Dumper($config{func_update});
|
||||
if(!scalar($config{func_update})) {
|
||||
logger("nothing to do, exiting.");
|
||||
exit(0);
|
||||
|
|
Loading…
Reference in New Issue