Merge branch 'ent-5331-implementar-monitorizacion-de-ms-SQL-Server-en-discovery-como-el-de-oracle' into 'develop'

add discovery_app_microsoft_sql_serve on task list

See merge request artica/pandorafms!3058
This commit is contained in:
Daniel Rodriguez 2021-03-18 09:56:31 +00:00
commit 9c4a6a56c7
4 changed files with 24 additions and 0 deletions

View File

@ -761,6 +761,16 @@ class DiscoveryTaskList extends HTML
$data[6] .= __('Discovery.Agent.Deployment');
break;
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
// Discovery Applications Oracle.
$data[6] = html_print_image(
'images/network.png',
true,
['title' => __('Discovery Applications Microsoft SQL Server')]
).'  ';
$data[6] .= __('Discovery.App.Microsoft SQL Server');
break;
case DISCOVERY_HOSTDEVICES:
default:
if ($task['id_recon_script'] == 0) {
@ -1042,6 +1052,9 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_MYSQL:
return 'wiz=app&mode=mysql&page=0';
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
return 'wiz=app&mode=MicrosoftSQLServer&page=0';
case DISCOVERY_APP_ORACLE:
return 'wiz=app&mode=oracle&page=0';

View File

@ -140,6 +140,9 @@ discoveryserver 1
# Discovery SAP utils (PANDORA FMS ENTERPRISE ONLY)
# sap_utils /usr/share/pandora_server/util/recon_scripts/SAP
# Discovery Microsoft SQL ODBC driver (PANDORA FMS ENTERPRISE ONLY)
# mssql_driver ODBC Driver 17 for SQL Server
# pluginserver : 1 or 0. Set to 1 to activate plugin server with this setup
pluginserver 1

View File

@ -330,6 +330,7 @@ sub pandora_load_config {
$pa_config->{"dynamic_updates"} = 5; # 7.0
$pa_config->{"dynamic_warning"} = 25; # 7.0
$pa_config->{"dynamic_constant"} = 10; # 7.0
$pa_config->{"mssql_driver"} = undef; # 745
# Internal MTA for alerts, each server need its own config.
$pa_config->{"mta_address"} = ''; # Introduced on 2.0
@ -1186,6 +1187,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^dynamic_constant\s+([0-9]*)/i) {
$pa_config->{'dynamic_constant'}= clean_blank($1);
}
elsif ($parametro =~ m/^mssql_driver\s+(.*)/i) {
$pa_config->{'mssql_driver'}= clean_blank($1);
}
elsif ($parametro =~ m/^logstash_host\s+(.*)/i) {
$pa_config->{'logstash_host'}= clean_blank($1);

View File

@ -1713,6 +1713,8 @@ sub app_scan($) {
$type = 'Oracle';
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2) {
$type = 'DB2';
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER) {
$type = 'MSSQL';
} elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) {
$type = 'SAP';
} else {
@ -1797,6 +1799,7 @@ sub app_scan($) {
if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER
) {
# Database.
@ -1905,6 +1908,7 @@ sub scan($) {
if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_DB2
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_MICROSOFT_SQL_SERVER
|| $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) {
# Application scan.
$self->call('message', "Scanning application ...", 6);