Merge branch 'ent-7595-12357-prototipo-event-server-paralelizado-y-con-recuperacion-de-alertas-bingo-card' into 'develop'

CorrelationServer

See merge request artica/pandorafms!4377
This commit is contained in:
Daniel Rodriguez 2021-10-29 10:07:25 +00:00
commit 3883c99804
21 changed files with 121 additions and 51 deletions

View File

@ -664,7 +664,7 @@ function mainAgentsModules()
$name = $module; $name = $module;
$modules_by_name[$cont]['name'] = $name; $modules_by_name[$cont]['name'] = $name;
$modules_by_name[$cont]['id'][] = $key; $modules_by_name[$cont]['id'][] = $key;
$cont ++; $cont++;
} }
} }

View File

@ -124,4 +124,7 @@ INSERT IGNORE INTO `tncm_script` VALUES
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5); INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5);
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
COMMIT; COMMIT;

View File

@ -712,6 +712,8 @@ ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL defau
ALTER TABLE `tevent_alert` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0; ALTER TABLE `tevent_alert` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0;
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0; ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0; ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `tevent_alert_action` -- Table `tevent_alert_action`

View File

@ -85,7 +85,7 @@ if ($create_profiles) {
); );
$return = profile_create_user_profile($user, $profile, $group); $return = profile_create_user_profile($user, $profile, $group);
if ($return !== false) { if ($return !== false) {
$n_added ++; $n_added++;
} }
} }
} }

View File

@ -219,7 +219,8 @@ $alertstab = [
'title' => __('Alerts operations'), 'title' => __('Alerts operations'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
).'</a>', 'active' => $tab == 'massive_alerts', ).'</a>',
'active' => $tab == 'massive_alerts',
]; ];
$userstab = [ $userstab = [
@ -230,7 +231,8 @@ $userstab = [
'title' => __('Users operations'), 'title' => __('Users operations'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
).'</a>', 'active' => $tab == 'massive_users', ).'</a>',
'active' => $tab == 'massive_users',
]; ];
$agentstab = [ $agentstab = [
@ -241,7 +243,8 @@ $agentstab = [
'title' => __('Agents operations'), 'title' => __('Agents operations'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
).'</a>', 'active' => $tab == 'massive_agents', ).'</a>',
'active' => $tab == 'massive_agents',
]; ];
$modulestab = [ $modulestab = [
@ -252,7 +255,8 @@ $agentstab = [
'title' => __('Modules operations'), 'title' => __('Modules operations'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
).'</a>', 'active' => $tab == 'massive_modules', ).'</a>',
'active' => $tab == 'massive_modules',
]; ];
$pluginstab = [ $pluginstab = [
@ -263,7 +267,8 @@ $agentstab = [
'title' => __('Plugins operations'), 'title' => __('Plugins operations'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
).'</a>', 'active' => $tab == 'massive_plugins', ).'</a>',
'active' => $tab == 'massive_plugins',
]; ];
$policiestab = enterprise_hook('massive_policies_tab'); $policiestab = enterprise_hook('massive_policies_tab');

View File

