From a4db8483d11813cf2439130a37e518b1b1931509 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 26 Nov 2019 15:47:04 +0100 Subject: [PATCH] Discovery Applications minor fixes - SAP backend --- pandora_server/lib/PandoraFMS/Config.pm | 6 ++++++ pandora_server/lib/PandoraFMS/Recon/Base.pm | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 5b502cd82f..d22cb53edd 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -356,6 +356,9 @@ sub pandora_load_config { # Discovery SAP utils $pa_config->{"sap_utils"} = "/usr/share/pandora_server/util/recon_scripts/SAP"; + + # Discovery SAP Artica environment + $pa_config->{"sap_artica_test"} = 0; # braa for enterprise snmp server $pa_config->{"braa"} = "/usr/bin/braa"; @@ -855,6 +858,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^sap_utils\s(.*)/i) { $pa_config->{'sap_utils'}= clean_blank($1); } + elsif ($parametro =~ m/^sap_artica_test\s(.*)/i) { + $pa_config->{'sap_artica_test'}= clean_blank($1); + } elsif ($parametro =~ m/^nmap_timing_template\s+([0-9]*)/i) { $pa_config->{'nmap_timing_template'}= clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 9b2a725ae2..0315634843 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1556,8 +1556,8 @@ sub database_scan($$$) { } return { - 'modules' => @modules, - 'data' => @data + 'modules' => \@modules, + 'data' => \@data }; } @@ -1671,14 +1671,16 @@ sub app_scan($) { } + print Dumper($results); + # Add results. if (ref($results) eq 'HASH') { if (defined($results->{'modules'})) { - push @modules, $results->{'modules'}; + push @modules, @{$results->{'modules'}}; } if (defined($results->{'data'})) { - push @data, $results->{'data'}; + push @data, @{$results->{'data'}}; } } }