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
4656b5e8b7
commit
f146163618
|
@ -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>
|
||||
|
||||
* util/tentacle_serverd: Using SU instead SUDO, idea from
|
||||
|
|
|
@ -222,6 +222,9 @@ sub pandora_load_config {
|
|||
|
||||
# Update tagent_access
|
||||
$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
|
||||
if ($pa_config->{"quiet"} != 0){
|
||||
|
@ -485,7 +488,9 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^agentaccess\s([0-1])/i) {
|
||||
$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 #
|
||||
|
||||
|
||||
|
|
|
@ -137,6 +137,9 @@ sub data_consumer ($$) {
|
|||
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);
|
||||
process_xml_data ($self->getConfig (), $xml_data, $self->getServerID (), $self->getDBH ());
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue