mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'develop' into '1505-acl-de-grupos-para-los-elementos-de-la-consola-visual-dev'
# Conflicts: # pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
This commit is contained in:
commit
a72f7b006e
@ -1,5 +1,15 @@
|
|||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
|
SET @st_oum708 = (SELECT IF(
|
||||||
|
(SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled') > 0,
|
||||||
|
"ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL",
|
||||||
|
"SELECT 1"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE pr_oum708 FROM @st_oum708;
|
||||||
|
EXECUTE pr_oum708;
|
||||||
|
DEALLOCATE PREPARE pr_oum708;
|
||||||
|
|
||||||
ALTER TABLE tagente ADD COLUMN `safe_mode_module` int(10) unsigned NOT NULL default '0';
|
ALTER TABLE tagente ADD COLUMN `safe_mode_module` int(10) unsigned NOT NULL default '0';
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
@ -1157,10 +1157,10 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
|
|||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 7);
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 9);
|
||||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '714');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '716');
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime_agents`
|
-- Table `tplanned_downtime_agents`
|
||||||
@ -1342,6 +1342,10 @@ SET @vv1 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema =
|
|||||||
IF @vv1>0 THEN
|
IF @vv1>0 THEN
|
||||||
ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
|
ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
|
||||||
END IF;
|
END IF;
|
||||||
|
SET @vv2 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled');
|
||||||
|
IF @vv2>0 THEN
|
||||||
|
ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL;
|
||||||
|
END IF;
|
||||||
END;
|
END;
|
||||||
//
|
//
|
||||||
delimiter ;
|
delimiter ;
|
||||||
|
@ -1594,7 +1594,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '',
|
|||||||
case '2c':
|
case '2c':
|
||||||
case '1':
|
case '1':
|
||||||
default:
|
default:
|
||||||
$command_str = $snmpwalk_bin . ' -m ALL -Oa -v ' . escapeshellarg($snmp_version) . ' -c ' . escapeshellarg($snmp_community) . ' ' . escapeshellarg($ip_target) . ' ' . $base_oid . ' 2> ' . $error_redir_dir;
|
$command_str = $snmpwalk_bin . ' -m ALL -Oa -v ' . escapeshellarg($snmp_version) . ' -c ' . escapeshellarg(io_safe_output($snmp_community)) . ' ' . escapeshellarg($ip_target) . ' ' . $base_oid . ' 2> ' . $error_redir_dir;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1060,8 +1060,8 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Short name
|
// Short name
|
||||||
$name = $agent["nombre"];
|
$name = io_safe_output($agent["nombre"]);
|
||||||
if ($cut_names) {
|
if ((strlen ($name) > 16) && ($cut_names)) {
|
||||||
$name = ui_print_truncate_text($name, 16, false, true, false);
|
$name = ui_print_truncate_text($name, 16, false, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1111,7 +1111,7 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
|
|||||||
}
|
}
|
||||||
|
|
||||||
$node = "\n" . $agent['id_node'].' [ parent="' . $agent['id_parent'] . '", color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.40, height=0.40, label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' . $img_node . '</TD></TR>
|
$node = "\n" . $agent['id_node'].' [ parent="' . $agent['id_parent'] . '", color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.40, height=0.40, label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' . $img_node . '</TD></TR>
|
||||||
<TR><TD>'.$name.'</TD></TR></TABLE>>,
|
<TR><TD>'.io_safe_input($name).'</TD></TR></TABLE>>,
|
||||||
shape="doublecircle", URL="'.$url.'",
|
shape="doublecircle", URL="'.$url.'",
|
||||||
tooltip="' . $url_tooltip . '"];' . "\n";
|
tooltip="' . $url_tooltip . '"];' . "\n";
|
||||||
}
|
}
|
||||||
@ -1174,7 +1174,7 @@ function networkmap_create_module_group_node ($module_group, $simple = 0, $font_
|
|||||||
'", fontsize='.$font_size.', style="filled", ' .
|
'", fontsize='.$font_size.', style="filled", ' .
|
||||||
'fixedsize=true, width=0.30, height=0.30, ' .
|
'fixedsize=true, width=0.30, height=0.30, ' .
|
||||||
'label=<<TABLE data-id_agent="' . $module_group['id_agent'] . '" data-status="' . $module_group['status'] . '" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
|
'label=<<TABLE data-id_agent="' . $module_group['id_agent'] . '" data-status="' . $module_group['status'] . '" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
|
||||||
$module_group['name'] . '</TD></TR></TABLE>>,
|
io_safe_output($module_group['name']) . '</TD></TR></TABLE>>,
|
||||||
shape="square", URL="' . $url . '",
|
shape="square", URL="' . $url . '",
|
||||||
tooltip="' . $url_tooltip . '"];';
|
tooltip="' . $url_tooltip . '"];';
|
||||||
}
|
}
|
||||||
@ -1268,7 +1268,7 @@ function networkmap_create_module_node ($module, $simple = 0, $font_size = 10, $
|
|||||||
'fixedsize=true, width=0.30, height=0.30, ' .
|
'fixedsize=true, width=0.30, height=0.30, ' .
|
||||||
'label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
|
'label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
|
||||||
$img_node . '</TD></TR>
|
$img_node . '</TD></TR>
|
||||||
<TR><TD>' . $module['nombre'] . '</TD></TR></TABLE>>,
|
<TR><TD>' . io_safe_output($module['nombre']) . '</TD></TR></TABLE>>,
|
||||||
shape="circle", URL="' . $url . '",
|
shape="circle", URL="' . $url . '",
|
||||||
tooltip="' . $url_tooltip . '"];';
|
tooltip="' . $url_tooltip . '"];';
|
||||||
}
|
}
|
||||||
|
@ -212,6 +212,7 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
$style['width'] = $node['width'];
|
$style['width'] = $node['width'];
|
||||||
$style['height'] = $node['height'];
|
$style['height'] = $node['height'];
|
||||||
$style['label'] = $node['text'];
|
$style['label'] = $node['text'];
|
||||||
|
$style['id_networkmap'] = $node['networkmap'];
|
||||||
$nodes_and_relations['nodes'][$index]['style'] = json_encode($style);
|
$nodes_and_relations['nodes'][$index]['style'] = json_encode($style);
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
@ -400,6 +401,13 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area
|
|||||||
$item['map_id'] = $node['id_map'];
|
$item['map_id'] = $node['id_map'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($node['style']['id_networkmap']) || $node['style']['id_networkmap'] == '' || $node['style']['id_networkmap'] == 0) {
|
||||||
|
$item['networkmap_id'] = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$item['networkmap_id'] = $node['style']['id_networkmap'];
|
||||||
|
}
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
|
@ -196,7 +196,7 @@ function snmp_browser_get_tree ($target_ip, $community, $starting_oid = '.', $ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$command = $snmpwalk_bin . " -m ALL -M +" . escapeshellarg($config['homedir'] . "/attachment/mibs") . " -Cc -c " . escapeshellarg($community) . " -v " . escapeshellarg($version) . " " . escapeshellarg($target_ip) . " " . escapeshellarg($starting_oid) . " 2> " . $error_redir_dir;
|
$command = $snmpwalk_bin . " -m ALL -M +" . escapeshellarg($config['homedir'] . "/attachment/mibs") . " -Cc -c " . escapeshellarg(io_safe_output($community)) . " -v " . escapeshellarg($version) . " " . escapeshellarg($target_ip) . " " . escapeshellarg($starting_oid) . " 2> " . $error_redir_dir;
|
||||||
}
|
}
|
||||||
exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " \"" . $command . "\"", $output, $rc);
|
exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " \"" . $command . "\"", $output, $rc);
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ function snmp_browser_get_tree ($target_ip, $community, $starting_oid = '.', $ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg($community) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg(io_safe_output($community)) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ function snmp_browser_get_tree ($target_ip, $community, $starting_oid = '.', $ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg($community) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg(io_safe_output($community)) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ function snmp_browser_get_oid ($target_ip, $community, $target_oid, $version = '
|
|||||||
exec ($snmpget_bin . ' -m ALL -v 3 -u ' . escapeshellarg($snmp3_auth_user) . ' -A ' . escapeshellarg($snmp3_auth_pass) . ' -l ' . escapeshellarg($snmp3_security_level) . ' -a ' . escapeshellarg($snmp3_auth_method) . ' -x ' . escapeshellarg($snmp3_privacy_method) . ' -X ' . escapeshellarg($snmp3_privacy_pass) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($target_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
exec ($snmpget_bin . ' -m ALL -v 3 -u ' . escapeshellarg($snmp3_auth_user) . ' -A ' . escapeshellarg($snmp3_auth_pass) . ' -l ' . escapeshellarg($snmp3_security_level) . ' -a ' . escapeshellarg($snmp3_auth_method) . ' -x ' . escapeshellarg($snmp3_privacy_method) . ' -X ' . escapeshellarg($snmp3_privacy_pass) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($target_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exec ($snmpget_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -On -c ' . escapeshellarg($community) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($target_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
exec ($snmpget_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -On -c ' . escapeshellarg(io_safe_output($community)) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($target_oid) . ' 2> ' . $error_redir_dir, $output, $rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($rc != 0) {
|
if ($rc != 0) {
|
||||||
|
@ -3288,7 +3288,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||||||
'proportion_width' => $proportion_width);
|
'proportion_width' => $proportion_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
$layout_data['label'] = visual_map_macro($layout_data['label']);
|
$layout_data['label'] = visual_map_macro($layout_data['label'],$layout_data["id_agente_modulo"]);
|
||||||
|
|
||||||
switch ($layout_data['type']) {
|
switch ($layout_data['type']) {
|
||||||
case LINE_ITEM:
|
case LINE_ITEM:
|
||||||
@ -3706,9 +3706,14 @@ function visual_map_type_in_js($type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function visual_map_macro($label){
|
function visual_map_macro($label,$module){
|
||||||
$label = str_replace('_date_',strftime("%x"),$label);
|
$label = str_replace('_date_',strftime("%x"),$label);
|
||||||
$label = str_replace('_time_',strftime("%T"),$label);
|
$label = str_replace('_time_',strftime("%T"),$label);
|
||||||
|
$label = str_replace('_agent_',agents_get_alias(modules_get_agentmodule_agent($module)),$label);
|
||||||
|
$label = str_replace('_module_',modules_get_agentmodule_name($module),$label);
|
||||||
|
$label = str_replace('_agentdescription_',agents_get_description(modules_get_agentmodule_agent($module)),$label);
|
||||||
|
$label = str_replace('_address_',agents_get_address(modules_get_agentmodule_agent($module)),$label);
|
||||||
|
$label = str_replace('_moduledescription_',modules_get_agentmodule_descripcion($module),$label);
|
||||||
return $label;
|
return $label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,9 @@ if ($new_networkmap) {
|
|||||||
$source = 'group';
|
$source = 'group';
|
||||||
$ip_mask = '';
|
$ip_mask = '';
|
||||||
$dont_show_subgroups = false;
|
$dont_show_subgroups = false;
|
||||||
|
$offset_x = "";
|
||||||
|
$offset_y = "";
|
||||||
|
$scale_z = 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$disabled_generation_method_select = false;
|
$disabled_generation_method_select = false;
|
||||||
@ -76,6 +79,10 @@ if ($edit_networkmap) {
|
|||||||
|
|
||||||
$filter = json_decode($values['filter'], true);
|
$filter = json_decode($values['filter'], true);
|
||||||
|
|
||||||
|
$offset_x = $filter['x_offs'];
|
||||||
|
$offset_y = $filter['y_offs'];
|
||||||
|
$scale_z = $filter['z_dash'];
|
||||||
|
|
||||||
$node_radius = $filter['node_radius'];
|
$node_radius = $filter['node_radius'];
|
||||||
|
|
||||||
$source = $values['source'];
|
$source = $values['source'];
|
||||||
@ -191,6 +198,17 @@ else {
|
|||||||
$table->data[3][0] = __('Description');
|
$table->data[3][0] = __('Description');
|
||||||
$table->data[3][1] = html_print_textarea ('description', 7, 25, $description, '', true);
|
$table->data[3][1] = html_print_textarea ('description', 7, 25, $description, '', true);
|
||||||
|
|
||||||
|
$table->data[4][0] = __('Position X');
|
||||||
|
$table->data[4][1] = html_print_input_text ('pos_x', $offset_x, '', 2, 10,true);
|
||||||
|
$table->data[5][0] = __('Position Y');
|
||||||
|
$table->data[5][1] = html_print_input_text ('pos_y', $offset_y, '', 2, 10,true);
|
||||||
|
|
||||||
|
$table->data[6][0] = __('Zoom scale');
|
||||||
|
if ($scale_z == "") {
|
||||||
|
$scale_z = 0.5;
|
||||||
|
}
|
||||||
|
$table->data[6][1] = html_print_input_text ('scale_z', $scale_z, '', 2, 10,true) . ui_print_help_tip (__('Introduce zoom level. 1 = Highest resolution. Figures may include decimals'), true);
|
||||||
|
|
||||||
$table->data['source'][0] = __('Source');
|
$table->data['source'][0] = __('Source');
|
||||||
$table->data['source'][1] =
|
$table->data['source'][1] =
|
||||||
html_print_radio_button('source', 'group', __('Group'), $source, true, $disabled_source) .
|
html_print_radio_button('source', 'group', __('Group'), $source, true, $disabled_source) .
|
||||||
@ -222,8 +240,8 @@ else {
|
|||||||
'radial_dinamic' => 'radial dinamic'
|
'radial_dinamic' => 'radial dinamic'
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[4][0] = __('Method generation networkmap');
|
$table->data[7][0] = __('Method generation networkmap');
|
||||||
$table->data[4][1] = html_print_select($methods, 'method', $method,
|
$table->data[7][1] = html_print_select($methods, 'method', $method,
|
||||||
'', '', 'twopi', true, false, true, '',
|
'', '', 'twopi', true, false, true, '',
|
||||||
$disabled_generation_method_select);
|
$disabled_generation_method_select);
|
||||||
|
|
||||||
|
@ -85,6 +85,10 @@ if ($new_networkmap || $save_networkmap) {
|
|||||||
$node_radius = (int)get_parameter('node_radius', 40);
|
$node_radius = (int)get_parameter('node_radius', 40);
|
||||||
$description = get_parameter('description', '');
|
$description = get_parameter('description', '');
|
||||||
|
|
||||||
|
$offset_x = get_parameter('pos_x');
|
||||||
|
$offset_y = get_parameter('pos_y');
|
||||||
|
$scale_z = get_parameter('scale_z', 0.5);
|
||||||
|
|
||||||
$values = array();
|
$values = array();
|
||||||
$values['name'] = $name;
|
$values['name'] = $name;
|
||||||
$values['id_group'] = $id_group;
|
$values['id_group'] = $id_group;
|
||||||
@ -141,6 +145,9 @@ if ($new_networkmap || $save_networkmap) {
|
|||||||
$filter = array();
|
$filter = array();
|
||||||
$filter['dont_show_subgroups'] = $dont_show_subgroups;
|
$filter['dont_show_subgroups'] = $dont_show_subgroups;
|
||||||
$filter['node_radius'] = $node_radius;
|
$filter['node_radius'] = $node_radius;
|
||||||
|
$filter['x_offs'] = $offset_x;
|
||||||
|
$filter['y_offs'] = $offset_y;
|
||||||
|
$filter['z_dash'] = $scale_z;
|
||||||
$values['filter'] = json_encode($filter);
|
$values['filter'] = json_encode($filter);
|
||||||
|
|
||||||
$result = false;
|
$result = false;
|
||||||
@ -153,8 +160,10 @@ if ($new_networkmap || $save_networkmap) {
|
|||||||
__('Succesfully created'), __('Could not be created'), '',
|
__('Succesfully created'), __('Could not be created'), '',
|
||||||
true);
|
true);
|
||||||
|
|
||||||
// Force the tab = 'list'
|
$id = $result;
|
||||||
$tab = "list";
|
|
||||||
|
// Force the tab = 'view'
|
||||||
|
$tab = "view";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The networkmap exists
|
// The networkmap exists
|
||||||
@ -210,25 +219,14 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||||||
|
|
||||||
$source = (string)get_parameter('source', 'group');
|
$source = (string)get_parameter('source', 'group');
|
||||||
|
|
||||||
|
$offset_x = get_parameter('pos_x');
|
||||||
|
$offset_y = get_parameter('pos_y');
|
||||||
|
$scale_z = get_parameter('scale_z', 0.5);
|
||||||
|
|
||||||
$values = array();
|
$values = array();
|
||||||
$values['name'] = $name;
|
$values['name'] = $name;
|
||||||
$values['id_group'] = $id_group;
|
$values['id_group'] = $id_group;
|
||||||
|
|
||||||
/*
|
|
||||||
if ($source == 'group') {
|
|
||||||
$values['source'] = 0;
|
|
||||||
$values['source_data'] = $id_group;
|
|
||||||
}
|
|
||||||
else if ($source == 'recon_task') {
|
|
||||||
$values['source'] = 1;
|
|
||||||
$values['source_data'] = $recon_task_id;
|
|
||||||
}
|
|
||||||
else if ($source == 'ip_mask') {
|
|
||||||
$values['source'] = 2;
|
|
||||||
$values['source_data'] = $ip_mask;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
switch ($method) {
|
switch ($method) {
|
||||||
case 'twopi':
|
case 'twopi':
|
||||||
$values['generation_method'] = 2;
|
$values['generation_method'] = 2;
|
||||||
@ -262,6 +260,9 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||||||
$filter = json_decode($row['filter'], true);
|
$filter = json_decode($row['filter'], true);
|
||||||
$filter['dont_show_subgroups'] = $dont_show_subgroups;
|
$filter['dont_show_subgroups'] = $dont_show_subgroups;
|
||||||
$filter['node_radius'] = $node_radius;
|
$filter['node_radius'] = $node_radius;
|
||||||
|
$filter['x_offs'] = $offset_x;
|
||||||
|
$filter['y_offs'] = $offset_y;
|
||||||
|
$filter['z_dash'] = $scale_z;
|
||||||
|
|
||||||
$values['filter'] = json_encode($filter);
|
$values['filter'] = json_encode($filter);
|
||||||
|
|
||||||
|
@ -677,10 +677,14 @@ if (is_ajax ()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------END AJAX------------------------------------------------
|
//--------------END AJAX------------------------------------------------
|
||||||
|
if ($id == 0) {
|
||||||
$id = (int) get_parameter('id_networkmap', 0);
|
$id = (int) get_parameter('id_networkmap', 0);
|
||||||
|
}
|
||||||
$dash_mode = 0;
|
$dash_mode = 0;
|
||||||
$map_dash_details = array();
|
$map_dash_details = array();
|
||||||
|
|
||||||
|
$networkmap = db_get_row('tmap', 'id', $id);
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
include_once("enterprise/dashboard/widgets/network_map.php");
|
include_once("enterprise/dashboard/widgets/network_map.php");
|
||||||
if ($id_networkmap) {
|
if ($id_networkmap) {
|
||||||
@ -693,9 +697,13 @@ if (enterprise_installed()) {
|
|||||||
$map_dash_details['y_offs'] = $y_offs;
|
$map_dash_details['y_offs'] = $y_offs;
|
||||||
$map_dash_details['z_dash'] = $z_dash;
|
$map_dash_details['z_dash'] = $z_dash;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$networkmap_filter = json_decode($networkmap['filter'], true);
|
||||||
|
$map_dash_details['x_offs'] = $networkmap_filter['x_offs'];
|
||||||
|
$map_dash_details['y_offs'] = $networkmap_filter['y_offs'];
|
||||||
|
$map_dash_details['z_dash'] = $networkmap_filter['z_dash'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$networkmap = db_get_row('tmap', 'id', $id);
|
|
||||||
|
|
||||||
if ($networkmap === false) {
|
if ($networkmap === false) {
|
||||||
ui_print_page_header(__('Networkmap'),
|
ui_print_page_header(__('Networkmap'),
|
||||||
|
@ -59,6 +59,8 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||||||
$sub2["operation/agentes/status_monitor"]["text"] = __('Monitor detail');
|
$sub2["operation/agentes/status_monitor"]["text"] = __('Monitor detail');
|
||||||
$sub2["operation/agentes/status_monitor"]["refr"] = 0;
|
$sub2["operation/agentes/status_monitor"]["refr"] = 0;
|
||||||
|
|
||||||
|
enterprise_hook ('tag_view_submenu');
|
||||||
|
|
||||||
$sub2["operation/agentes/alerts_status"]["text"] = __('Alert detail');
|
$sub2["operation/agentes/alerts_status"]["text"] = __('Alert detail');
|
||||||
$sub2["operation/agentes/alerts_status"]["refr"] = 0;
|
$sub2["operation/agentes/alerts_status"]["refr"] = 0;
|
||||||
|
|
||||||
|
@ -208,6 +208,11 @@ $ignored_params['refr'] = '';
|
|||||||
|
|
||||||
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
|
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
|
||||||
|
|
||||||
|
// Start the map fetch
|
||||||
|
//~ fetchMap();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).load (function () {
|
||||||
$('.item:not(.icon) img:not(.b64img)').each( function() {
|
$('.item:not(.icon) img:not(.b64img)').each( function() {
|
||||||
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
|
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
|
||||||
if( $(this).parent()[0].tagName == 'DIV'){
|
if( $(this).parent()[0].tagName == 'DIV'){
|
||||||
|
@ -184,6 +184,9 @@ $ignored_params['refr'] = '';
|
|||||||
|
|
||||||
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
|
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).load (function () {
|
||||||
$('.item:not(.icon) img').each(function(){
|
$('.item:not(.icon) img').each(function(){
|
||||||
|
|
||||||
|
|
||||||
|
@ -280,6 +280,9 @@ $ignored_params['refr'] = '';
|
|||||||
|
|
||||||
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
|
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).load (function () {
|
||||||
$('.item:not(.icon) img:not(.b64img)').each( function() {
|
$('.item:not(.icon) img:not(.b64img)').each( function() {
|
||||||
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
|
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
|
||||||
if( $(this).parent()[0].tagName == 'DIV'){
|
if( $(this).parent()[0].tagName == 'DIV'){
|
||||||
|
@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||||
('custom_report_front_header', ''),
|
('custom_report_front_header', ''),
|
||||||
('custom_report_front_footer', ''),
|
('custom_report_front_footer', ''),
|
||||||
('MR', 8),
|
('MR', 9),
|
||||||
('identification_reminder', 1),
|
('identification_reminder', 1),
|
||||||
('identification_reminder_timestamp', 0),
|
('identification_reminder_timestamp', 0),
|
||||||
('current_package_enterprise', '715'),
|
('current_package_enterprise', '716'),
|
||||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}');
|
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}');
|
||||||
|
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
@ -565,12 +565,12 @@ 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, "Alert ceased (" .
|
||||||
$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, 'Pandora', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
|
"alert_ceased", 0, $dbh, 'Pandora', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
|
||||||
} else {
|
} else {
|
||||||
pandora_event ($pa_config, "Alert ceased (" .
|
pandora_event ($pa_config, "Alert ceased (" .
|
||||||
$alert->{'name'} . ")", $agent->{'id_grupo'},
|
safe_output($alert->{'name'}) . ")", $agent->{'id_grupo'},
|
||||||
$agent->{'id_agente'}, $alert->{'priority'}, $id,
|
$agent->{'id_agente'}, $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, 'Pandora', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
|
"alert_ceased", 0, $dbh, 'Pandora', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
|
||||||
@ -1622,9 +1622,8 @@ sub pandora_planned_downtime_disabled_once_stop($$) {
|
|||||||
db_do($dbh, 'UPDATE tplanned_downtime
|
db_do($dbh, 'UPDATE tplanned_downtime
|
||||||
SET executed = 0
|
SET executed = 0
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
'(Created by ' . $downtime->{'id_user'} . ') Server ' . $pa_config->{'servername'} . ' stopped planned downtime: ' . $downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
'(Created by ' . $downtime->{'id_user'} . ') Server ' . $pa_config->{'servername'} . ' stopped planned downtime: ' . safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
pandora_planned_downtime_unset_disabled_elements($pa_config,
|
pandora_planned_downtime_unset_disabled_elements($pa_config,
|
||||||
$dbh, $downtime);
|
$dbh, $downtime);
|
||||||
@ -1669,8 +1668,9 @@ sub pandora_planned_downtime_disabled_once_start($$) {
|
|||||||
SET executed = 1
|
SET executed = 1
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
|
||||||
|
print"pandora_planned_downtime_disabled_once_start\n";
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"(Created by " . $downtime->{'id_user'} . ") Server ".$pa_config->{'servername'}." started planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"(Created by " . $downtime->{'id_user'} . ") Server ".$pa_config->{'servername'}." started planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
pandora_planned_downtime_set_disabled_elements($pa_config,
|
pandora_planned_downtime_set_disabled_elements($pa_config,
|
||||||
$dbh, $downtime);
|
$dbh, $downtime);
|
||||||
@ -1860,7 +1860,7 @@ sub pandora_planned_downtime_quiet_once_stop($$) {
|
|||||||
SET executed = 0
|
SET executed = 0
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"(Created by " . $downtime->{'id_user'} . ") Server ".$pa_config->{'servername'}." stopped planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"(Created by " . $downtime->{'id_user'} . ") Server ".$pa_config->{'servername'}." stopped planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
pandora_planned_downtime_unset_quiet_elements($pa_config,
|
pandora_planned_downtime_unset_quiet_elements($pa_config,
|
||||||
$dbh, $downtime->{'id'});
|
$dbh, $downtime->{'id'});
|
||||||
@ -1901,8 +1901,9 @@ sub pandora_planned_downtime_quiet_once_start($$) {
|
|||||||
db_do($dbh, 'UPDATE tplanned_downtime
|
db_do($dbh, 'UPDATE tplanned_downtime
|
||||||
SET executed = 1
|
SET executed = 1
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
print"pandora_planned_downtime_quiet_once_start\n";
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"(Created by " . $downtime->{'id_user'} . ") Server ".$pa_config->{'servername'}." started planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"(Created by " . $downtime->{'id_user'} . ") Server ".$pa_config->{'servername'}." started planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
pandora_planned_downtime_set_quiet_elements($pa_config,
|
pandora_planned_downtime_set_quiet_elements($pa_config,
|
||||||
$dbh, $downtime->{'id'});
|
$dbh, $downtime->{'id'});
|
||||||
@ -1955,8 +1956,9 @@ sub pandora_planned_downtime_monthly_start($$) {
|
|||||||
db_do($dbh, 'UPDATE tplanned_downtime
|
db_do($dbh, 'UPDATE tplanned_downtime
|
||||||
SET executed = 1
|
SET executed = 1
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
print"pandora_planned_downtime_monthly_start\n";
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"Server ".$pa_config->{'servername'}." started planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"Server ".$pa_config->{'servername'}." started planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
|
|
||||||
if ($downtime->{'type_downtime'} eq "quiet") {
|
if ($downtime->{'type_downtime'} eq "quiet") {
|
||||||
@ -2031,8 +2033,9 @@ sub pandora_planned_downtime_monthly_stop($$) {
|
|||||||
db_do($dbh, 'UPDATE tplanned_downtime
|
db_do($dbh, 'UPDATE tplanned_downtime
|
||||||
SET executed = 0
|
SET executed = 0
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
print"pandora_planned_downtime_monthly_stop\n";
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"Server ".$pa_config->{'servername'}." stopped planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"Server ".$pa_config->{'servername'}." stopped planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
if ($downtime->{'type_downtime'} eq "quiet") {
|
if ($downtime->{'type_downtime'} eq "quiet") {
|
||||||
pandora_planned_downtime_unset_quiet_elements($pa_config,
|
pandora_planned_downtime_unset_quiet_elements($pa_config,
|
||||||
@ -2140,8 +2143,9 @@ sub pandora_planned_downtime_weekly_start($$) {
|
|||||||
db_do($dbh, 'UPDATE tplanned_downtime
|
db_do($dbh, 'UPDATE tplanned_downtime
|
||||||
SET executed = 1
|
SET executed = 1
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
print"pandora_planned_downtime_weekly_start\n";
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"Server ".$pa_config->{'servername'}." started planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"Server ".$pa_config->{'servername'}." started planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
if ($downtime->{'type_downtime'} eq "quiet") {
|
if ($downtime->{'type_downtime'} eq "quiet") {
|
||||||
pandora_planned_downtime_set_quiet_elements($pa_config,
|
pandora_planned_downtime_set_quiet_elements($pa_config,
|
||||||
@ -2254,8 +2258,10 @@ sub pandora_planned_downtime_weekly_stop($$) {
|
|||||||
db_do($dbh, 'UPDATE tplanned_downtime
|
db_do($dbh, 'UPDATE tplanned_downtime
|
||||||
SET executed = 0
|
SET executed = 0
|
||||||
WHERE id = ?', $downtime->{'id'});
|
WHERE id = ?', $downtime->{'id'});
|
||||||
|
|
||||||
|
print"pandora_planned_downtime_weekly_stop\n";
|
||||||
pandora_event ($pa_config,
|
pandora_event ($pa_config,
|
||||||
"Server ".$pa_config->{'servername'}." stopped planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
"Server ".$pa_config->{'servername'}." stopped planned downtime: ".safe_output($downtime->{'name'}), 0, 0, 1, 0, 0, 'system', 0, $dbh);
|
||||||
|
|
||||||
if ($downtime->{'type_downtime'} eq "quiet") {
|
if ($downtime->{'type_downtime'} eq "quiet") {
|
||||||
pandora_planned_downtime_unset_quiet_elements($pa_config,
|
pandora_planned_downtime_unset_quiet_elements($pa_config,
|
||||||
@ -2985,7 +2991,7 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger ($pa_config, "Server '$server_name' CREATED agent '$agent_name' address '$address'.", 10);
|
logger ($pa_config, "Server '$server_name' CREATED agent '$agent_name' address '$address'.", 10);
|
||||||
pandora_event ($pa_config, "Agent [$alias] created by $server_name", $group_id, $agent_id, 2, 0, 0, 'new_agent', 0, $dbh);
|
pandora_event ($pa_config, "Agent [" . safe_output($alias) . "] created by $server_name", $group_id, $agent_id, 2, 0, 0, 'new_agent', 0, $dbh);
|
||||||
return $agent_id;
|
return $agent_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,19 +333,22 @@ sub process_xml_data ($$$$$) {
|
|||||||
if (defined ($data->{'group_id'}) && $data->{'group_id'} ne '') {
|
if (defined ($data->{'group_id'}) && $data->{'group_id'} ne '') {
|
||||||
$group_id = $data->{'group_id'};
|
$group_id = $data->{'group_id'};
|
||||||
if (! defined (get_group_name ($dbh, $group_id))) {
|
if (! defined (get_group_name ($dbh, $group_id))) {
|
||||||
pandora_event ($pa_config, "Unable to create agent '$agent_name': group ID '" . $group_id . "' does not exist.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
print "UNABLE GROUP ID\n";
|
||||||
|
pandora_event ($pa_config, "Unable to create agent '" . safe_output($agent_name) . "': group ID '" . $group_id . "' does not exist.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
||||||
logger($pa_config, "Group ID " . $group_id . " does not exist.", 3);
|
logger($pa_config, "Group ID " . $group_id . " does not exist.", 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} elsif (defined ($data->{'group'}) && $data->{'group'} ne '') {
|
} elsif (defined ($data->{'group'}) && $data->{'group'} ne '') {
|
||||||
$group_id = get_group_id ($dbh, $data->{'group'});
|
$group_id = get_group_id ($dbh, $data->{'group'});
|
||||||
if (! defined (get_group_name ($dbh, $group_id))) {
|
if (! defined (get_group_name ($dbh, $group_id))) {
|
||||||
pandora_event ($pa_config, "Unable to create agent '$agent_name': group '" . $data->{'group'} . "' does not exist.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
print "UNABLE GROUP\n";
|
||||||
|
pandora_event ($pa_config, "Unable to create agent '" . safe_output($agent_name) . "': group '" . safe_output($data->{'group'}) . "' does not exist.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
||||||
logger($pa_config, "Group " . $data->{'group'} . " does not exist.", 3);
|
logger($pa_config, "Group " . $data->{'group'} . " does not exist.", 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pandora_event ($pa_config, "Unable to create agent '$agent_name': autocreate_group $group_id does not exist. Edit the pandora_server.conf file and change it.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
print "UNABLE AUTOCREATE\n";
|
||||||
|
pandora_event ($pa_config, "Unable to create agent '" . safe_output($agent_name) . "': autocreate_group $group_id does not exist. Edit the pandora_server.conf file and change it.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
||||||
logger($pa_config, "Group id $group_id does not exist (check autocreate_group config token).", 3);
|
logger($pa_config, "Group id $group_id does not exist (check autocreate_group config token).", 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -421,7 +421,7 @@ sub PandoraFMS::Recon::Base::create_agent($$) {
|
|||||||
|
|
||||||
$agent_id = pandora_create_agent($self->{'pa_config'}, $self->{'pa_config'}->{'servername'}, $host_name, $device, $self->{'group_id'}, 0, $id_os, '', 300, $self->{'dbh'});
|
$agent_id = pandora_create_agent($self->{'pa_config'}, $self->{'pa_config'}->{'servername'}, $host_name, $device, $self->{'group_id'}, 0, $id_os, '', 300, $self->{'dbh'});
|
||||||
return undef unless defined ($agent_id) and ($agent_id > 0);
|
return undef unless defined ($agent_id) and ($agent_id > 0);
|
||||||
pandora_event($self->{'pa_config'}, "[RECON] New " . $self->get_device_type($device) . " found (" . join(',', $self->get_addresses($device)) . ").", $self->{'group_id'}, $agent_id, 2, 0, 0, 'recon_host_detected', 0, $self->{'dbh'});
|
pandora_event($self->{'pa_config'}, "[RECON] New " . safe_output($self->get_device_type($device)) . " found (" . join(',', safe_output($self->get_addresses($device))) . ").", $self->{'group_id'}, $agent_id, 2, 0, 0, 'recon_host_detected', 0, $self->{'dbh'});
|
||||||
$agent_learning = 1;
|
$agent_learning = 1;
|
||||||
|
|
||||||
# Create network profile modules for the agent
|
# Create network profile modules for the agent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user