mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
2009-08-24 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Config.pm, lib/PandoraFMS/DataServer.pm: Added an option to ignore timestamps in XML data files and use file timestamps instead. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1877 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
58a7a73982
commit
c03ad1f29b
@ -1,3 +1,9 @@
|
|||||||
|
2009-08-24 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Config.pm,
|
||||||
|
lib/PandoraFMS/DataServer.pm: Added an option to ignore timestamps in
|
||||||
|
XML data files and use file timestamps instead.
|
||||||
|
|
||||||
2009-08-23 Sancho Lerena <slerena@artica.es>
|
2009-08-23 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* util/tentacle_serverd: Using SU instead SUDO, idea from
|
* util/tentacle_serverd: Using SU instead SUDO, idea from
|
||||||
|
@ -223,6 +223,9 @@ sub pandora_load_config {
|
|||||||
# Update tagent_access
|
# Update tagent_access
|
||||||
$pa_config->{"agentaccess"} = 1;
|
$pa_config->{"agentaccess"} = 1;
|
||||||
|
|
||||||
|
# Ignore the timestamp in the XML and use the file timestamp instead
|
||||||
|
$pa_config->{'use_xml_timestamp'} = 0;
|
||||||
|
|
||||||
# Check for UID0
|
# Check for UID0
|
||||||
if ($pa_config->{"quiet"} != 0){
|
if ($pa_config->{"quiet"} != 0){
|
||||||
if ($> == 0){
|
if ($> == 0){
|
||||||
@ -485,7 +488,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^agentaccess\s([0-1])/i) {
|
elsif ($parametro =~ m/^agentaccess\s([0-1])/i) {
|
||||||
$pa_config->{'agentaccess'}= clean_blank($1);
|
$pa_config->{'agentaccess'}= clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^use_xml_timestamp\s([0-1])/i) {
|
||||||
|
$pa_config->{'use_xml_timestamp'} = clean_blank($1);
|
||||||
|
}
|
||||||
} # end of loop for parameter #
|
} # end of loop for parameter #
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,6 +137,9 @@ sub data_consumer ($$) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 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');
|
||||||
|
|
||||||
unlink ($file_name);
|
unlink ($file_name);
|
||||||
process_xml_data ($self->getConfig (), $xml_data, $self->getServerID (), $self->getDBH ());
|
process_xml_data ($self->getConfig (), $xml_data, $self->getServerID (), $self->getDBH ());
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user