2009-10-16 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DataServer.pm: Do not process disabled modules. * bin/pandora_server: Start logging before trying to connect to the DB. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2026 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
cd2523b6fd
commit
049fc54e6a
|
@ -1,3 +1,9 @@
|
|||
2009-10-16 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/DataServer.pm: Do not process disabled modules.
|
||||
|
||||
* bin/pandora_server: Start logging before trying to connect to the DB.
|
||||
|
||||
2009-10-16 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Keepalive was not working properly. Keepalive
|
||||
|
|
|
@ -60,15 +60,15 @@ sub pandora_shutdown () {
|
|||
########################################################################################
|
||||
sub pandora_startup () {
|
||||
|
||||
# Start logging
|
||||
pandora_start_log (\%Config);
|
||||
|
||||
# Connect to the DB
|
||||
$DBH = db_connect ('mysql', $Config{'dbname'}, $Config{'dbhost'}, 3306,
|
||||
$Config{'dbuser'}, $Config{'dbpass'});
|
||||
|
||||
pandora_audit (\%Config, 'Pandora FMS Server Daemon starting', 'SYSTEM', 'System', $DBH);
|
||||
|
||||
# Start logging
|
||||
pandora_start_log (\%Config);
|
||||
|
||||
# Load servers
|
||||
pandora_reset_server (\%Config, $DBH);
|
||||
push (@Servers, new PandoraFMS::DataServer (\%Config, $DBH));
|
||||
|
|
|
@ -133,7 +133,7 @@ sub data_consumer ($$) {
|
|||
next;
|
||||
}
|
||||
|
||||
# Ignore the timestamp in the XML and use the file timestamp instead
|
||||
# Ignore the timestamp in the XML and use the file timestamp instead
|
||||
$xml_data->{'timestamp'} = strftime ("%Y-%m-%d %H:%M:%S", localtime((stat($file_name))[9])) if ($pa_config->{'use_xml_timestamp'} eq '1' || ! defined ($xml_data->{'timestamp'}));
|
||||
|
||||
unlink ($file_name);
|
||||
|
@ -274,6 +274,9 @@ sub process_module_data ($$$$$$$$$) {
|
|||
return unless defined $module;
|
||||
}
|
||||
|
||||
# Module disabled!
|
||||
return if ($module->{'disabled'} eq '1');
|
||||
|
||||
# Parse the timestamp and process the module
|
||||
if ($timestamp =~ /(\d+)\/(\d+)\/(\d+) +(\d+):(\d+):(\d+)/ ||
|
||||
$timestamp =~ /(\d+)\-(\d+)\-(\d+) +(\d+):(\d+):(\d+)/) {
|
||||
|
|
Loading…
Reference in New Issue