"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "util/pandora_db.pl" between
pandorafms_server-7.0NG.757.tar.gz and pandorafms_server-7.0NG.758.tar.gz

About: Pandora FMS (Flexible Monitoring System) offers enterprise IT monitoring for networks, applications, servers and virtual infrastructure. Core server.

pandora_db.pl  (pandorafms_server-7.0NG.757):pandora_db.pl  (pandorafms_server-7.0NG.758)
skipping to change at line 38 skipping to change at line 38
# Default lib dir for RPM and DEB packages # Default lib dir for RPM and DEB packages
use lib '/usr/lib/perl5'; use lib '/usr/lib/perl5';
use PandoraFMS::Core; use PandoraFMS::Core;
use PandoraFMS::Tools; use PandoraFMS::Tools;
use PandoraFMS::Config; use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.757 Build 210915"; my $version = "7.0NG.758 Build 211105";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;
# Long operations are divided in XX steps for performance # Long operations are divided in XX steps for performance
my $BIG_OPERATION_STEP = 100; # 100 is default my $BIG_OPERATION_STEP = 100; # 100 is default
# Each long operations has a LIMIT of SMALL_OPERATION_STEP to avoid locks. # Each long operations has a LIMIT of SMALL_OPERATION_STEP to avoid locks.
#Increate to 3000~5000 in fast systems decrease to 500 or 250 on systems with lo cks #Increate to 3000~5000 in fast systems decrease to 500 or 250 on systems with lo cks
my $SMALL_OPERATION_STEP = 1000; # 1000 is default my $SMALL_OPERATION_STEP = 1000; # 1000 is default
skipping to change at line 388 skipping to change at line 388
# Delete old log data # Delete old log data
log_message ('PURGE', "Deleting old log data."); log_message ('PURGE', "Deleting old log data.");
if (defined($conf->{'_days_purge_old_information'}) && $conf->{'_days_pur ge_old_information'} > 0) { if (defined($conf->{'_days_purge_old_information'}) && $conf->{'_days_pur ge_old_information'} > 0) {
log_message ('PURGE', 'Deleting log data older than ' . $conf->{' _days_purge_old_information'} . ' days.'); log_message ('PURGE', 'Deleting log data older than ' . $conf->{' _days_purge_old_information'} . ' days.');
enterprise_hook ('pandora_purge_logs', [$dbh, $conf]); enterprise_hook ('pandora_purge_logs', [$dbh, $conf]);
} }
else { else {
log_message ('PURGE', 'days_purge_old_data is set to 0. Old log d ata will not be deleted.'); log_message ('PURGE', 'days_purge_old_data is set to 0. Old log d ata will not be deleted.');
} }
# Delete old log data
log_message ('PURGE', "Deleting old network configuration manager data.")
;
if (defined($conf->{'days_purge_ncm'}) && $conf->{'days_purge_ncm'} > 0)
{
log_message ('PURGE', 'Deleting NCM data older than ' . $conf->{'
days_purge_ncm'} . ' days.');
enterprise_hook ('pandora_purge_ncm', [$dbh, \&log_message, $conf->{'days_pu
rge_ncm'}, $conf->{'_history_db_step'}, $conf->{'_history_db_delay'}]);
} else {
log_message ('PURGE', 'days_purge_ncm is set to 0. Old network co
nfiguration manager data will not be deleted.');
}
# Delete old special days # Delete old special days
log_message ('PURGE', "Deleting old special days."); log_message ('PURGE', "Deleting old special days.");
if ($conf->{'_num_past_special_days'} > 0) { if ($conf->{'_num_past_special_days'} > 0) {
log_message ('PURGE', 'Deleting special days older than ' . $conf ->{'_num_past_special_days'} . ' days.'); log_message ('PURGE', 'Deleting special days older than ' . $conf ->{'_num_past_special_days'} . ' days.');
if (${RDBMS} eq 'oracle') { if (${RDBMS} eq 'oracle') {
db_do ($dbh, "DELETE FROM talert_special_days db_do ($dbh, "DELETE FROM talert_special_days
WHERE \"date\" < SYSDATE - $conf->{'_num_past_spe cial_days'} AND \"date\" > '0001-01-01'"); WHERE \"date\" < SYSDATE - $conf->{'_num_past_spe cial_days'} AND \"date\" > '0001-01-01'");
} }
elsif (${RDBMS} eq 'mysql') { elsif (${RDBMS} eq 'mysql') {
db_do ($dbh, "DELETE FROM talert_special_days db_do ($dbh, "DELETE FROM talert_special_days
 End of changes. 2 change blocks. 
1 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)