@ -3772,23 +3772,23 @@ function print_SLA_list($width, $action, $idItem=null)
], ],
] ]
); );
if (!empty($services_tmp) if (!empty($services_tmp)
&& $services_tmp != ENTERPRISE_NOT_HOOK && $services_tmp != ENTERPRISE_NOT_HOOK
) {
foreach ($services_tmp as $service) {
$check_module_sla = modules_check_agentmodule_exists(
$service['sla_id_module']
);
$check_module_sla_value = modules_check_agentmodule_exists(
$service['sla_value_id_module']
);
if ($check_module_sla
&& $check_module_sla_value
) { ) {
$services[$service['id']] = $service['name']; foreach ($services_tmp as $service) {
$check_module_sla = modules_check_agentmodule_exists(
$service['sla_id_module']
);
$check_module_sla_value = modules_check_agentmodule_exists(
$service['sla_value_id_module']
);
if ($check_module_sla
&& $check_module_sla_value
) {
$services[$service['id']] = $service['name'];
}
}
} }
}
}
echo '<td class="sla_list_service_col">'; echo '<td class="sla_list_service_col">';
echo html_print_select( echo html_print_select(

View File

@ -231,8 +231,8 @@ if (isset($_GET['server'])) {
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
$(document).ready (function () { $(document).ready (function () {
var id_server = <?php echo $id_server; ?>; var id_server = '<?php echo $id_server; ?>';
var server_type = <?php echo $row['server_type']; ?>; var server_type = '<?php echo $row['server_type']; ?>';
$("#check_exec_server img").on("click", function () { $("#check_exec_server img").on("click", function () {
$("#check_exec_server img").attr("src", "images/spinner.gif"); $("#check_exec_server img").attr("src", "images/spinner.gif");

View File

@ -178,7 +178,8 @@ class DiscoveryTaskList extends HTML
'attributes' => 'class="sub cancel"', 'attributes' => 'class="sub cancel"',
'return' => true, 'return' => true,
], ],
],[ ],
[
'class' => 'action-buttons rule-builder-actions', 'class' => 'action-buttons rule-builder-actions',
'arguments' => [ 'arguments' => [
'name' => 'refresh', 'name' => 'refresh',

View File

@ -149,7 +149,7 @@ class CredentialStore extends Wizard
* @param string $ajax_controller Path of ajaxController, is the 'page' * @param string $ajax_controller Path of ajaxController, is the 'page'
* variable sent in ajax calls. * variable sent in ajax calls.
* *
* @return Object * @return object
*/ */
public function __construct($ajax_controller) public function __construct($ajax_controller)
{ {

View File

@ -425,6 +425,7 @@ define('SERVER_TYPE_SYSLOG', 18);
define('SERVER_TYPE_AUTOPROVISION', 19); define('SERVER_TYPE_AUTOPROVISION', 19);
define('SERVER_TYPE_MIGRATION', 20); define('SERVER_TYPE_MIGRATION', 20);
define('SERVER_TYPE_ALERT', 21); define('SERVER_TYPE_ALERT', 21);
define('SERVER_TYPE_CORRELATION', 22);
define('SERVER_TYPE_NCM', 23); define('SERVER_TYPE_NCM', 23);
// REPORTS. // REPORTS.

View File

@ -2092,7 +2092,7 @@ function get_snmpwalk(
$snmpwalk = []; $snmpwalk = [];
// Check if OID is available. // Check if OID is available.
if (count($output) == 1 && strpos($output[0], "No Such Object available on this agent at this OID") !== false) { if (count($output) == 1 && strpos($output[0], 'No Such Object available on this agent at this OID') !== false) {
return $snmpwalk; return $snmpwalk;
} }

View File

@ -573,7 +573,7 @@ function netflow_get_data(
while ($pos > 0) { while ($pos > 0) {
$number = ($number * 1000); $number = ($number * 1000);
$pos --; $pos--;
} }
$values['data'][$interval_end][$line['agg']] = $number; $values['data'][$interval_end][$line['agg']] = $number;

View File

@ -2702,7 +2702,7 @@ function reporting_agent_module($report, $content)
foreach ($modules as $modul_id) { foreach ($modules as $modul_id) {
$modules_by_name[$cont]['name'] = io_safe_output(modules_get_agentmodule_name($modul_id)); $modules_by_name[$cont]['name'] = io_safe_output(modules_get_agentmodule_name($modul_id));
$modules_by_name[$cont]['id'] = $modul_id; $modules_by_name[$cont]['id'] = $modul_id;
$cont ++; $cont++;
} }
if ($modules_by_name == false || $agents == false) { if ($modules_by_name == false || $agents == false) {
@ -14153,31 +14153,31 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
$array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_NOT_INIT; $array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_NOT_INIT;
// NOT INIT. // NOT INIT.
$time_not_init = ($time_not_init + ($tend - $tstart)); $time_not_init = ($time_not_init + ($tend - $tstart));
$data_not_init ++; $data_not_init++;
} else if ($tacum_data === null) { } else if ($tacum_data === null) {
$array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_UNKNOWN; $array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_UNKNOWN;
// UNKNOWN. // UNKNOWN.
$time_unknown = ($time_unknown + ($tend - $tstart)); $time_unknown = ($time_unknown + ($tend - $tstart));
$data_unknown ++; $data_unknown++;
} else if (( (isset($min_value_critical) || isset($max_value_critical)) && ($modules_is_string === false) && ($sla_check_value_critical == true) ) } else if (( (isset($min_value_critical) || isset($max_value_critical)) && ($modules_is_string === false) && ($sla_check_value_critical == true) )
|| ( isset($max_value_critical) && ($modules_is_string === true) && $string_check_value_critical ) || ( isset($max_value_critical) && ($modules_is_string === true) && $string_check_value_critical )
) { ) {
$array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_CRITICAL_BAD; $array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_CRITICAL_BAD;
// CRITICAL. // CRITICAL.
$time_critical = ($time_critical + ($tend - $tstart)); $time_critical = ($time_critical + ($tend - $tstart));
$data_critical ++; $data_critical++;
} else if (( (isset($min_value_warning) || isset($max_value_warning)) && ($modules_is_string === false) && ($sla_check_value_warning == true) ) } else if (( (isset($min_value_warning) || isset($max_value_warning)) && ($modules_is_string === false) && ($sla_check_value_warning == true) )
|| ( isset($max_value_warning) && ($modules_is_string === true) && $sla_check_value_warning ) || ( isset($max_value_warning) && ($modules_is_string === true) && $sla_check_value_warning )
) { ) {
$array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_WARNING; $array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_WARNING;
// WARNING. // WARNING.
$time_warning = ($time_warning + ($tend - $tstart)); $time_warning = ($time_warning + ($tend - $tstart));
$data_warning ++; $data_warning++;
} else { } else {
$array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_NORMAL; $array_graph[$data_total]['data'] = AGENT_MODULE_STATUS_NORMAL;
// OK. // OK.
$time_ok = ($time_ok + ($tend - $tstart)); $time_ok = ($time_ok + ($tend - $tstart));
$data_ok ++; $data_ok++;
} }
$array_graph[$data_total]['utimestamp'] = ($tend - $tstart); $array_graph[$data_total]['utimestamp'] = ($tend - $tstart);

View File

@ -696,6 +696,19 @@ function servers_get_info($id_server=-1)
$id_modulo = 2; $id_modulo = 2;
break; break;
case SERVER_TYPE_CORRELATION:
$server['img'] = html_print_image(
'images/lightning_go.png',
true,
[
'title' => __('Correlation server'),
'class' => 'invert_filter',
]
);
$server['type'] = 'correlation';
$id_modulo = 0;
break;
case SERVER_TYPE_ENTERPRISE_ICMP: case SERVER_TYPE_ENTERPRISE_ICMP:
$server['img'] = html_print_image( $server['img'] = html_print_image(
'images/network.png', 'images/network.png',

View File

@ -549,13 +549,13 @@ $table_ichanges = '<div class="autorefresh_select">
</div> </div>
<div class="autorefresh_select_arrows" style="display:grid"> <div class="autorefresh_select_arrows" style="display:grid">
<a href="javascript:">'.html_print_image( <a href="javascript:">'.html_print_image(
'images/darrowright_green.png', 'images/darrowright_green.png',
true, true,
[ [
'id' => 'right_autorefreshlist', 'id' => 'right_autorefreshlist',
'alt' => __('Push selected pages into autorefresh list'), 'alt' => __('Push selected pages into autorefresh list'),
'title' => __('Push selected pages into autorefresh list'), 'title' => __('Push selected pages into autorefresh list'),
] ]
).'</a> ).'</a>
<a href="javascript:">'.html_print_image( <a href="javascript:">'.html_print_image(
'images/darrowleft_green.png', 'images/darrowleft_green.png',

View File

@ -3022,6 +3022,8 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` (
`disable_event` tinyint(1) default 0, `disable_event` tinyint(1) default 0,
`id_template_conditions` int(10) unsigned NOT NULL default 0, `id_template_conditions` int(10) unsigned NOT NULL default 0,
`id_template_fields` int(10) unsigned NOT NULL default 0, `id_template_fields` int(10) unsigned NOT NULL default 0,
`last_evaluation` bigint(20) NOT NULL default 0,
`pool_occurrences` int unsigned not null default 0,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -478,6 +478,14 @@ export_threads 1
eventserver 0 eventserver 0
# Enable (1) or disable (0) Pandora FMS Correlation Server (PANDORA FMS ENTERPRISE ONLY).
correlationserver 0
# Time in seconds to re-evaluate correlation alerts pool (PANDORA FMS ENTERPRISE ONLY).
correlation_threshold 30
# Correlated alerts, event window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY). # Correlated alerts, event window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY).
event_window 3600 event_window 3600

View File

@ -305,6 +305,8 @@ sub pandora_load_config {
$pa_config->{"google_maps_description"} = 0; $pa_config->{"google_maps_description"} = 0;
$pa_config->{'openstreetmaps_description'} = 0; $pa_config->{'openstreetmaps_description'} = 0;
$pa_config->{"eventserver"} = 1; # 4.0 $pa_config->{"eventserver"} = 1; # 4.0
$pa_config->{"correlationserver"} = 0; # 757
$pa_config->{"correlation_threshold"} = 30; # 757
$pa_config->{"event_window"} = 3600; # 4.0 $pa_config->{"event_window"} = 3600; # 4.0
$pa_config->{"log_window"} = 3600; # 7.741 $pa_config->{"log_window"} = 3600; # 7.741
$pa_config->{"elastic_query_size"} = 10; # 7.754 Elements per request (ELK) $pa_config->{"elastic_query_size"} = 10; # 7.754 Elements per request (ELK)
@ -793,6 +795,12 @@ sub pandora_load_config {
elsif ($parametro =~ m/^eventserver\s+([0-9]*)/i) { elsif ($parametro =~ m/^eventserver\s+([0-9]*)/i) {
$pa_config->{'eventserver'}= clean_blank($1); $pa_config->{'eventserver'}= clean_blank($1);
} }
elsif ($parametro =~ m/^correlationserver\s+([0-9]*)/i) {
$pa_config->{'correlationserver'}= clean_blank($1);
}
elsif ($parametro =~ m/^correlation_threshold\s+([0-9]*)/i) {
$pa_config->{'correlation_threshold'}= clean_blank($1);
}
elsif ($parametro =~ m/^icmpserver\s+([0-9]*)/i) { elsif ($parametro =~ m/^icmpserver\s+([0-9]*)/i) {
$pa_config->{'icmpserver'}= clean_blank($1); $pa_config->{'icmpserver'}= clean_blank($1);
} }

View File

@ -281,7 +281,31 @@ our @EXPORT = qw(
# Some global variables # Some global variables
our @DayNames = qw(sunday monday tuesday wednesday thursday friday saturday); our @DayNames = qw(sunday monday tuesday wednesday thursday friday saturday);
our @ServerTypes = qw (dataserver networkserver snmpconsole reconserver pluginserver predictionserver wmiserver exportserver inventoryserver webserver eventserver icmpserver snmpserver satelliteserver transactionalserver mfserver syncserver wuxserver syslogserver provisioningserver migrationserver); our @ServerTypes = qw (
dataserver
networkserver
snmpconsole
reconserver
pluginserver
predictionserver
wmiserver
exportserver
inventoryserver
webserver
eventserver
icmpserver
snmpserver
satelliteserver
transactionalserver
mfserver
syncserver
wuxserver
syslogserver
provisioningserver
migrationserver
alertserver
correlationserver
);
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter'); our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');
# Event storm protection (no alerts or events) # Event storm protection (no alerts or events)
@ -639,7 +663,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) {
] ]
); );
return $status unless (defined ($rc) && $rc == 1); return $status unless !PandoraFMS::Tools::is_empty($rc) && $rc == 1;
} }
# Check min and max alert limits # Check min and max alert limits
@ -709,7 +733,7 @@ sub pandora_process_alert ($$$$$$$$;$$) {
# Generate an event # Generate an event
if ($table eq 'tevent_alert') { if ($table eq 'tevent_alert') {
pandora_event ($pa_config, "Alert ceased (" . pandora_event ($pa_config, "Correlated alert ceased (" .
safe_output($alert->{'name'}) . ")", 0, 0, $alert->{'priority'}, $id, safe_output($alert->{'name'}) . ")", 0, 0, $alert->{'priority'}, $id,
(defined ($alert->{'id_agent_module'}) ? $alert->{'id_agent_module'} : 0), (defined ($alert->{'id_agent_module'}) ? $alert->{'id_agent_module'} : 0),
"alert_ceased", 0, $dbh, 'monitoring_server', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions); "alert_ceased", 0, $dbh, 'monitoring_server', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
@ -738,7 +762,7 @@ sub pandora_process_alert ($$$$$$$$;$$) {
if ($pa_config->{'alertserver'} == 1 && defined ($alert->{'id_template_module'})) { if ($pa_config->{'alertserver'} == 1 && defined ($alert->{'id_template_module'})) {
pandora_queue_alert($pa_config, $dbh, $data, $alert, 0, $extra_macros); pandora_queue_alert($pa_config, $dbh, $data, $alert, 0, $extra_macros);
} else { } else {
pandora_execute_alert ($pa_config, $data, $agent, $module, $alert, 0, $dbh, $timestamp, 0, $extra_macros); pandora_execute_alert ($pa_config, $data, $agent, $module, $alert, 0, $dbh, $timestamp, 0, $extra_macros, $is_correlated_alert);
} }
return; return;
} }
@ -774,7 +798,7 @@ sub pandora_process_alert ($$$$$$$$;$$) {
# Update alert status # Update alert status
$alert->{'times_fired'} += 1; $alert->{'times_fired'} += 1;
$alert->{'internal_counter'} += 1; $alert->{'internal_counter'} += 1;
db_do($dbh, 'UPDATE ' . $table . ' SET times_fired = ?, db_do($dbh, 'UPDATE ' . $table . ' SET times_fired = ?,
last_fired = ?, internal_counter = ? ' . $new_interval . ' WHERE id = ?', last_fired = ?, internal_counter = ? ' . $new_interval . ' WHERE id = ?',
$alert->{'times_fired'}, $utimestamp, $alert->{'internal_counter'}, $id); $alert->{'times_fired'}, $utimestamp, $alert->{'internal_counter'}, $id);
@ -983,7 +1007,7 @@ sub pandora_execute_alert ($$$$$$$$$;$$) {
$text = "Correlated alert $text"; $text = "Correlated alert $text";
pandora_event ( pandora_event (
$pa_config, $pa_config,
"$text (" . safe_output($alert->{'name'}) . ") " . (defined ($module) ? 'assigned to ('. safe_output($module->{'nombre'}) . ")" : ""), "$text (" . safe_output($alert->{'name'}) . ") ",
(defined ($agent) ? $agent->{'id_grupo'} : 0), (defined ($agent) ? $agent->{'id_grupo'} : 0),
# id agent. # id agent.
0, 0,

View File

@ -917,7 +917,7 @@ sub get_db_value_limit ($$$;@) {
########################################################################## ##########################################################################
## Get a single row returned by an SQL query as a hash reference. Returns ## Get a single row returned by an SQL query as a hash reference. Returns
## -1 on error. ## hash or undef on error.
########################################################################## ##########################################################################
sub get_db_single_row ($$;@) { sub get_db_single_row ($$;@) {
my ($dbh, $query, @values) = @_; my ($dbh, $query, @values) = @_;

View File

@ -67,6 +67,7 @@ our @EXPORT = qw(
INVENTORYSERVER INVENTORYSERVER
WEBSERVER WEBSERVER
EVENTSERVER EVENTSERVER
CORRELATIONSERVER
ICMPSERVER ICMPSERVER
SNMPSERVER SNMPSERVER
SATELLITESERVER SATELLITESERVER
@ -192,6 +193,7 @@ use constant SYSLOGSERVER => 18;
use constant PROVISIONINGSERVER => 19; use constant PROVISIONINGSERVER => 19;
use constant MIGRATIONSERVER => 20; use constant MIGRATIONSERVER => 20;
use constant ALERTSERVER => 21; use constant ALERTSERVER => 21;
use constant CORRELATIONSERVER => 22;
use constant NCMSERVER => 23; use constant NCMSERVER => 23;
# Module status # Module status
@ -780,12 +782,12 @@ sub md5check {
sub logger ($$;$) { sub logger ($$;$) {
my ($pa_config, $message, $level) = @_; my ($pa_config, $message, $level) = @_;
# Clean any string and ready to be printed in screen/file
$message = safe_output ($message);
$level = 1 unless defined ($level); $level = 1 unless defined ($level);
return if (!defined ($pa_config->{'verbosity'}) || $level > $pa_config->{'verbosity'}); return if (!defined ($pa_config->{'verbosity'}) || $level > $pa_config->{'verbosity'});
# Clean any string and ready to be printed in screen/file
$message = safe_output ($message);
if (!defined($pa_config->{'log_file'})) { if (!defined($pa_config->{'log_file'})) {
print strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " [V". $level ."] " . $message . "\n"; print strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " [V". $level ."] " . $message . "\n";
return; return;
@ -2524,6 +2526,7 @@ sub get_server_name {
return "PROVISIONINGSERVER" if ($server_type eq PROVISIONINGSERVER); return "PROVISIONINGSERVER" if ($server_type eq PROVISIONINGSERVER);
return "MIGRATIONSERVER" if ($server_type eq MIGRATIONSERVER); return "MIGRATIONSERVER" if ($server_type eq MIGRATIONSERVER);
return "ALERTSERVER" if ($server_type eq ALERTSERVER); return "ALERTSERVER" if ($server_type eq ALERTSERVER);
return "CORRELATIONSERVER" if ($server_type eq CORRELATIONSERVER);
return "UNKNOWN"; return "UNKNOWN";
} }