2012-10-29 Ramon Novoa <rnovoa@artica.es>

* include/functions_reporting.php,
	  include/javascript/pandora_modules.js,
	  include/functions_network_components.php,
	  include/functions_api.php,
	  include/functions_netflow.php,
	  pandoradb.sql,
	  pandoradb.postgreSQL.sql,
	  pandoradb.oracle.sql,
	  extensions/resource_registration.php,
	  extensions/plugin_registration.php,
	  operation/menu.php,
	  extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
	  extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
	  extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
	  godmode/agentes/agent_template.php,
	  godmode/agentes/module_manager_editor_common.php,
	  godmode/agentes/configurar_agente.php,
	  godmode/agentes/module_manager_editor.php,
	  godmode/servers/plugin.php,
	  godmode/menu.php,
	  godmode/modules/manage_network_components_form.php,
	  godmode/modules/manage_network_templates.php,
	  godmode/modules/manage_network_components_form_wmi.php,
	  godmode/modules/manage_network_components.php,
	  godmode/reporting/reporting_builder.php,
	  godmode/reporting/reporting_builder.item_editor.php: Added support for
	  custom timeout and retries to remote modules.

	* operation/netflow/nf_reporting.php,
	  operation/netflow/nf_view.php,
	  godmode/netflow/nf_report_item.php,
	  godmode/netflow/nf_report.php,
	  godmode/netflow/nf_report_form.php,
	  godmode/netflow/nf.php: Deleted from repository. Netflow reports are
	  now integrated into custom reports.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7103 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2012-10-29 10:13:49 +00:00
parent 97373f2eb2
commit b09cfacf69
33 changed files with 202 additions and 1042 deletions

View File

@ -1,3 +1,41 @@
2012-10-29 Ramon Novoa <rnovoa@artica.es>
* include/functions_reporting.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_api.php,
include/functions_netflow.php,
pandoradb.sql,
pandoradb.postgreSQL.sql,
pandoradb.oracle.sql,
extensions/resource_registration.php,
extensions/plugin_registration.php,
operation/menu.php,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor.php,
godmode/servers/plugin.php,
godmode/menu.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php: Added support for
custom timeout and retries to remote modules.
* operation/netflow/nf_reporting.php,
operation/netflow/nf_view.php,
godmode/netflow/nf_report_item.php,
godmode/netflow/nf_report.php,
godmode/netflow/nf_report_form.php,
godmode/netflow/nf.php: Deleted from repository. Netflow reports are
now integrated into custom reports.
2012-10-29 Sergio Martin <sergio.martin@artica.es>
* pandoradb_data.sql

View File

@ -140,6 +140,7 @@ function pluginreg_extension_main () {
'name' => io_safe_input ($ini_array["plugin_definition"]["name"]),
'description' => io_safe_input ($ini_array["plugin_definition"]["description"]),
'max_timeout' => $ini_array["plugin_definition"]["timeout"],
'max_retries' => $ini_array["plugin_definition"]["retries"],
'execute' => io_safe_input ($exec_path),
'parameters' => io_safe_input ($ini_array["plugin_definition"]["execution_postcommand"]),
'macros' => $macros,

View File

@ -605,6 +605,7 @@ function process_upload_xml_component($xml) {
$plugin_password = io_safe_input((string)$componentElement->plugin_password);
$plugin_parameters = io_safe_input((string)$componentElement->plugin_parameters);
$max_timeout = (int)$componentElement->max_timeout;
$max_retries = (int)$componentElement->max_retries;
$historical_data = (int)$componentElement->historical_data;
$min_war = (float)$componentElement->min_war;
$max_war = (float)$componentElement->max_war;
@ -676,6 +677,7 @@ function process_upload_xml_component($xml) {
'plugin_pass' => $plugin_password,
'plugin_parameter' => $plugin_parameters,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'history_data' => $historical_data,
'min_warning' => $min_war,
'max_warning' => $max_war,
@ -711,6 +713,7 @@ function process_upload_xml_component($xml) {
'plugin_pass' => $plugin_password,
'plugin_parameter' => $plugin_parameters,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'history_data' => $historical_data,
'min_warning' => $min_war,
'max_warning' => $max_war,
@ -748,6 +751,7 @@ function process_upload_xml_component($xml) {
'plugin_pass' => $wmi_password, //work around
'plugin_parameter' => $plugin_parameters,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'history_data' => $historical_data,
'min_warning' => $min_war,
'max_warning' => $max_war,

View File

@ -156,6 +156,7 @@ ALTER TABLE `tagente_modulo` ADD COLUMN `unknown_instructions` TEXT NOT NULL DEF
ALTER TABLE `tagente_modulo` ADD COLUMN `critical_inverse` tinyint(1) unsigned default '0';
ALTER TABLE `tagente_modulo` ADD COLUMN `warning_inverse` tinyint(1) unsigned default '0';
ALTER TABLE `tagente_modulo` ADD COLUMN `cron_interval` varchar(100) default '';
ALTER TABLE `tagente_modulo` ADD COLUMN `max_retries` int(4) UNSIGNED NOT NULL default 0;
------------------------------------------------------------------------
-- Table `tnetwork_component`
@ -170,6 +171,7 @@ ALTER TABLE `tnetwork_component` ADD COLUMN `warning_instructions` TEXT NOT NULL
ALTER TABLE `tnetwork_component` ADD COLUMN `unknown_instructions` TEXT NOT NULL default '';
ALTER TABLE `tnetwork_component` ADD COLUMN `critical_inverse` tinyint(1) unsigned default '0';
ALTER TABLE `tnetwork_component` ADD COLUMN `warning_inverse` tinyint(1) unsigned default '0';
ALTER TABLE `tnetwork_component` ADD COLUMN `max_retries` int(4) UNSIGNED NOT NULL default 0;
------------------------------------------------------------------------
-- Table `tgraph_source` Alter table to allow negative values in weight
@ -291,6 +293,7 @@ CREATE TABLE IF NOT EXISTS `tpassword_history` (
------------------------------------------------------------------------
ALTER TABLE tplugin ADD `macros` text;
ALTER TABLE tplugin ADD `parameters` text;
ALTER TABLE tplugin ADD `max_retries` int(4) UNSIGNED NOT NULL default 0;
------------------------------------------------------------------------
-- Table `trecon_script`

View File

@ -303,12 +303,14 @@ ALTER TABLE tagente_modulo ADD CONSTRAINT t_agente_modulo_wizard_level_cons CHEC
ALTER TABLE tagente_modulo ADD (macros CLOB default '');
ALTER TABLE tagente_modulo ADD (quiet NUMBER(5, 0) default 0 NOT NULL);
ALTER TABLE tagente_modulo ADD (cron_interval VARCHAR2(100) DEFAULT '');
ALTER TABLE tagente_modulo ADD (max_retries NUMBER(10, 0) default 0);
-- -----------------------------------------------------
-- Table tplugin
-- -----------------------------------------------------
ALTER TABLE tplugin ADD (macros CLOB default '');
ALTER TABLE tplugin ADD (parameters CLOB default '');
ALTER TABLE tplugin ADD (max_retries NUMBER(10, 0) default 0);
-- -----------------------------------------------------
-- Table trecon_task
@ -338,6 +340,7 @@ ALTER TABLE tnetwork_component ADD (warning_instructions VARCHAR2(255) default '
ALTER TABLE tnetwork_component ADD (unknown_instructions VARCHAR2(255) default '');
ALTER TABLE tnetwork_component ADD (critical_inverse NUMBER(1, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_component ADD (warning_inverse NUMBER(1, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_component ADD (max_retries NUMBER(10, 0) default 0);
evento
------------------------------------------------------------------------

View File

@ -178,6 +178,7 @@ ALTER TABLE "tagente_modulo" ADD COLUMN "unknown_instructions" text default '';
ALTER TABLE "tagente_modulo" ADD COLUMN "critical_inverse" SMALLINT NOT NULL default 0;
ALTER TABLE "tagente_modulo" ADD COLUMN "warning_inverse" SMALLINT NOT NULL default 0;
ALTER TABLE "tagente_modulo" ADD COLUMN "cron_interval" varchar(100) default '';
ALTER TABLE "tagente_modulo" ADD COLUMN "max_retries" INTEGER default 0;
-- -----------------------------------------------------
-- Table "tevent_filter"
@ -252,6 +253,7 @@ ALTER TABLE "talert_compound" ADD COLUMN "special_day" SMALLINT default 0;
-- -----------------------------------------------------
ALTER TABLE "tnetwork_component" ADD COLUMN "unit" text default '';
ALTER TABLE "tnetwork_component" ADD COLUMN "max_retries" INTEGER default 0;
-- -----------------------------------------------------
-- Table "talert_commands"
@ -310,6 +312,7 @@ ALTER TABLE "tnetwork_component" ADD COLUMN "macros" TEXT default '';
ALTER TABLE "tplugin" ADD COLUMN "macros" TEXT default '';
ALTER TABLE "tplugin" ADD COLUMN "parameters" TEXT default '';
ALTER TABLE "tplugin" ADD COLUMN "max_retries" INTEGER default '0';
------------------------------------------------------------------------
-- Table "trecon_task"

View File

@ -78,6 +78,7 @@ if (isset ($_POST["template_id"])) {
'plugin_pass' => $row2["plugin_pass"],
'plugin_parameter' => $row2["plugin_parameter"],
'max_timeout' => $row2["max_timeout"],
'max_retries' => $row2["max_retries"],
'id_plugin' => $row2['id_plugin'],
'post_process' => $row2['post_process'],
'min_warning' => $row2['min_warning'],
@ -211,4 +212,4 @@ if (!empty ($table->data)) {
else {
echo '<div class="nf">No modules</div>';
}
?>
?>

View File

@ -681,6 +681,7 @@ if ($update_module || $create_module) {
$post_process = (string) get_parameter ('post_process', 0.0);
$prediction_module = 1;
$max_timeout = (int) get_parameter ('max_timeout');
$max_retries = (int) get_parameter ('max_retries');
$min = (int) get_parameter_post ("min");
$max = (int) get_parameter ('max');
$interval = (int) get_parameter ('module_interval', $intervalo);
@ -839,6 +840,7 @@ if ($update_module) {
'post_process' => $post_process,
'prediction_module' => $prediction_module,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'custom_id' => $custom_id,
'history_data' => $history_data,
'min_warning' => $min_warning,
@ -954,7 +956,8 @@ if ($create_module) {
'id_plugin' => $id_plugin,
'post_process' => $post_process,
'prediction_module' => $prediction_module,
'max_timeout' => $max_timeout,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'disabled' => $disabled,
'id_modulo' => $id_module,
'custom_id' => $custom_id,

View File

@ -190,6 +190,7 @@ if ($id_agent_module) {
$prediction_module = $module['prediction_module'];
$custom_integer_2 = $module ['custom_integer_2'];
$max_timeout = $module['max_timeout'];
$max_retries = $module['max_retries'];
$custom_id = $module['custom_id'];
$history_data = $module['history_data'];
$min_warning = $module['min_warning'];
@ -234,7 +235,8 @@ else {
$id_module_group = 1;
$id_module_type = 1;
$post_process = '';
$max_timeout = '';
$max_timeout = 0;
$max_retries = 0;
$min = '';
$max = '';
$interval = '';

View File

@ -373,6 +373,12 @@ $table_advanced->data[11][0] = __('Cron') . ui_print_help_tip (__('If cron is se
$table_advanced->data[11][1] = html_print_extended_select_for_cron ($hour, $minute, $mday, $month, $wday, true);
$table_advanced->colspan[11][1] = 4;
$table_advanced->data[12][0] = __('Timeout');
$table_advanced->data[12][1] = html_print_input_text ('max_timeout', $max_timeout, '', 5, 10, true);
$table_advanced->data[12][2] = '';
$table_advanced->data[12][3] = __('Retries');
$table_advanced->data[12][4] = html_print_input_text ('max_retries', $max_retries, '', 5, 10, true);
?>
<script type="text/javascript">

View File

@ -199,7 +199,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
$sub["godmode/setup/setup_visuals"]["text"] = __('Visual styles');
$sub["godmode/setup/file_manager"]["text"] = __('File manager');
if ($config['activate_netflow'])
$sub["godmode/setup/setup_netflow"]["text"] = __('Netflow');
$sub["godmode/setup/setup_netflow"]["text"] = __('Netflow filters');
if ($config['activate_gis'])
$sub["godmode/setup/gis"]["text"] = __('Map conections GIS');
$sub["godmode/setup/links"]["text"] = __('Links');
@ -216,15 +216,9 @@ if (check_acl ($config['id_user'], 0, "PM")) {
if (check_acl ($config['id_user'], 0, "AW")) {
if ($config['activate_netflow']) {
//Netflow
$menu_godmode["netf"]["text"] = __('Netflow');
$menu_godmode["netf"]["sec2"] = "godmode/netflow/nf_report";
$menu_godmode["netf"]["text"] = __('Netflow filters');
$menu_godmode["netf"]["sec2"] = "godmode/netflow/nf_edit";
$menu_godmode["netf"]["id"] = "god-netflow";
$sub = array ();
$sub["godmode/netflow/nf_edit"]["text"] = __('Filters');
$sub["godmode/netflow/nf_report"]["text"] = __('Manage reports');
$menu_godmode["netf"]["sub"] = $sub;
}
}

View File

@ -60,6 +60,7 @@ if(!empty($macros)) {
}
$max_timeout = (int) get_parameter ('max_timeout');
$max_retries = (int) get_parameter ('max_retries');
$id_modulo = (int) get_parameter ('id_component_type');
$id_plugin = (int) get_parameter ('id_plugin');
$min_warning = (float) get_parameter ('min_warning');
@ -151,6 +152,7 @@ if ($create_component) {
'plugin_parameter' => $plugin_parameter,
'macros' => $macros,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'history_data' => $history_data,
'min_warning' => $min_warning,
'max_warning' => $max_warning,
@ -228,6 +230,7 @@ if ($update_component) {
'plugin_parameter' => $plugin_parameter,
'macros' => $macros,
'max_timeout' => $max_timeout,
'max_retries' => $max_retries,
'history_data' => $history_data,
'min_warning' => $min_warning,
'max_warning' => $max_warning,
@ -348,6 +351,7 @@ $url = ui_get_url_refresh (array ('offset' => false,
'plugin_parameter' => false,
'macros' => false,
'max_timeout' => false,
'max_retries' => false,
'id_modulo' => false,
'id_plugin' => false,
'history_data' => false,

View File

@ -49,6 +49,7 @@ if ($create_network_from_module) {
$plugin_parameter = $data_module["plugin_parameter"];
$macros = $data_module["macros"];
$max_timeout = $data_module["max_timeout"];
$max_retries = $data_module["max_retries"];
$min_warning = $data_module["min_warning"];
$max_warning = $data_module["max_warning"];
$str_warning = $data_module["str_warning"];
@ -95,6 +96,7 @@ if (isset ($id)) {
$plugin_parameter = $component["plugin_parameter"];
$macros = $component["macros"];
$max_timeout = $component["max_timeout"];
$max_retries = $component["max_retries"];
$min_warning = $component["min_warning"];
$max_warning = $component["max_warning"];
$str_warning = $component["str_warning"];

View File

@ -75,6 +75,7 @@ if (! $id) {
$plugin_pass = "";
$plugin_parameter = "";
$max_timeout = 10;
$max_retries = 1;
}
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components">';
@ -141,6 +142,12 @@ echo '<td class="datos2">';
echo '<input type="text" name="max_timeout" size="5" value="' . $max_timeout . '">';
echo '</td></tr>';
// Timeout
echo '<td class="datos2">' . __('Max. retries') . '</td>';
echo '<td class="datos2">';
echo '<input type="text" name="max_retries" size="5" value="' . $max_retries . '">';
echo '</td></tr>';
// WMI Query
echo '<tr><td class="datos">' . __('WMI query') ;
ui_print_help_icon("wmiquery");

View File

@ -100,7 +100,7 @@ if ($export_profile) {
SELECT components.name, components.description, components.type, components.max, components.min, components.module_interval,
components.tcp_port, components.tcp_send, components.tcp_rcv, components.snmp_community, components.snmp_oid,
components.id_module_group, components.id_modulo, components.plugin_user, components.plugin_pass, components.plugin_parameter,
components.max_timeout, components.history_data, components.min_warning, components.max_warning, components.str_warning, components.min_critical,
components.max_timeout, components.max_retries, components.history_data, components.min_warning, components.max_warning, components.str_warning, components.min_critical,
components.max_critical, components.str_critical, components.min_ff_event, comp_group.name AS group_name, components.critical_instructions, components.warning_instructions, components.unknown_instructions
FROM `tnetwork_component` AS components, tnetwork_profile_component AS tpc, tnetwork_component_group AS comp_group
WHERE tpc.id_nc = components.id_nc
@ -112,7 +112,7 @@ if ($export_profile) {
SELECT components.name, components.description, components.type, components.max, components.min, components.module_interval,
components.tcp_port, components.tcp_send, components.tcp_rcv, components.snmp_community, components.snmp_oid,
components.id_module_group, components.id_modulo, components.plugin_user, components.plugin_pass, components.plugin_parameter,
components.max_timeout, components.history_data, components.min_warning, components.max_warning, components.str_warning, components.min_critical,
components.max_timeout, components.max_retries, components.history_data, components.min_warning, components.max_warning, components.str_warning, components.min_critical,
components.max_critical, components.str_critical, components.min_ff_event, comp_group.name AS group_name, components.critical_instructions, components.warning_instructions, components.unknown_instructions
FROM \"tnetwork_component\" AS components, tnetwork_profile_component AS tpc, tnetwork_component_group AS comp_group
WHERE tpc.id_nc = components.id_nc
@ -124,7 +124,7 @@ if ($export_profile) {
SELECT components.name, components.description, components.type, components.max, components.min, components.module_interval,
components.tcp_port, components.tcp_send, components.tcp_rcv, components.snmp_community, components.snmp_oid,
components.id_module_group, components.id_modulo, components.plugin_user, components.plugin_pass, components.plugin_parameter,
components.max_timeout, components.history_data, components.min_warning, components.max_warning, components.str_warning, components.min_critical,
components.max_timeout, components.max_retries, components.history_data, components.min_warning, components.max_warning, components.str_warning, components.min_critical,
components.max_critical, components.str_critical, components.min_ff_event, comp_group.name AS group_name, components.critical_instructions, components.warning_instructions, components.unknown_instructions
FROM tnetwork_component AS components, tnetwork_profile_component AS tpc, tnetwork_component_group AS comp_group
WHERE tpc.id_nc = components.id_nc

View File

@ -1,95 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
//include_once("include/functions_graph.php");
include_once("include/functions_ui.php");
//ui_require_javascript_file ('calendar');
check_login ();
if (! check_acl ($config["id_user"], 0, "IR")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
$buttons ['view']= '<a href="index.php?sec=netf&sec2=operation/netflow/nf&id_name='.$name.'">'
. html_print_image ("images/lupa.png", true, array ("title" => __('View')))
. '</a>';
$buttons['edit'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'
. html_print_image ("images/edit.png", true, array ("title" => __('Filter list')))
. '</a>';
$buttons['add'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'
. html_print_image ("images/add.png", true, array ("title" => __('Add filter')))
. '</a>';
//Header
ui_print_page_header (__('Netflow Manager'), "images/networkmap/so_cisco_new.png", false, "", true, $buttons);
$update = (bool) get_parameter ("update");
if ($update) {
$config['netflow_path'] = (string)get_parameter('netflow_path');
if (db_get_value('token', 'tconfig', 'token', 'netflow_path') === false) {
config_create_value('netflow_path', $config['netflow_path']);
}
else {
db_process_sql_update ('tconfig',
array ('value' => $config['netflow_path']),
array ('token' => 'netflow_path'));
}
}
$table->width = '70%';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = "databox_color";
$table->style[0] = 'vertical-align: top;';
$table->data = array ();
$table->data[0][0] = '<b>'.__('Path').'</b>'. ui_print_help_tip (__("Read input from a sequence of files in the same directory."), true);
$table->data[0][1] = html_print_input_text ('netflow_path', $config['netflow_path'], false, 50, 200, true);
echo '<form id="netflow_setup" method="post">';
html_print_table ($table);
// Update button
echo '<div class="action-buttons" style="width:70%;">';
html_print_input_hidden ('update', 1);
html_print_submit_button (__('Update'), 'upd_button', false, 'class="sub upd"');
echo '</div></form>';
?>
<script type="text/javascript">
$(document).ready (function () {
$("textarea").TextAreaResizer ();
});
</script>

View File

@ -1,170 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
include_once("include/functions_ui.php");
include_once("include/functions_db.php");
include_once("include/functions_netflow.php");
include_once("include/functions_html.php");
check_login ();
if (! check_acl ($config["id_user"], 0, "IW")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
//Header
ui_print_page_header (__('Report Manager'), "images/networkmap/so_cisco_new.png", false, "", true);
$delete = (bool) get_parameter ('delete');
$multiple_delete = (bool)get_parameter('multiple_delete', 0);
$id = (int) get_parameter ('id');
if ($delete) {
$result = db_process_sql_delete ('tnetflow_report',
array ('id_report' => $id));
if ($result !== false) $result = true;
else $result = false;
ui_print_result_message ($result,
__('Successfully deleted'),
__('Not deleted. Error deleting data'));
}
if ($multiple_delete) {
$ids = (array)get_parameter('delete_multiple', array());
db_process_sql_begin();
foreach ($ids as $id) {
$result = db_process_sql_delete ('tnetflow_report',
array ('id_report' => $id));
if ($result === false) {
db_process_sql_rollback();
break;
}
}
if ($result !== false) {
db_process_sql_commit();
}
if ($result !== false) $result = true;
else $result = false;
ui_print_result_message ($result,
__('Successfully deleted'),
__('Not deleted. Error deleting data'));
}
$own_info = get_user_info ($config['id_user']);
// Get group list that user has access
$groups_user = users_get_groups ($config['id_user'], "IW", $own_info['is_admin'], true);
$groups_id = array();
foreach($groups_user as $key => $groups){
$groups_id[] = $groups['id_grupo'];
}
$sql = "SELECT * FROM tnetflow_report WHERE id_group IN (".implode(',',$groups_id).")";
$reports = db_get_all_rows_sql($sql);
if ($reports === false)
$reports = array();
$table->width = '98%';
$table->head = array ();
$table->head[0] = __('Report name');
$table->head[1] = __('Description');
$table->head[2] = __('Group');
$table->head[3] = __('Action') .
html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();');
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->align = array ();
$table->align[2] = 'center';
$table->align[3] = 'center';
$table->size = array ();
$table->size[0] = '40%';
$table->size[1] = '30%';
$table->size[2] = '20%';
$table->size[3] = '50px';
$table->data = array ();
$total_reports = db_get_all_rows_filter ('tnetflow_report', false, 'COUNT(*) AS total');
$total_reports = $total_reports[0]['total'];
//ui_pagination ($total_reports, $url);
foreach ($reports as $report) {
$data = array ();
$data[0] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$report['id_report'].'">'.$report['id_name'].'</a>';
$data[1] = $report['description'];
$group = db_get_value('nombre','tgrupo', 'id_grupo', $report['id_group']);
if ($group == '')
$group = 'All';
$data[2] = $group;
$data[3] = "<a onclick='if(confirm(\"" . __('Are you sure?') . "\")) return true; else return false;'
href='index.php?sec=netf&sec2=godmode/netflow/nf_report&delete=1&id=".$report['id_report']."&offset=0'>" .
html_print_image('images/cross.png', true, array('title' => __('Delete'))) . "</a>" .
html_print_checkbox_extended ('delete_multiple[]', $report['id_report'], false, false, '', 'class="check_delete"', true);
array_push ($table->data, $data);
}
if (isset($data)) {
echo "<form method='post' action='index.php?sec=netf&sec2=godmode/netflow/nf_report'>";
html_print_input_hidden('multiple_delete', 1);
html_print_table ($table);
echo "<div style='padding-bottom: 20px; text-align: right; width:" . $table->width . "'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo "</div>";
echo "</form>";
}
else {
echo "<div class='nf'>".__('There are no defined reports')."</div>";
}
echo '<form method="post" action="index.php?sec=netf&sec2=godmode/netflow/nf_report_form">';
echo "<div style='padding-bottom: 20px; text-align: right; width:" . $table->width . "'>";
html_print_submit_button (__('Create report'), 'crt', false, 'class="sub wand"');
echo "</div>";
echo "</form>";
?>
<script type="text/javascript">
function check_all_checkboxes() {
if ($("input[name=all_delete]").attr('checked')) {
$(".check_delete").attr('checked', true);
}
else {
$(".check_delete").attr('checked', false);
}
}
</script>

View File

@ -1,186 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
include_once($config['homedir'] . "/include/functions_ui.php");
include_once($config['homedir'] . "/include/functions_html.php");
include_once($config['homedir'] . "/include/functions_db.php");
include_once($config['homedir'] . "/include/functions_netflow.php");
if (defined ('METACONSOLE')) {
include_once($config['homedir'] . "/enterprise/include/functions_metaconsole.php");
}
check_login ();
if (! check_acl ($config["id_user"], 0, "IW")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
$result_ins = -1;
$update = (string)get_parameter('update', 0);
$create = (string)get_parameter('create', 0);
if ($create) {
$name = (string) get_parameter ('name');
$group = (int) get_parameter ('id_group');
$description = get_parameter('description','');
$connection_name = get_parameter('connection_name','');
$values = array (
'id_name' => $name,
'id_group' => $group,
'description' => $description,
'server_name' => $connection_name,
);
$result_ins = db_process_sql_insert('tnetflow_report', $values);
$id = $result_ins;
}
else {
$id = (int)get_parameter('id');
}
if (! defined ('METACONSOLE')) {
$buttons['report_list']['active'] = false;
$buttons['report_list'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_report">'
. html_print_image ("images/edit.png", true, array ("title" => __('Report list')))
. '</a>';
$buttons['report_items']['active'] = false;
$buttons['report_items']['text'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">'
. html_print_image ("images/god6.png", true, array ("title" => __('Report items')))
. '</a>';
$buttons['edit_report']['active'] = true;
$buttons['edit_report']['text'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$id.'">'
. html_print_image ("images/config.png", true, array ("title" => __('Edit report')))
. '</a>';
//Header
ui_print_page_header (__('Netflow Report'), "images/networkmap/so_cisco_new.png", false, "", true, $buttons);
} else {
$nav_bar = array(array('link' => 'index.php?sec=main', 'text' => __('Main')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_reporting', 'text' => __('Netflow reports')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_report_form', 'text' => __('Edit netflow report')));
ui_meta_print_page_header($nav_bar);
}
//Control error creating report
if (($result_ins === false) && ($result_ins != -1)) {
ui_print_error_message ('Error creating report');
}
else if (($result_ins != false) && ($result_ins != -1)){
ui_print_success_message ('Report created successfully');
}
if ($id) {
$permission = netflow_check_report_group ($id, false);
if (!$permission) { //no tiene permisos para acceder a un informe
require ("general/noaccess.php");
return;
}
}
if ($id) {
$report = netflow_reports_get_reports ($id);
$name = $report['id_name'];
$description = $report['description'];
$group = $report['id_group'];
$connection_name = $report['server_name'];
}
else {
$name = '';
$group = '';
$description = '';
$connection_name = '';
}
if ($update) {
$id = get_parameter('id');
$name = (string) get_parameter ('name');
$description = get_parameter ('description');
$group = get_parameter('id_group');
$connection_name = get_parameter('connection_name');
if ($name == '') {
ui_print_error_message (__('Not updated. Blank name'));
}
else {
$result = db_process_sql_update ('tnetflow_report',
array (
'id_name' => $name,
'id_group' => $group,
'description' => $description,
'server_name' => $connection_name,
),
array ('id_report' => $id));
ui_print_result_message ($result, __('Report updated successfully'), __('Error updating report'));
}
}
$table->width = '80%';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = "databox_color";
$table->style[0] = 'vertical-align: top;';
$table->data = array ();
$table->data[0][0] = '<b>'.__('Name').'</b>';
$table->data[0][1] = html_print_input_text ('name', $name, false, 30, 80, true);
$own_info = get_user_info ($config['id_user']);
$table->data[1][0] = '<b>'.__('Group').'</b>';
$table->data[1][1] = html_print_select_groups($config['id_user'], "IW",
$own_info['is_admin'], 'id_group', $group, '','', -1, true,
false, false);
$table->data[2][0] = '<b>'.__('Description').'</b>';
$table->data[2][1] = html_print_textarea ('description', 2, 65, $description, '', true);
if (defined ('METACONSOLE')) {
$table->data[3][0] = '<b>'.__('Connection').'</b>';
$table->data[3][1] = html_print_select (metaconsole_get_connection_names (), 'connection_name', $connection_name, '', '', 0, true, false, false);
}
if (defined ('METACONSOLE')) {
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_report_form">';
}
html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) {
html_print_input_hidden ('update', 1);
html_print_input_hidden ('id', $id);
html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
}
else {
html_print_input_hidden ('create', 1);
html_print_submit_button (__('Create'), 'crt', false, 'class="sub wand"');
}
echo '</div>';
echo '</form>';
?>

View File

@ -1,201 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
include_once($config['homedir'] . "/include/functions_ui.php");
include_once($config['homedir'] . "/include/functions_html.php");
include_once($config['homedir'] . "/include/functions_db.php");
include_once($config['homedir'] . "/include/functions_netflow.php");
ui_require_javascript_file ('calendar');
check_login ();
if (! check_acl ($config["id_user"], 0, "IW")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
$id = (int)get_parameter('id');
$id_rc = (int)get_parameter('id_rc');
$update = (string)get_parameter('update', 0);
$create = (string)get_parameter('create', 0);
$buttons['report_list']['active'] = false;
$buttons['report_list'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_report">'
. html_print_image ("images/edit.png", true, array ("title" => __('Report list')))
. '</a>';
$buttons['report_items']['active'] = true;
$buttons['report_items']['text'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">'
. html_print_image ("images/god6.png", true, array ("title" => __('Report items')))
. '</a>';
$buttons['edit_report']['active'] = false;
$buttons['edit_report']['text'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$id.'">'
. html_print_image ("images/config.png", true, array ("title" => __('Edit report')))
. '</a>';
//Header
if (! defined ('METACONSOLE')) {
ui_print_page_header (__('Report item editor'), "images/networkmap/so_cisco_new.png", false, "", true, $buttons);
} else {
$nav_bar = array(array('link' => 'index.php?sec=main', 'text' => __('Main')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_reporting', 'text' => __('Netflow reports')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_item_list&id=' . $id, 'text' => __('Item list')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_report_item&id=' . $id, 'text' => __('Edit item')));
ui_meta_print_page_header($nav_bar);
}
if ($id_rc) {
$item = netflow_reports_get_content ($id_rc);
$id_filter = $item['id_filter'];
$name_filter = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $id_filter);
$max_val = $item['max'];
$show_graph = $item['show_graph'];
$description = $item['description'];
}
else {
$name_filter = '';
$max_val = '';
$show_graph = '';
$description = '';
}
if ($update) {
$id_filter = get_parameter('id_filter');
$name_filter = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $id_filter);
$max_val = get_parameter('max','2');
$show_graph = get_parameter('show_graph','');
$description = get_parameter('description','');
$result = db_process_sql_update ('tnetflow_report_content',
array (
'id_report' => $id,
'id_filter' => $id_filter,
'max' => $max_val,
'show_graph' => $show_graph,
'description' => $description
),
array ('id_rc' => $id_rc));
ui_print_result_message ($result,
__('Successfully updated'),
__('Not updated. Error updating data'));
}
if ($create){
$id_filter = (int)get_parameter('id_filter', 0);
$name_filter = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $id_filter);
$max_val = (int)get_parameter('max',2);
$show_graph = (string)get_parameter('show_graph','');
$description = get_parameter('description','');
//insertion order
$sql = "SELECT max(`order`) as max_order FROM tnetflow_report_content where id_report=$id";
$result = db_get_row_sql($sql);
$order = $result['max_order'];
if ($order == '') {
$order = 0;
}
else {
$order++;
}
$values = array (
'id_report' => $id,
'id_filter' => $id_filter,
'max' => $max_val,
'show_graph' => $show_graph,
'description' => $description,
'`order`' => $order
);
$id_rc = db_process_sql_insert('tnetflow_report_content', $values);
if ($id_rc === false) {
if ($id_filter == 0)
echo '<h3 class="error">'.__ ('Error creating item. No filter.').'</h3>';
else
echo '<h3 class="error">'.__ ('Error creating item').'</h3>';
}
else {
echo '<h3 class="suc">'.__ ('Item created successfully').'</h3>';
}
}
$table->width = '70%';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = "databox_color";
$table->style[0] = 'vertical-align: top;';
$table->data = array ();
$filters = netflow_get_filters ();
if ($filters === false) {
$filters = array ();
}
$own_info = get_user_info ($config['id_user']);
// Get group list that user has access
$groups_user = users_get_groups ($config['id_user'], "IW", $own_info['is_admin'], true);
$groups_id = array();
foreach($groups_user as $key => $groups){
$groups_id[] = $groups['id_grupo'];
}
$sql = "SELECT * FROM tnetflow_filter WHERE id_group IN (".implode(',',$groups_id).")";
$table->data[0][0] = '<b>'.__('Filter').'</b>';
$table->data[0][1] = html_print_select_from_sql($sql, 'id_filter', $id_filter, '', '', 0, true);
$table->data[1][0] = '<b>'.__('Max. values').'</b>';
$max_values = array ('2' => '2',
'5' => '5',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'50' => '50'
);
$table->data[1][1] = html_print_select ($max_values, 'max', $max_val, '', '', 0, true);
$table->data[2][0] = '<b>'.__('Chart type').'</b>';
$table->data[2][1] = html_print_select (netflow_get_chart_types (), 'show_graph', $show_graph,'','',0,true);
$table->data[2][1] = html_print_select (netflow_get_chart_types (), 'show_graph', $show_graph,'','',0,true);
$table->data[3][0] = '<b>'.__('Description').'</b>';
$table->data[3][1] = html_print_textarea ('description', 2, 65, $description, '', true);
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir']. '/godmode/netflow/nf_report_item&id='.$id.'">';
html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id_rc) {
html_print_input_hidden ('update', 1);
html_print_input_hidden ('id_rc', $id_rc);
html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
}
else {
html_print_input_hidden ('create', 1);
html_print_submit_button (__('Create item'), 'crt', false, 'class="sub wand"');
}
echo '</div>';
echo '</form>';
?>

View File

@ -1882,7 +1882,6 @@ function chooseType() {
$("#row_netflow_filter").show();
$("#row_description").show();
$("#row_period").show();
$("#row_max_values").show();
$("#row_resolution").show();
$("#row_servers").show();
break;

View File

@ -650,6 +650,18 @@ switch ($action) {
$values['external_source'] = json_encode($es);
$good_format = true;
break;
case 'netflow_area':
case 'netflow_pie':
case 'netflow_data':
case 'netflow_statistics':
case 'netflow_summary':
$values['text'] = get_parameter('netflow_filter');
$values['description'] = get_parameter('description');
$values['period'] = get_parameter('period');
$values['top_n'] = get_parameter('resolution');
$values['top_n_value'] = get_parameter('max_values');
$good_format = true;
break;
default:
$values['period'] = get_parameter('period');
$values['top_n'] = get_parameter('radiobutton_max_min_avg',0);

View File

@ -47,6 +47,7 @@ if ($view != "") {
$form_name = $plugin["name"];
$form_description = $plugin["description"];
$form_max_timeout = $plugin ["max_timeout"];
$form_max_retries = $plugin ["max_retries"];
$form_execute = $plugin ["execute"];
$form_plugin_type = $plugin ["plugin_type"];
$macros = $plugin ["macros"];
@ -56,6 +57,7 @@ if ($create != "") {
$form_name = "";
$form_description = "";
$form_max_timeout = 15;
$form_max_retries = 1;
$form_execute = "";
$form_plugin_type = 0;
$form_parameters = "";
@ -100,10 +102,13 @@ if (($create != "") OR ($view != "")) {
$fields[0]= __("Standard");
$fields[1]= __("Nagios");
$data[1] = html_print_select ($fields, "form_plugin_type", $form_plugin_type, '', '', 0, true);
$data[2] = __('Max. timeout').ui_print_help_tip (__('This value only will be applied if is minor than the server general configuration plugin timeout').'. <br><br>'.__('If you set a 0 seconds timeout, the server plugin timeout will be used'), true);
$data[3] = '<input type="text" name="form_max_timeout" size=5 value="'.$form_max_timeout.'">';
$data[3] = html_print_extended_select_for_time ('form_max_timeout', $form_max_timeout, '', '', '0', false, true);
$table->data['plugin_type_timeout'] = $data;
$table->data['plugin_type'] = $data;
$data[0] = __('Max. timeout').ui_print_help_tip (__('This value only will be applied if is minor than the server general configuration plugin timeout').'. <br><br>'.__('If you set a 0 seconds timeout, the server plugin timeout will be used'), true);
$data[1] = html_print_extended_select_for_time ('form_max_timeout', $form_max_timeout, '', '', '0', false, true);
$data[2] = __('Max. retries');
$data[3] = '<input type="text" name="form_max_retries" size=5 value="'.$form_max_retries.'">';
$table->data['plugin_timeout'] = $data;
$data = array();
$data[0] = __('Description');
@ -277,6 +282,7 @@ else {
$plugin_name = get_parameter ("form_name", "");
$plugin_description = get_parameter ("form_description", "");
$plugin_max_timeout = get_parameter ("form_max_timeout", "");
$plugin_max_retries = get_parameter ("form_max_retries", "");
$plugin_execute = get_parameter ("form_execute", "");
$plugin_plugin_type = get_parameter ("form_plugin_type", "0");
$parameters = get_parameter ("form_parameters", "");
@ -307,6 +313,7 @@ else {
'name' => $plugin_name,
'description' => $plugin_description,
'max_timeout' => $plugin_max_timeout,
'max_retries' => $plugin_max_retries,
'execute' => $plugin_execute,
'plugin_type' => $plugin_plugin_type,
'parameters' => $parameters,
@ -329,6 +336,7 @@ else {
$plugin_name = get_parameter ("form_name", "");
$plugin_description = get_parameter ("form_description", "");
$plugin_max_timeout = get_parameter ("form_max_timeout", "");
$plugin_max_retries = get_parameter ("form_max_retries", "");
$plugin_execute = get_parameter ("form_execute", "");
$plugin_plugin_type = get_parameter ("form_plugin_type", "0");
$plugin_parameters = get_parameter ("form_parameters", "0");
@ -359,6 +367,7 @@ else {
'name' => $plugin_name,
'description' => $plugin_description,
'max_timeout' => $plugin_max_timeout,
'max_retries' => $plugin_max_retries,
'execute' => $plugin_execute,
'plugin_type' => $plugin_plugin_type,
'parameters' => $plugin_parameters,

View File

@ -412,6 +412,7 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType)
'module_post_process' => $module['post_process'],
'module_prediction_module' => $module['prediction_module'],
'module_max_timeout' => $module['max_timeout'],
'module_max_retries' => $module['max_retries'],
'module_custom_id' => $module['custom_id'],
'module_history_data' => $module['history_data'],
'module_min_warning' => $module['min_warning'],
@ -599,6 +600,7 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType)
'module_post_process',
'module_prediction_module',
'module_max_timeout',
'module_max_retries',
'module_custom_id',
'module_history_data',
'module_min_warning',
@ -1697,7 +1699,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3) {
* @param array $other it's array, $other as param is <network_component_type>;<description>;
* <module_interval>;<max_value>;<min_value>;<snmp_community>;<id_module_group>;<max_timeout>;
* <history_data>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;
* <ff_threshold>;<post_process>;<network_component_group> in this
* <ff_threshold>;<post_process>;<network_component_group>;<max_retries> in this
* order and separator char (after text ; ) and separator (pass in param
* othermode as othermode=url_encode_separator_<separator>)
* example:
@ -1741,7 +1743,9 @@ function api_set_new_network_component($id, $thrash1, $other, $thrash2) {
'max_critical' => $other['data'][13],
'str_critical' => $other['data'][14],
'min_ff_event' => $other['data'][15],
'post_process' => $other['data'][16]);
'post_process' => $other['data'][16],
'max_retries' => $other['data'][17],
);
$name_check = db_get_value ('name', 'tnetwork_component', 'name', $id);
@ -1766,7 +1770,7 @@ function api_set_new_network_component($id, $thrash1, $other, $thrash2) {
* @param array $other it's array, $other as param is <plugin_component_type>;<description>;
* <module_interval>;<max_value>;<min_value>;<module_port>;<id_module_group>;<id_plugin>;<max_timeout>;
* <history_data>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;
* <ff_threshold>;<post_process>;<plugin_component_group> in this
* <ff_threshold>;<post_process>;<plugin_component_group>;<max_retries> in this
* order and separator char (after text ; ) and separator (pass in param
* othermode as othermode=url_encode_separator_<separator>)
* example:
@ -1814,7 +1818,8 @@ function api_set_new_plugin_component($id, $thrash1, $other, $thrash2) {
'max_critical' => $other['data'][17],
'str_critical' => $other['data'][18],
'min_ff_event' => $other['data'][19],
'post_process' => $other['data'][20]);
'post_process' => $other['data'][20],
'max_retries' => $other['data'][11]);
$name_check = db_get_value ('name', 'tnetwork_component', 'name', $id);
@ -1840,7 +1845,7 @@ function api_set_new_plugin_component($id, $thrash1, $other, $thrash2) {
* <module_interval>;<max_value>;<min_value>;<id_module_group>;<max_timeout>;
* <history_data>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;
* <ff_threshold>;<post_process>;<snmp_version>;<snmp_oid>;<snmp_community>;
* <snmp3_auth_user>;<snmp3_auth_pass>;<module_port>;<snmp3_privacy_method>;<snmp3_privacy_pass>;<snmp3_auth_method>;<snmp3_security_level>;<snmp_component_group> in this
* <snmp3_auth_user>;<snmp3_auth_pass>;<module_port>;<snmp3_privacy_method>;<snmp3_privacy_pass>;<snmp3_auth_method>;<snmp3_security_level>;<snmp_component_group>;<max_retries> in this
* order and separator char (after text ; ) and separator (pass in param
* othermode as othermode=url_encode_separator_<separator>)
* example:
@ -1891,7 +1896,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2) {
'max' => $other['data'][3],
'min' => $other['data'][4],
'id_module_group' => $other['data'][5],
'max_timeout' => $other['data'][6],
'max_timeout' => $other['data'][6],
'history_data' => $other['data'][7],
'min_warning' => $other['data'][8],
'max_warning' => $other['data'][9],
@ -1912,6 +1917,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2) {
'custom_string_2' => $other['data'][23], // snmp3_privacy_pass
'plugin_parameter' => $other['data'][24], // snmp3_auth_method
'custom_string_3' => $other['data'][25], // snmp3_security_level
'max_retries' => $other['data'][26],
);
}
else {
@ -1938,6 +1944,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2) {
'plugin_pass' => '',
'tcp_port' => $other['data'][21],
'id_modulo' => 2
'max_retries' => $other['data'][22],
);
}

View File

@ -209,6 +209,7 @@ function netflow_stat_table ($data, $start_date, $end_date, $aggregate, $unit){
$end_date = date ($nfdump_date_format, $end_date);
$values = array();
$table->width = '50%';
$table->border = 1;
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->class = 'databox';
@ -276,6 +277,7 @@ function netflow_data_table ($data, $start_date, $end_date, $aggregate) {
$values = array();
$table->size = array ('50%');
$table->class = 'databox';
$table->border = 1;
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->data = array();
@ -1040,20 +1042,49 @@ function netflow_draw_item ($start_date, $end_date, $interval_length, $type, $fi
$data = netflow_get_data ($start_date, $end_date, $interval_length, $filter, $unique_id, $aggregate, $max_aggregates, $unit, $connection_name);
if ($aggregate != 'none') {
if ($output == 'HTML') {
return graph_netflow_aggregate_area ($data, $interval, 660, 320, $unit);
$html = "<b>" . __('Unit') . ":</b> $unit";
$html .= "&nbsp;<b>" . __('Aggregate') . ":</b> $aggregate";
if ($interval_length != 0) {
$html .= "&nbsp;<b>" . _('Resolution') . ":</b> $interval_length " . __('seconds');
}
$html .= graph_netflow_aggregate_area ($data, $interval, 660, 320, $unit);
return $html;
} else if ($output == 'PDF') {
return graph_netflow_aggregate_area ($data, $interval, 660, 320, $unit, 2, true);
$html = "<b>" . __('Unit') . ":</b> $unit";
$html .= "&nbsp;<b>" . __('Aggregate') . ":</b> $aggregate";
if ($interval_length != 0) {
$html .= "&nbsp;<b>" . _('Resolution') . ":</b> $interval_length " . __('seconds');
}
$html .= graph_netflow_aggregate_area ($data, $interval, 660, 320, $unit, 2, true);
return $html;
} else if ($output == 'XML') {
return netflow_aggregate_area_xml ($data);
$xml = "<unit>$unit</unit>\n";
$xml .= "<aggregate>$aggregate</aggregate>\n";
$xml .= "<resolution>$interval_length</resolution>\n";
$xml .= netflow_aggregate_area_xml ($data);
return $xml;
}
}
else {
if ($output == 'HTML') {
return graph_netflow_total_area ($data, $interval, 660, 320, $unit);
$html = "<b>" . __('Unit') . ":</b> $unit";
if ($interval_length != 0) {
$html .= "&nbsp;<b>" . _('Resolution') . ":</b> $interval_length " . __('seconds');
}
$html .= graph_netflow_total_area ($data, $interval, 660, 320, $unit);
return $html;
} else if ($output == 'PDF') {
return graph_netflow_total_area ($data, $interval, 660, 320, $unit, 2, true);
$html = "<b>" . __('Unit') . ":</b> $unit";
if ($interval_length != 0) {
$html .= "&nbsp;<b>" . _('Resolution') . ":</b> $interval_length " . __('seconds');
}
$html .= graph_netflow_total_area ($data, $interval, 660, 320, $unit, 2, true);
return $html;
} else if ($output == 'XML') {
return netflow_total_area_xml ($data);
$xml = "<unit>$unit</unit>\n";
$xml .= "<resolution>$interval_length</resolution>\n";
$xml .= netflow_total_area_xml ($data);
return $xml;
}
}
break;
@ -1061,21 +1092,40 @@ function netflow_draw_item ($start_date, $end_date, $interval_length, $type, $fi
case 'netflow_pie':
$data = netflow_get_stats ($start_date, $end_date, $filter, $aggregate, $max_aggregates, $unit, $connection_name);
if ($output == 'HTML') {
return graph_netflow_aggregate_pie ($data, $aggregate);
$html = "<b>" . __('Unit') . ":</b> $unit";
$html .= "&nbsp;<b>" . __('Aggregate') . ":</b> $aggregate";
$html .= graph_netflow_aggregate_pie ($data, $aggregate);
return $html;
} else if ($output == 'PDF') {
return graph_netflow_aggregate_pie ($data, $aggregate, 2, true);
$html = "<b>" . __('Unit') . ":</b> $unit";
$html .= "&nbsp;<b>" . __('Aggregate') . ":</b> $aggregate";
$html .= graph_netflow_aggregate_pie ($data, $aggregate, 2, true);
return $html;
} else if ($output == 'XML') {
return netflow_aggregate_pie_xml ($data);
$xml = "<unit>$unit</unit>\n";
$xml .= "<aggregate>$aggregate</aggregate>\n";
$xml .= netflow_aggregate_pie_xml ($data);
return $xml;
}
break;
case '2':
case 'netflow_data':
$data = netflow_get_data ($start_date, $end_date, $interval_length, $filter, $unique_id, $aggregate, $max_aggregates, $unit, $connection_name);
if ($output == 'HTML' || $output == 'PDF') {
return netflow_data_table ($data, $start_date, $end_date, $aggregate);
$html = "<b>" . __('Unit') . ":</b> $unit";
$html .= "&nbsp;<b>" . __('Aggregate') . ":</b> $aggregate";
if ($interval_length != 0) {
$html .= "&nbsp;<b>" . _('Resolution') . ":</b> $interval_length " . __('seconds');
}
$html .= netflow_data_table ($data, $start_date, $end_date, $aggregate);
return $html;
} else if ($output == 'XML') {
$xml = "<unit>$unit</unit>\n";
$xml .= "<aggregate>$aggregate</aggregate>\n";
$xml .= "<resolution>$interval_length</resolution>\n";
// Same as netflow_aggregate_area_xml
return netflow_aggregate_area_xml ($data);
$xml .= netflow_aggregate_area_xml ($data);
return $xml;
}
break;
case '3':

View File

@ -332,6 +332,7 @@ function network_components_create_module_from_network_component ($id_network_co
'plugin_pass',
'plugin_parameter',
'max_timeout',
'max_retries',
'history_data',
'min_warning',
'max_warning',
@ -399,6 +400,7 @@ function network_components_duplicate_network_component ($id_local_component) {
$networkCopy['plugin_pass'] = $network['plugin_pass'];
$networkCopy['plugin_parameter'] = $network['plugin_parameter'];
$networkCopy['max_timeout'] = $network['max_timeout'];
$networkCopy['max_retries'] = $network['max_retries'];
$networkCopy['history_data'] = $network['history_data'];
$networkCopy['min_warning'] = $network['min_warning'];
$networkCopy['max_warning'] = $network['max_warning'];

View File

@ -4790,13 +4790,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$unique_id = $report_id . '_' . $content_id . '_' . ($end_date - $start_date);
$table->colspan[0][0] = 4;
if ($filter['aggregate'] != 'none') {
$table->data[0][0] = '<h4>' . $description . ' (' . __($filter['aggregate']) . '/' . __($filter['output']) . ')</h4>';
}
else {
$table->data[0][0] = '<h4>' . $description . ' (' . __($filter['output']) . ')</h4>';
}
$table->data[0][0] = '<h4>' . $description . '</h4>';
$table->colspan[1][0] = 4;
$table->data[1][0] = netflow_draw_item ($start_date, $end_date, $resolution, $type, $filter, $max_aggregates, $unique_id, $server_name, 'HTML');
break;

View File

@ -236,6 +236,7 @@ function configure_modules_form () {
$("#oid, img#edit_oid").hide ();
$("#id_module_group option[value="+data["id_module_group"]+"]").select (1);
$("#max_timeout").attr ("value", data["max_timeout"]);
$("#max_retries").attr ("value", data["max_retries"]);
$("#id_plugin option[value="+data["id_plugin"]+"]").select (1);
$("#id_plugin").trigger('change');
$("#text-plugin_user").attr ("value", js_html_entity_decode (data["plugin_user"]));

View File

@ -336,12 +336,9 @@ $menu_operation["workspace"]["sub"] = $sub;
if (check_acl ($config['id_user'], 0, "IR")) {
if ($config['activate_netflow']) {
$menu_operation["netf"]["text"] = __('Netflow');
$menu_operation["netf"]["sec2"] = "operation/netflow/nf_reporting";
$menu_operation["netf"]["text"] = __('Netflow Live View');
$menu_operation["netf"]["sec2"] = "operation/netflow/nf_live_view";
$menu_operation["netf"]["id"] = "oper-netflow";
$sub = array ();
$sub["operation/netflow/nf_live_view"]["text"] = __('Live view');
$menu_operation["netf"]["sub"] = $sub;
}
}
// Rest of options, all with AR privilege (or should events be with incidents?)
@ -400,4 +397,4 @@ $operation_menu_array = $menu_operation;
if(!$config['pure']) {
menu_print_menu ($menu_operation, true);
}
?>
?>

View File

@ -1,148 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
include_once($config['homedir'] . "/include/functions_ui.php");
include_once($config['homedir'] . "/include/functions_db.php");
include_once($config['homedir'] . "/include/functions_netflow.php");
include_once($config['homedir'] . "/include/functions_html.php");
check_login ();
if (! check_acl ($config["id_user"], 0, "AR")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
$write_permissions = check_acl ($config["id_user"], 0, "AW");
//Header
if (! defined ('METACONSOLE')) {
ui_print_page_header (__('Netflow Reporting'), "images/networkmap/so_cisco_new.png", false, "", false);
} else {
$nav_bar = array(array('link' => 'index.php?sec=main', 'text' => __('Main')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_reporting', 'text' => __('Netflow reports')));
ui_meta_print_page_header($nav_bar);
}
$delete_report = get_parameter ('delete_report', false);
$report_id = (int) get_parameter ('report_id', 0);
if ($delete_report && $report_id != 0 && $write_permissions) {
$result = db_process_sql_delete ('tnetflow_report',
array ('id_report' => $report_id));
if ($result !== false) $result = true;
else $result = false;
ui_print_result_message ($result,
__('Successfully deleted'),
__('Not deleted. Error deleting data'));
}
/*
$filter = array ();
$filter['offset'] = (int) get_parameter ('offset');
$filter['limit'] = (int) $config['block_size'];
*/
// Get group list that user has access
$groups_user = users_get_groups ($config['id_user'], "AR", true, true);
$groups_id = array();
foreach($groups_user as $key => $groups){
$groups_id[] = $groups['id_grupo'];
}
//$sql = "SELECT * FROM tnetflow_report WHERE 'group' IN (\"".implode('","',$groups_id)."\")";
$sql = "SELECT * FROM tnetflow_report WHERE id_group IN (".implode(',',$groups_id).")";
$reports = db_get_all_rows_sql($sql);
if ($reports == false){
$reports = array();
}
$table->width = '98%';
$table->head = array ();
$table->head[0] = __('Report name');
$table->head[1]= __('Description');
$table->head[2] = __('Group');
if (defined ('METACONSOLE') && $write_permissions) {
$table->head[3] = '<span title="Operations">' . __('Op.') . '</span>';
}
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->align = array ();
$table->align[2] = 'center';
$table->size = array ();
$table->size[0] = '30%';
$table->size[2] = '10px';
if (defined ('METACONSOLE') && $write_permissions) {
$table->size[3] = '85px';
}
$table->data = array ();
$total_reports = db_get_all_rows_filter ('tnetflow_report', false, 'COUNT(*) AS total');
$total_reports = $total_reports[0]['total'];
//ui_pagination ($total_reports, $url);
foreach ($reports as $report) {
$data = array ();
$data[0] = '<a href="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_view&id='.$report['id_report'].'">'.$report['id_name'].'</a>';
$data[1] = $report['description'];
if (! defined ('METACONSOLE')) {
$data[2] = ui_print_group_icon($report['id_group'], true);
} else {
// No link to the group page in the metaconsole
$data[2] = ui_print_group_icon($report['id_group'], true, 'groups_small', '', false);
}
if (defined ('METACONSOLE') && $write_permissions) {
$data[3] = '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_report_form&id=' . $report['id_report'] . '" style="display:inline">';
$data[3] .= html_print_input_image ('edit', 'images/config.png', 1, '', true, array ('title' => __('Edit')));
$data[3] .= '</form>';
$data[3] .= '&nbsp;&nbsp;<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_item_list&id=' . $report['id_report'] . '" style="display:inline">';
$data[3] .= html_print_input_image ('edit', 'images/god6.png', 1, '', true, array ('title' => __('Items')));
$data[3] .= '</form>';
$data[3] .= '&nbsp;&nbsp;<form method="post" style="display:inline" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
$data[3] .= html_print_input_hidden ('report_id', $report['id_report'], true);
$data[3] .= html_print_input_hidden ('delete_report', true, true);
$data[3] .= html_print_input_image ('delete', 'images/cross.png', 1, '',
true, array ('title' => __('Delete')));
$data[3] .= '</form>';
}
array_push ($table->data, $data);
}
html_print_table ($table);
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_report_form">';
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button (__('Create report'), 'crt', false, 'class="sub wand"');
echo "</div>";
echo "</form>";
?>

View File

@ -1,191 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
// Login check
if (isset ($_GET["direct"])) {
require_once ("../../include/config.php");
require_once ("../../include/auth/mysql.php");
require_once("../../include/functions_netflow.php");
$nick = get_parameter ("nick");
$pass = get_parameter ("pass");
if (isset ($nick) && isset ($pass)) {
$nick = process_user_login ($nick, $pass);
if ($nick !== false) {
unset ($_GET["sec2"]);
$_GET["sec"] = "general/logon_ok";
db_logon ($nick, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $nick;
$config['id_user'] = $nick;
//Remove everything that might have to do with people's passwords or logins
unset ($_GET['pass'], $pass, $_POST['pass'], $_REQUEST['pass'], $login_good);
}
else {
// User not known
$login_failed = true;
require_once ('general/login_page.php');
db_pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick);
exit;
}
}
} else {
include_once($config['homedir'] . "/include/functions_graph.php");
include_once($config['homedir'] . "/include/functions_ui.php");
include_once($config['homedir'] . "/include/functions_netflow.php");
ui_require_javascript_file ('calendar');
}
check_login ();
if (! check_acl ($config["id_user"], 0, "AR")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");
return;
}
$id = io_safe_input (get_parameter('id'));
if ($id) {
$permission = netflow_check_report_group ($id, true);
if (!$permission) { //no tiene permisos para acceder a un informe
require ("general/noaccess.php");
return;
}
}
$period = get_parameter('period', '86400');
$date = get_parameter ('date', date ("Y/m/d", get_system_time ()));
$time = get_parameter ('time', date ("H:i:s", get_system_time ()));
$end_date = strtotime ($date . " " . $time);
$start_date = $end_date - $period;
// Generate an XML report
if (isset ($_GET["xml"])) {
$interval_length = get_parameter('interval_length', 0);
header ('Content-type: application/xml; charset="utf-8"', true);
netflow_xml_report ($id, $start_date, $end_date, $interval_length);
return;
}
// Generate a PDF report
else if (isset ($_GET["pdf"])) {
$interval_length = get_parameter('interval_length', 0);
enterprise_include_once ('include/functions_netflow_pdf.php');
header ('Content-type: application/pdf', true);
netflow_pdf_report ($id, $start_date, $end_date, $interval_length);
return;
}
//Header
if (! defined ('METACONSOLE')) {
$buttons['report_list'] = '<a href="index.php?sec=netf&sec2=operation/netflow/nf_reporting">'
. html_print_image ("images/edit.png", true, array ("title" => __('Report list')))
. '</a>';
ui_print_page_header (__('Netflow'), "images/networkmap/so_cisco_new.png", false, "", false, $buttons);
} else {
$nav_bar = array(array('link' => 'index.php?sec=main', 'text' => __('Main')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_reporting', 'text' => __('Netflow reports')),
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_view', 'text' => __('View netflow report')));
ui_meta_print_page_header($nav_bar);
}
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/operation/netflow/nf_view&amp;id='.$id.'">';
$table->width = '60%';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = "databox_color";
$table->style[0] = 'vertical-align: top;';
$table->data = array ();
$table->data[0][0] = '<b>'.__('Date').'</b>';
$table->data[0][1] = html_print_input_text ('date', $date, false, 10, 10, true);
$table->data[0][1] .= html_print_image ("images/calendar_view_day.png", true, array ("alt" => "calendar", "onclick" => "scwShow(scwID('text-date'),this);"));
$table->data[0][1] .= html_print_input_text ('time', $time, false, 10, 5, true);
$table->data[1][0] = '<b>'.__('Interval').'</b>';
$table->data[1][1] = html_print_select (netflow_get_valid_intervals (), 'period', $period, '', '', 0, true, false, false);
$table->data[2][0] = '<b>'.__('Export').'</b>';
if (! defined ('METACONSOLE')) {
$table->data[2][1] = '<a title="XML" href="' . $config['homeurl'] . 'ajax.php?page=' . $config['homedir'] . '/operation/netflow/nf_view&id='.$id."&date=$date&time=$time&period=$period&xml=1\">" . html_print_image("images/database_lightning.png", true) . '</a>';
} else {
$table->data[2][1] = '<a title="XML" href="' . $config['homeurl'] . '../../ajax.php?page=' . $config['homedir'] . '/operation/netflow/nf_view&id='.$id."&date=$date&time=$time&period=$period&xml=1\">" . html_print_image("images/database_lightning.png", true) . '</a>';
}
if (defined ('METACONSOLE')) {
$table->data[2][1] .= '&nbsp;&nbsp;<a title="PDF" href="' . $config['homeurl'] . '../../ajax.php?page=' . $config['homedir'] . '/operation/netflow/nf_view&id='.$id."&date=$date&time=$time&period=$period&pdf=1\">" . html_print_image("images/pdf.png", true) . '</a>';
} else if (defined ('PANDORA_ENTERPRISE')) {
$table->data[2][1] .= '&nbsp;&nbsp;<a title="PDF" href="' . $config['homeurl'] . 'ajax.php?page=' . $config['homedir'] . '/operation/netflow/nf_view&id='.$id."&date=$date&time=$time&period=$period&pdf=1\">" . html_print_image("images/pdf.png", true) . '</a>';
}
html_print_table ($table);
echo '<div class="action-buttons" style="width:60%;">';
html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
echo '</div>';
echo'</form>';
$report = db_get_row_sql('SELECT * FROM tnetflow_report WHERE id_report =' . (int)$id);
if (empty ($report)){
echo fs_error_image();
return;
}
$report_name = $report['id_name'];
$connection_name = $report['server_name'];
$report_contents = db_get_all_rows_sql("SELECT * FROM tnetflow_report_content WHERE id_report='$id' ORDER BY `order`");
if (empty ($report_contents)) {
echo fs_error_image();
return;
}
// Process report items
foreach ($report_contents as $content_report) {
// Get report item
$report_id = $content_report['id_report'];
$content_id = $content_report['id_rc'];
$max_aggregates= $content_report['max'];
$type = $content_report['show_graph'];
$description = $content_report['description'];
// Get item filters
$filter = db_get_row_sql("SELECT * FROM tnetflow_filter WHERE id_sg = '" . io_safe_input ($content_report['id_filter']) . "'", false, true);
if ($description == '') {
$description = $filter['id_name'];
}
if ($filter['aggregate'] != 'none') {
echo '<h4>' . $description . ' (' . __($filter['aggregate']) . '/' . __($filter['output']) . ')</h4>';
}
else {
echo '<h4>' . $description . ' (' . __($filter['output']) . ')</h4>';
}
// Build a unique id for the cache
$unique_id = $report_id . '_' . $content_id . '_' . ($end_date - $start_date);
// Draw
echo netflow_draw_item ($start_date, $end_date, 0, $type, $filter, $max_aggregates, $unique_id, $connection_name, 'HTML');
}
?>

View File

@ -208,6 +208,7 @@ CREATE TABLE tagente_modulo (
post_process BINARY_DOUBLE default NULL,
prediction_module NUMBER(19, 0) default 0,
max_timeout NUMBER(10, 0) default 0,
max_retries NUMBER(10, 0) default 0,
custom_id VARCHAR2(255) default '',
history_data NUMBER(5, 0) default 1,
min_warning BINARY_DOUBLE default 0,
@ -692,6 +693,7 @@ CREATE TABLE tnetwork_component (
plugin_pass CLOB default '',
plugin_parameter CLOB,
max_timeout NUMBER(10, 0) default 0,
max_retries NUMBER(10, 0) default 0,
history_data NUMBER(5, 0) default 1,
min_warning BINARY_DOUBLE default 0,
max_warning BINARY_DOUBLE default 0,
@ -1171,6 +1173,7 @@ CREATE TABLE tplugin (
name VARCHAR2(200) NOT NULL,
description CLOB,
max_timeout NUMBER(10, 0) default 0 NOT NULL,
max_retries NUMBER(10, 0) default 0,
execute VARCHAR2(250) NOT NULL,
net_dst_opt VARCHAR2(50) default '',
net_port_opt VARCHAR2(50) default '',

View File

@ -200,6 +200,7 @@ CREATE TABLE "tagente_modulo" (
"post_process" DOUBLE PRECISION default NULL,
"prediction_module" BIGINT default 0,
"max_timeout" INTEGER default 0,
"max_retries" INTEGER default 0,
"custom_id" varchar(255) default '',
"history_data" SMALLINT default 1,
"min_warning" DOUBLE PRECISION default 0,
@ -569,6 +570,7 @@ CREATE TABLE "tnetwork_component" (
"plugin_pass" text default '',
"plugin_parameter" text,
"max_timeout" INTEGER default 0,
"max_retries" INTEGER default 0,
"history_data" SMALLINT default 1,
"min_warning" DOUBLE PRECISION default 0,
"max_warning" DOUBLE PRECISION default 0,
@ -989,6 +991,7 @@ CREATE TABLE "tplugin" (
"name" varchar(200) NOT NULL,
"description" TEXT,
"max_timeout" INTEGER NOT NULL default 0,
"max_retries" INTEGER NOT NULL default 0,
"execute" varchar(250) NOT NULL,
"net_dst_opt" varchar(50) default '',
"net_port_opt" varchar(50) default '',

View File

@ -200,6 +200,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
`post_process` double(18,5) default NULL,
`prediction_module` bigint(14) default '0',
`max_timeout` int(4) unsigned default '0',
`max_retries` int(4) unsigned default '0',
`custom_id` varchar(255) default '',
`history_data` tinyint(1) unsigned default '1',
`min_warning` double(18,2) default 0,
@ -670,7 +671,8 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
`plugin_user` text,
`plugin_pass` text,
`plugin_parameter` text,
`max_timeout` tinyint(3) unsigned default '0',
`max_timeout` int(4) unsigned default '0',
`max_retries` int(4) unsigned default '0',
`history_data` tinyint(1) unsigned default '1',
`min_warning` double(18,2) default 0,
`max_warning` double(18,2) default 0,
@ -1155,6 +1157,7 @@ CREATE TABLE IF NOT EXISTS `tplugin` (
`name` varchar(200) NOT NULL,
`description` mediumtext,
`max_timeout` int(4) UNSIGNED NOT NULL default 0,
`max_retries` int(4) UNSIGNED NOT NULL default 0,
`execute` varchar(250) NOT NULL,
`net_dst_opt` varchar(50) default '',
`net_port_opt` varchar(50) default '',