This commit is contained in:
fbsanchez 2021-10-21 02:17:17 +02:00
parent 98c43ea1e7
commit bb8dbc9332
11 changed files with 222 additions and 47 deletions

View File

@ -19,6 +19,10 @@ INSERT INTO `treport_content` (id_report, id_gs, id_agent_module, type, period,
INSERT INTO `treport_content_item` (id_report_content, id_agent_module, id_agent_module_failover, operation, server_name) SELECT id_rc, id_agent_module, 0, '', server_name FROM treport_content WHERE type = 'availability' AND id_agent <> 0 AND id_agent_module <> 0;
DELETE FROM `treport_content` WHERE type = 'histogram_data';
ALTER TABLE `tperfil` ADD COLUMN `network_config_view`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_edit`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_management`tinyint(1) NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS `tncm_vendor` (
`id` serial,
`name` varchar(255) UNIQUE,
@ -90,4 +94,31 @@ CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT IGNORE INTO `tncm_vendor` VALUES
(1,'Cisco'),
(2, 'D-Link Systems, Inc.'),
(3, 'MikroTik'),
(4, 'Alcatel-Lucent Enterprise'),
(5, 'Ubiquiti Networks, Inc.'),
(6, 'Allied Telesis, Inc.'),
(7, 'Frogfoot Networks'),
(8, 'IBM'),
(9, 'Dell Inc.'),
(10, 'Hitachi Communication Technologies, Ltd.'),
(11, 'Netlink'),
(12, 'Ascom'),
(13, 'Synology Inc.'),
(14, 'Fujitsu Network Communications, Inc.');
INSERT IGNORE INTO `tncm_model` VALUES (1,1,'7200');
INSERT IGNORE INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
INSERT IGNORE INTO `tncm_script` VALUES
(1,0,'enable&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;exit'),
(2,1,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;running-config&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;');
COMMIT;

View File

@ -4078,6 +4078,10 @@ ALTER TABLE `tperfil` DROP COLUMN `incident_view`;
ALTER TABLE `tperfil` DROP COLUMN `incident_edit`;
ALTER TABLE `tperfil` DROP COLUMN `incident_management`;
ALTER TABLE `tperfil` ADD COLUMN `network_config_view`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_edit`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_management`tinyint(1) NOT NULL DEFAULT 0;
-- -----------------------------------------------------
-- Table `talert_execution_queue`
-- -----------------------------------------------------
@ -4184,3 +4188,31 @@ CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
`updated_at` bigint(20) NOT NULL default 0,
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tncm_vendor` VALUES
(1,'Cisco'),
(2, 'D-Link Systems, Inc.'),
(3, 'MikroTik'),
(4, 'Alcatel-Lucent Enterprise'),
(5, 'Ubiquiti Networks, Inc.'),
(6, 'Allied Telesis, Inc.'),
(7, 'Frogfoot Networks'),
(8, 'IBM'),
(9, 'Dell Inc.'),
(10, 'Hitachi Communication Technologies, Ltd.'),
(11, 'Netlink'),
(12, 'Ascom'),
(13, 'Synology Inc.'),
(14, 'Fujitsu Network Communications, Inc.');
INSERT INTO `tncm_model` VALUES (1,1,'7200');
INSERT INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
INSERT INTO `tncm_script` VALUES
(1,0,'enable&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;exit'),
(2,1,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;running-config&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;');

View File

@ -123,6 +123,11 @@ if ($id_profile || $new_profile) {
$vconsole_edit = 0;
$vconsole_management = 0;
// NCM.
$network_config_view = 0;
$network_config_edit = 0;
$network_config_management = 0;
$page_title = __('Create profile');
} else {
$profile = db_get_row('tperfil', 'id_perfil', $id_profile);
@ -181,13 +186,39 @@ if ($id_profile || $new_profile) {
$vconsole_edit = (bool) $profile['vconsole_edit'];
$vconsole_management = (bool) $profile['vconsole_management'];
// NCM.
$networ_config_view = (bool) $profile['network_config_view'];
$networ_config_edit = (bool) $profile['network_config_edit'];
$network_config_management = (bool) $profile['network_config_management'];
$id_audit = db_pandora_audit(
'User management',
'Edit profile '.io_safe_output($name)
);
enterprise_include_once('include/functions_audit.php');
$info = 'Name: '.$name.' Agent view: '.$agent_view.' Agent edit: '.$agent_edit.' Agent disable: '.$agent_disable.' Alert edit: '.$alert_edit.' Alert management: '.$alert_management.' User management: '.$user_management.' DB management: '.$db_management.' Event view: '.$event_view.' Event edit: '.$event_edit.' Event management: '.$event_management.' Report view: '.$report_view.' Report edit: '.$report_edit.' Report management: '.$report_management.' Network map view: '.$map_view.' Network map edit: '.$map_edit.' Network map management: '.$map_management.' Visual console view: '.$vconsole_view.' Visual console edit: '.$vconsole_edit.' Visual console management: '.$vconsole_management.' '.get_product_name().' Management: '.$pandora_management;
$info = 'Name: '.$name;
$info .= ' Agent view: '.$agent_view;
$info .= ' Agent edit: '.$agent_edit;
$info .= ' Agent disable: '.$agent_disable;
$info .= ' Alert edit: '.$alert_edit;
$info .= ' Alert management: '.$alert_management;
$info .= ' User management: '.$user_management;
$info .= ' DB management: '.$db_management;
$info .= ' Event view: '.$event_view;
$info .= ' Event edit: '.$event_edit;
$info .= ' Event management: '.$event_management;
$info .= ' Report view: '.$report_view;
$info .= ' Report edit: '.$report_edit;
$info .= ' Report management: '.$report_management;
$info .= ' Network map view: '.$map_view;
$info .= ' Network map edit: '.$map_edit;
$info .= ' Network map management: '.$map_management;
$info .= ' Visual console view: '.$vconsole_view;
$info .= ' Visual console edit: '.$vconsole_edit;
$info .= ' Visual console management: '.$vconsole_management;
$info .= ' Network config management: '.$network_config_management;
$info .= ' '.get_product_name().' Management: '.$pandora_management;
enterprise_hook('audit_pandora_enterprise', [$id_audit, $info]);
@ -314,6 +345,21 @@ if ($id_profile || $new_profile) {
$disable_option = '';
}
// NCM
$row = [];
$row['name'] = __('View NCM data');
$row['input'] = html_print_checkbox('network_config_view', 1, $network_config_view, true);
$table->data['VR'] = $row;
$row = [];
$row['name'] = __('Operate NCM');
$row['input'] = html_print_checkbox('network_config_edit', 1, $network_config_edit, true, false, 'autoclick_profile_users(\'network_config_edit\', \'network_config_view\', \'false\')');
$table->data['VW'] = $row;
$row = [];
$row['name'] = __('Manage NCM');
$row['input'] = html_print_checkbox('network_config_management', 1, $network_config_management, true, false, 'autoclick_profile_users(\'network_config_management\', \'network_config_view\', \'network_config_edit\')');
$table->data['VM'] = $row;
$table->data[] = '<hr>';
// Users
$row = [];
$row['name'] = __('Manage users');

View File

@ -178,28 +178,36 @@ if ($is_management_allowed === true && ($create_profile === true || $update_prof
$vconsole_edit = (bool) get_parameter('vconsole_edit');
$vconsole_management = (bool) get_parameter('vconsole_management');
// NCM.
$network_config_view = (bool) get_parameter('network_config_view');
$network_config_edit = (bool) get_parameter('network_config_edit');
$network_config_management = (bool) get_parameter('network_config_management');
$values = [
'name' => $name,
'agent_view' => $agent_view,
'agent_edit' => $agent_edit,
'agent_disable' => $agent_disable,
'alert_edit' => $alert_edit,
'alert_management' => $alert_management,
'user_management' => $user_management,
'db_management' => $db_management,
'event_view' => $event_view,
'event_edit' => $event_edit,
'event_management' => $event_management,
'report_view' => $report_view,
'report_edit' => $report_edit,
'report_management' => $report_management,
'map_view' => $map_view,
'map_edit' => $map_edit,
'map_management' => $map_management,
'vconsole_view' => $vconsole_view,
'vconsole_edit' => $vconsole_edit,
'vconsole_management' => $vconsole_management,
'pandora_management' => $pandora_management,
'name' => $name,
'agent_view' => $agent_view,
'agent_edit' => $agent_edit,
'agent_disable' => $agent_disable,
'alert_edit' => $alert_edit,
'alert_management' => $alert_management,
'user_management' => $user_management,
'db_management' => $db_management,
'event_view' => $event_view,
'event_edit' => $event_edit,
'event_management' => $event_management,
'report_view' => $report_view,
'report_edit' => $report_edit,
'report_management' => $report_management,
'map_view' => $map_view,
'map_edit' => $map_edit,
'map_management' => $map_management,
'vconsole_view' => $vconsole_view,
'vconsole_edit' => $vconsole_edit,
'vconsole_management' => $vconsole_management,
'network_config_view' => $network_config_view,
'network_config_edit' => $network_config_edit,
'network_config_management' => $network_config_management,
'pandora_management' => $pandora_management,
];
}
@ -228,6 +236,9 @@ if ($is_management_allowed === true && $update_profile === true) {
"Visual console view":"'.$vconsole_view.'",
"Visual console edit":"'.$vconsole_edit.'",
"Visual console management":"'.$vconsole_management.'",
"NCM view":"'.$network_config_view.'",
"NCM edit":"'.$network_config_edit.'",
"NCM management":"'.$network_config_management.'",
"'.get_product_name().' Management":"'.$pandora_management.'"}';
db_pandora_audit(
@ -276,6 +287,9 @@ if ($is_management_allowed === true && $create_profile === true) {
"Visual console view":"'.$vconsole_view.'",
"Visual console edit":"'.$vconsole_edit.'",
"Visual console management":"'.$vconsole_management.'",
"NCM view":"'.$network_config_view.'",
"NCM edit":"'.$network_config_edit.'",
"NCM management":"'.$network_config_management.'",
"'.get_product_name().' Management":"'.$pandora_management.'"}';
db_pandora_audit(
@ -327,6 +341,9 @@ $table->head['MM'] = 'MM';
$table->head['VR'] = 'VR';
$table->head['VW'] = 'VW';
$table->head['VM'] = 'VM';
$table->head['NR'] = 'NR';
$table->head['NW'] = 'NW';
$table->head['NM'] = 'NM';
$table->head['PM'] = 'PM';
if ($is_management_allowed === true) {
$table->head['operations'] = '<span title="Operations">'.__('Op.').'</span>';
@ -354,6 +371,9 @@ $table->size['MM'] = '10px';
$table->size['VR'] = '10px';
$table->size['VW'] = '10px';
$table->size['VM'] = '10px';
$table->size['NR'] = '10px';
$table->size['NW'] = '10px';
$table->size['NM'] = '10px';
$table->size['PM'] = '10px';
if ($is_management_allowed === true) {
$table->size['operations'] = '5%';
@ -401,6 +421,9 @@ foreach ($profiles as $profile) {
$data['VR'] = (empty($profile['vconsole_view']) === false) ? $img : '';
$data['VW'] = (empty($profile['vconsole_edit']) === false) ? $img : '';
$data['VM'] = (empty($profile['vconsole_management']) === false) ? $img : '';
$data['NR'] = (empty($profile['network_config_view']) === false) ? $img : '';
$data['NW'] = (empty($profile['network_config_edit']) === false) ? $img : '';
$data['NM'] = (empty($profile['network_config_management']) === false) ? $img : '';
$data['PM'] = (empty($profile['pandora_management']) === false) ? $img : '';
$table->cellclass[]['operations'] = 'action_buttons';
if ($is_management_allowed === true) {

View File

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

View File

@ -2446,86 +2446,74 @@ function get_acl_column($access)
case 'AR':
return 'agent_view';
break;
case 'AW':
return 'agent_edit';
break;
case 'AD':
return 'agent_disable';
break;
case 'LW':
return 'alert_edit';
break;
case 'LM':
return 'alert_management';
break;
case 'PM':
return 'pandora_management';
break;
case 'DM':
return 'db_management';
break;
case 'UM':
return 'user_management';
break;
case 'RR':
return 'report_view';
break;
case 'RW':
return 'report_edit';
break;
case 'RM':
return 'report_management';
break;
case 'ER':
return 'event_view';
break;
case 'EW':
return 'event_edit';
break;
case 'EM':
return 'event_management';
break;
case 'MR':
return 'map_view';
break;
case 'MW':
return 'map_edit';
break;
case 'MM':
return 'map_management';
break;
case 'VR':
return 'vconsole_view';
break;
case 'VW':
return 'vconsole_edit';
break;
case 'VM':
return 'vconsole_management';
break;
case 'NR':
return 'network_config_view';
case 'NW':
return 'network_config_edit';
case 'NM':
return 'network_config_management';
default:
return '';
break;
}
}
@ -2559,7 +2547,10 @@ function get_users_acl($id_user)
sum(tperfil.map_management) as map_management,
sum(tperfil.vconsole_view) as vconsole_view,
sum(tperfil.vconsole_edit) as vconsole_edit,
sum(tperfil.vconsole_management) as vconsole_management
sum(tperfil.vconsole_management) as vconsole_management,
sum(tperfil.network_config_view) as network_config_view,
sum(tperfil.network_config_edit) as network_config_edit,
sum(tperfil.network_config_management) as network_config_management
FROM tusuario_perfil, tperfil
WHERE tusuario_perfil.id_perfil = tperfil.id_perfil
AND tusuario_perfil.id_usuario = '%s'",

View File

@ -800,6 +800,19 @@ function servers_get_info($id_server=-1)
$id_modulo = 0;
break;
case SERVER_TYPE_NCM:
$server['img'] = html_print_image(
'images/book_edit.png',
true,
[
'title' => __('NCM server'),
'class' => 'invert_filter',
]
);
$server['type'] = 'ncm';
$id_modulo = 0;
break;
case SERVER_TYPE_AUTOPROVISION:
$server['img'] = html_print_image(
'images/autoprovision.png',

View File

@ -1082,6 +1082,9 @@ CREATE TABLE IF NOT EXISTS `tperfil` (
`vconsole_view` tinyint(1) NOT NULL DEFAULT 0,
`vconsole_edit` tinyint(1) NOT NULL DEFAULT 0,
`vconsole_management` tinyint(1) NOT NULL DEFAULT 0,
`network_config_view`tinyint(1) NOT NULL DEFAULT 0,
`network_config_edit`tinyint(1) NOT NULL DEFAULT 0,
`network_config_management`tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id_perfil`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -2754,3 +2754,31 @@ SELECT @plugin_id := `id` FROM `tplugin` WHERE `name` = @plugin_name;
INSERT IGNORE INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `ff_type`, `each_ff`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `dynamic_next`, `dynamic_two_tailed`, `module_type`, `protocol`, `manufacturer_id`, `execution_type`, `scan_type`, `value`, `value_operations`, `module_enabled`, `name_oid`, `query_class`, `query_key_field`, `scan_filters`, `query_filters`, `enabled`) VALUES (@component_id,@component_name,@component_description,@group_id,1,0,0,0,0,'','','','',0,9,0,'','','',0,0,0,80.00,90.00,'',90.00,0.00,'',0,'','','',0,0,0.000000000000000,'%','nowizard',CONCAT('{\"extra_field_1\":\"Size\",\"extra_field_2\":\"FreeSpace\",\"satellite_execution\":\"/etc/pandora/satellite_plugins/wizard_wmi_module&#x20;-host&#x20;&quot;_address_&quot;&#x20;-namespace&#x20;&quot;_namespace_wmi_&quot;&#x20;-user&#x20;&quot;_user_wmi_&quot;&#x20;-pass&#x20;&quot;_pass_wmi_&quot;&#x20;-wmiClass&#x20;&quot;_class_wmi_&quot;&#x20;-fieldsList&#x20;&quot;_field_wmi_1_,_field_wmi_2_&quot;&#x20;-queryFilter&#x20;&quot;DeviceID&#x20;=&#x20;&#039;_DeviceID_&#039;&quot;&#x20;-operation&#x20;&quot;&#40;&#40;_f1_&#x20;-&#x20;_f2_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_f1_&quot;&#x20;-wmicPath&#x20;/usr/bin/wmic\",\"value_operation\":\"&#40;&#40;_Size_&#x20;-&#x20;_FreeSpace_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_Size_\",\"server_plugin\":\"',@plugin_id,'\",\"_field2__wmi_field\":\"_namespace_wmi_\",\"_field1__wmi_field\":\"_address_\",\"_field4__wmi_field\":\"_pass_wmi_\",\"_field3__wmi_field\":\"_user_wmi_\",\"_field6__wmi_field\":\"_field_wmi_1_,_field_wmi_2_\",\"_field5__wmi_field\":\"_class_wmi_\",\"_field8__wmi_field\":\"&#40;&#40;_f1_&#x20;-&#x20;_f2_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_f1_\",\"_field7__wmi_field\":\"DeviceID&#x20;=&#x20;&#039;_DeviceID_&#039;\",\"field0_wmi_field\":\"\"}'),'','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,1,'wmi','',2,2,'','',1,'','Win32_LogicalDisk','DeviceID','','{\"scan\":\"DriveType&#x20;=&#x20;3\",\"execution\":\"\",\"field\":\"\",\"key_string\":\"\"}',1);
INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom');
INSERT INTO `tncm_vendor` VALUES
(1,'Cisco'),
(2, 'D-Link Systems, Inc.'),
(3, 'MikroTik'),
(4, 'Alcatel-Lucent Enterprise'),
(5, 'Ubiquiti Networks, Inc.'),
(6, 'Allied Telesis, Inc.'),
(7, 'Frogfoot Networks'),
(8, 'IBM'),
(9, 'Dell Inc.'),
(10, 'Hitachi Communication Technologies, Ltd.'),
(11, 'Netlink'),
(12, 'Ascom'),
(13, 'Synology Inc.'),
(14, 'Fujitsu Network Communications, Inc.');
INSERT INTO `tncm_model` VALUES (1,1,'7200');
INSERT INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
INSERT INTO `tncm_script` VALUES
(1,0,'enable&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;exit'),
(2,1,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;running-config&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;');

View File

@ -693,6 +693,9 @@ syslog_max 65535
# Threads for NCM server (PANDORA FMS ENTERPRISE ONLY).
ncmserver_threads 1
# NCM utility to avoid Net::SSH::Expect issues in multi-threaded environments.
ncm_ssh_utility /usr/share/pandora_server/util/ncm_ssh_extension
# Pandora FMS Daemon Watchdog execution interval in seconds (PANDORA FMS ENTERPRISE ONLY).
ha_interval 30

View File

@ -563,7 +563,8 @@ sub pandora_load_config {
$pa_config->{"alertserver_warn"} = 180; # 7.0 756
$pa_config->{'ncmserver'} = 0; # 7.0 758
$pa_config->{'ncm_threads'} = 1; # 7.0 758
$pa_config->{'ncmserver_threads'} = 1; # 7.0 758
$pa_config->{'ncm_ssh_utility'} = '/usr/share/pandora_server/util/ncm_ssh_extension'; # 7.0 758
# Check for UID0
if ($pa_config->{"quiet"} != 0){
@ -1284,8 +1285,11 @@ sub pandora_load_config {
elsif ($parametro =~ m/^ncmserver\s+([0-9]*)/i){
$pa_config->{'ncmserver'}= clean_blank($1);
}
elsif ($parametro =~ m/^ncm_threads\s+([0-9]*)/i) {
$pa_config->{'ncm_threads'}= clean_blank($1);
elsif ($parametro =~ m/^ncmserver_threads\s+([0-9]*)/i) {
$pa_config->{'ncmserver_threads'}= clean_blank($1);
}
elsif ($parametro =~ m/^ncm_ssh_utility\s+(.*)/i) {
$pa_config->{'ncm_ssh_utility'}= clean_blank($1);
}
# Pandora HA extra