TimeStamp column is not int10, it is a timestamp. Fix logged errors from zm_stats.pl

pull/3669/merge
Isaac Connor 2023-02-23 09:15:55 -05:00
parent 75e8ed5ce0
commit 89f0565edc
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ while (!$zm_terminate) {
$Config{ZM_SERVER_ID}, $cpuload[0], &totalmem, &freemem, &totalswap, &freeswap, $Config{ZM_SERVER_ID} ) ) {
Error("Failed Inserting status of Server record for Id=$Config{ZM_SERVER_ID} :".$dbh->errstr());
}
my $rows = zmDbDo('DELETE FROM `Server_Stats` WHERE `TimeStamp` < unix_timestamp(now() - interval 1 DAY) LIMIT 100');
my $rows = zmDbDo('DELETE FROM `Server_Stats` WHERE `TimeStamp` < now() - interval 1 DAY LIMIT 100');
Debug("Deleted $rows Server Stats table entries by time");
# Clear out statuses for Monitors that have been set to None but for some reason didn't update the db