mirror of https://github.com/mikaku/Monitorix.git
Now it's not needed to have also reports enabled in 'traffacct.pm' to generate daily traffic counters
This commit is contained in:
parent
832abfc664
commit
7cb0fadfdd
12
monitorix
12
monitorix
|
@ -683,7 +683,7 @@ while(1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# TRAFFACCT graph daily reports
|
# TRAFFACCT graph daily reports
|
||||||
if(lc($config{traffacct}->{enabled}) eq "y" && lc($config{traffacct}->{reports}->{enabled}) eq "y") {
|
if(lc($config{traffacct}->{enabled}) eq "y"
|
||||||
my $d = "traffacct";
|
my $d = "traffacct";
|
||||||
undef($d) if(!grep {trim($_) eq $d} (@{$config{debug}}));
|
undef($d) if(!grep {trim($_) eq $d} (@{$config{debug}}));
|
||||||
|
|
||||||
|
@ -697,10 +697,12 @@ while(1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# send reports every first day of a month
|
# send reports every first day of a month
|
||||||
if($mday == 1) {
|
if(lc($config{traffacct}->{reports}->{enabled}) eq "y") {
|
||||||
eval { traffacct::traffacct_sendreports(\%config, $d); };
|
if($mday == 1) {
|
||||||
if($@) {
|
eval { traffacct::traffacct_sendreports(\%config, $d); };
|
||||||
logger("traffacct::traffacct_sendreports(): $@");
|
if($@) {
|
||||||
|
logger("traffacct::traffacct_sendreports(): $@");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue