Merge branch 'ent-11753-el-pandoradb-no-esta-borrando-los-datos-antiguos-de-netflow' into 'develop'

Fix pandoradb delete old netdlow data

See merge request artica/pandorafms!6394
This commit is contained in:
Rafael Ameijeiras 2023-09-07 14:12:20 +00:00
commit 0dc2a3492d
1 changed files with 6 additions and 1 deletions

View File

@ -359,7 +359,12 @@ sub pandora_purgedb ($$$) {
log_message ('!', "Cannot execute " . $conf->{'_netflow_nfexpire'} . ", skipping.");
}
else {
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -r "$conf->{'_netflow_path'}" -t $conf->{'_netflow_max_lifetime'}d`;
# Update stats file with max lifetime.
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -u "$conf->{'_netflow_path'}" -t $conf->{'_netflow_max_lifetime'}d -w 100`;
# Rescan directory.
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -r "$conf->{'_netflow_path'}"`;
# Expire files
`yes 2>/dev/null | $conf->{'_netflow_nfexpire'} -e "$conf->{'_netflow_path'}"`;
}
}
else {