2011-06-22 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Config.pm: Added a new SNMP server (enterprise).

	* lib/PandoraFMS/NetworkServer.pm: Small fixes.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4479 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2011-06-22 16:39:00 +00:00
parent 0f8cda3a58
commit 151313e03f
3 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2011-06-22 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Config.pm: Added a new SNMP server (enterprise).
* lib/PandoraFMS/NetworkServer.pm: Small fixes.
2011-06-21 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/DataServer.pm: Fixed numeric condition in a string

View File

@ -238,7 +238,9 @@ sub pandora_load_config {
$pa_config->{"event_window"} = 3600; # 4.0
$pa_config->{"icmpserver"} = 1; # 4.0
$pa_config->{"icmp_threads"} = 3; # 4.0
$pa_config->{"block_size"} = 50; # 4.0
$pa_config->{"snmpserver"} = 1; # 4.0
$pa_config->{"snmp_threads"} = 3; # 4.0
$pa_config->{"block_size"} = 15; # 4.0
$pa_config->{"max_queue_files"} = 500;
@ -253,6 +255,9 @@ sub pandora_load_config {
# nmap for recon OS fingerprinting and tcpscan (optional)
$pa_config->{"nmap"} = "/usr/bin/nmap";
# braa for enterprise snmp server
$pa_config->{"braa"} = "/usr/bin/braa";
# Xprobe2 for recon OS fingerprinting and tcpscan (optional)
$pa_config->{"xprobe2"} = "/usr/bin/xprobe2";
@ -513,6 +518,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^nmap\s(.*)/i) {
$pa_config->{'nmap'}= clean_blank($1);
}
elsif ($parametro =~ m/^braa\s(.*)/i) {
$pa_config->{'braa'}= clean_blank($1);
}
elsif ($parametro =~ m/^xprobe2\s(.*)/i) {
$pa_config->{'xprobe2'}= clean_blank($1);
}

View File

@ -87,7 +87,8 @@ sub data_producer ($) {
my @tasks;
my @rows;
my $network_filter = enterprise_hook ('get_network_filter', [$pa_config]);
if ($pa_config->{'pandora_master'} == 0) {
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left, last_execution_try
FROM tagente, tagente_modulo, tagente_estado
@ -96,7 +97,7 @@ sub data_producer ($) {
AND tagente.disabled = 0
AND tagente_modulo.id_tipo_modulo > 4
AND tagente_modulo.id_tipo_modulo < 19 '
. enterprise_hook ('get_network_filter', []) .
. (defined ($network_filter) ? $network_filter : ' ') .
'AND tagente_modulo.disabled = 0
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND (tagente_modulo.flag = 1 OR ((tagente_estado.last_execution_try + tagente_estado.current_interval) < UNIX_TIMESTAMP()))
@ -110,7 +111,7 @@ sub data_producer ($) {
AND tagente_modulo.disabled = 0
AND tagente_modulo.id_tipo_modulo > 4
AND tagente_modulo.id_tipo_modulo < 19 '
. enterprise_hook ('get_network_filter', []) .
. (defined ($network_filter) ? $network_filter : ' ') .
'AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND (tagente_modulo.flag = 1 OR ((tagente_estado.last_execution_try + tagente_estado.current_interval) < UNIX_TIMESTAMP()))
ORDER BY tagente_modulo.flag DESC, time_left DESC, tagente_estado.last_execution_try ASC', $pa_config->{'servername'});