2012-10-24 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf, lib/PandoraFMS/Config.pm, lib/PandoraFMS/DataServer.pm: Added a new configuration option to make the data server process XML files in a stack instead of a queue. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7086 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
964c124ade
commit
8a6296caa2
|
@ -1,3 +1,10 @@
|
|||
2012-10-24 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* conf/pandora_server.conf,
|
||||
lib/PandoraFMS/Config.pm,
|
||||
lib/PandoraFMS/DataServer.pm: Added a new configuration option to
|
||||
make the data server process XML files in a stack instead of a queue.
|
||||
|
||||
2012-10-23 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Added new macros. Execute alerts after the
|
||||
|
|
|
@ -350,3 +350,8 @@ netflow_interval 300
|
|||
|
||||
# Base directory where netflow files will be stored.
|
||||
netflow_basedir /tmp
|
||||
|
||||
# If set to 1, process XML data files in a stack instead of a queue. 0 by default.
|
||||
# WARNING: Incremental modules will not work properly if dataserver_lifo is set to 1!!!
|
||||
dataserver_lifo 0
|
||||
|
||||
|
|
|
@ -278,6 +278,9 @@ sub pandora_load_config {
|
|||
# Self monitoring
|
||||
$pa_config->{'self_monitoring'} = 0;
|
||||
|
||||
# Process XML data files as a stack
|
||||
$pa_config->{"dataserver_lifo"} = 0; # 5.0
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# This values are not stored in .conf files.
|
||||
# This values should be stored in database, not in .conf files!
|
||||
|
@ -615,6 +618,9 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^block_size\s+([0-9]*)/i) {
|
||||
$pa_config->{'block_size'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^dataserver_lifo\s+([0-1])/i) {
|
||||
$pa_config->{'dataserver_lifo'}= clean_blank($1);
|
||||
}
|
||||
} # end of loop for parameter #
|
||||
|
||||
# Set to RDBMS' standard port
|
||||
|
|
|
@ -110,8 +110,12 @@ sub data_producer ($) {
|
|||
|
||||
# Temporarily disable warnings (some files may have been deleted)
|
||||
{
|
||||
no warnings;
|
||||
@tasks = sort { -C $pa_config->{'incomingdir'} . "/$b" <=> -C $pa_config->{'incomingdir'} . "/$a" } (@files);
|
||||
no warnings;
|
||||
if ($pa_config->{'dataserver_lifo'} == 0) {
|
||||
@tasks = sort { -C $pa_config->{'incomingdir'} . "/$b" <=> -C $pa_config->{'incomingdir'} . "/$a" } (@files);
|
||||
} else {
|
||||
@tasks = sort { -C $pa_config->{'incomingdir'} . "/$a" <=> -C $pa_config->{'incomingdir'} . "/$b" } (@files);
|
||||
}
|
||||
}
|
||||
|
||||
return @tasks;
|
||||
|
|
Loading…
Reference in New Issue