mirror of https://github.com/mikaku/Monitorix.git
fixed to count lines even when no date has been specified (e.g.: Samba) #115
This commit is contained in:
parent
4629f87c46
commit
7d161a72ae
|
@ -247,7 +247,7 @@ sub serv_update {
|
|||
$sc[1] = trim($sc[1]);
|
||||
$sc[1] =~ s/^\"//; $sc[1] =~ s/\"$//; # remove leading and trailing quotes
|
||||
my $date = strftime($sc[1], localtime);
|
||||
$date = qr($date);
|
||||
$date = qr($date) unless !$date;
|
||||
my @regex = split('\+', trim($sc[2]));
|
||||
my $IN;
|
||||
my $seek_pos = $config->{serv_hist}->{$seek_str} || 0;
|
||||
|
@ -279,6 +279,7 @@ sub serv_update {
|
|||
logger("Malformed logfile parameter '$logfile' in service '$s': $!");
|
||||
undef($logfile);
|
||||
}
|
||||
$date = "." if !$date;
|
||||
if(defined($logfile)) {
|
||||
while(<$IN>) {
|
||||
if(/$date/) {
|
||||
|
|
Loading…
Reference in New Issue