diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8474e4e5d3..b9e5ebf14d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-06-21 Junichi Satoh + + * include/functions_api.php: Added support for 'each_ff' and + 'ff_timeout' to module creation and modifying APIs. + 2014-06-20 Alejandro Gallardo * extensions/system_info.php: Error fixes. diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index bafaa36769..60be5ed85b 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1240,7 +1240,8 @@ function api_get_policy_modules($thrash1, $thrash2, $other, $thrash3) { * @param array $other it's array, $other as param is ;;; * ;;;;;;;; * ;;;;;;; - * ;;;;; in this order + * ;;;;;; + * ;;;; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1297,7 +1298,11 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3) { 'descripcion' => $other['data'][21], 'id_modulo' => 2, 'disabled_types_event' => $disabled_types_event, - 'module_macros' => $other['data'][23] + 'module_macros' => $other['data'][23], + 'each_ff' => $other['data'][24], + 'min_ff_event_normal' => $other['data'][25], + 'min_ff_event_warning' => $other['data'][26], + 'min_ff_event_critical' => $other['data'][27] ); $idModule = modules_create_agent_module($idAgent, $name, $values, true); @@ -1319,7 +1324,8 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3) { * @param array $other it's array, $other as param is ; * ;;;;;;;; * ;;;;;;; - * ;;;;; in this order + * ;;;;;; + * ;;;; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1379,7 +1385,11 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3){ 'custom_id', 'descripcion', 'disabled_types_event', - 'module_macros'); + 'module_macros', + 'each_ff', + 'min_ff_event_normal', + 'min_ff_event_warning', + 'min_ff_event_critical'); $values = array(); $cont = 0; @@ -1408,7 +1418,8 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3){ * ;;;;;;;; * ;;;;;;; * ;;;;;;;; - * ;; in this order + * ;;;;; + * ; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1467,7 +1478,11 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3) { 'plugin_parameter' => $other['data'][25], 'disabled_types_event' => $disabled_types_event, 'macros' => base64_decode ($other['data'][27]), - 'module_macros' => $other['data'][28] + 'module_macros' => $other['data'][28], + 'each_ff' => $other['data'][29], + 'min_ff_event_normal' => $other['data'][30], + 'min_ff_event_warning' => $other['data'][31], + 'min_ff_event_critical' => $other['data'][32] ); $idModule = modules_create_agent_module($idAgent, $name, $values, true); @@ -1489,7 +1504,8 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3) { * ;;;;;;;; * ;;;;;;; * ;;;;;;;; - * ;; in this order + * ;;;;; + * ; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1553,7 +1569,11 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3){ 'plugin_parameter', 'disabled_types_event', 'macros', - 'module_macros'); + 'module_macros', + 'each_ff', + 'min_ff_event_normal', + 'min_ff_event_warning', + 'min_ff_event_critical'); $values = array(); $cont = 0; @@ -1586,7 +1606,8 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3){ * @param array $other it's array, $other as param is ;;; * ;;;;;;; * ;;;;;; - * ; in this order + * ;;;; + * ;;; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1634,7 +1655,13 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3) { 'history_data' => $other['data'][15], 'id_modulo' => 1, 'disabled_types_event' => $disabled_types_event, - 'module_macros' => $other['data'][17] + 'module_macros' => $other['data'][17], + 'min_ff_event' => $other['data'][18], + 'each_ff' => $other['data'][19], + 'min_ff_event_normal' => $other['data'][20], + 'min_ff_event_warning' => $other['data'][21], + 'min_ff_event_critical' => $other['data'][22], + 'ff_timeout' => $other['data'][23] ); $idModule = modules_create_agent_module($idAgent, $name, $values, true); @@ -1656,7 +1683,9 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3) { * @param array $other it's array, $other as param is ;;; * ;;;;;;;; * ;;;;;;; - * ;;;; in this order + * ;;;;;; + * ;;;; + * in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1709,7 +1738,13 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3){ 'str_critical', 'history_data', 'disabled_types_event', - 'module_macros'); + 'module_macros', + 'min_ff_event', + 'each_ff', + 'min_ff_event_normal', + 'min_ff_event_warning', + 'min_ff_event_critical', + 'ff_timeout'); $values = array(); $cont = 0; @@ -1739,7 +1774,8 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3){ * ;;;;;;;; * ;;;;;;;; * ;;;;;;;; - * ; in this order + * ;;;;; + * ; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1829,7 +1865,11 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3) { 'plugin_parameter' => $other['data'][26], 'plugin_user' => $other['data'][27], 'plugin_pass' => $other['data'][28], - 'disabled_types_event' => $disabled_types_event + 'disabled_types_event' => $disabled_types_event, + 'each_ff' => $other['data'][30], + 'min_ff_event_normal' => $other['data'][31], + 'min_ff_event_warning' => $other['data'][32], + 'min_ff_event_critical' => $other['data'][33] ); } else { @@ -1858,7 +1898,11 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3) { 'custom_id' => $other['data'][21], 'descripcion' => $other['data'][22], 'id_modulo' => 2, - 'disabled_types_event' => $disabled_types_event + 'disabled_types_event' => $disabled_types_event, + 'each_ff' => $other['data'][24], + 'min_ff_event_normal' => $other['data'][25], + 'min_ff_event_warning' => $other['data'][26], + 'min_ff_event_critical' => $other['data'][27] ); } @@ -1882,7 +1926,8 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3) { * ;;;;;;;; * ;;;;;;;; * ;;;;;;;; - * ; in this order + * ;;;; + * ; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -1966,7 +2011,11 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3) { 'plugin_parameter', 'plugin_user', 'plugin_pass', - 'disabled_types_event'); + 'disabled_types_event', + 'each_ff', + 'min_ff_event_normal', + 'min_ff_event_warning', + 'min_ff_event_critical'); } else { $snmp_module_fields = array('id_agente', @@ -1991,7 +2040,11 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3) { 'max', 'custom_id', 'descripcion', - 'disabled_types_event'); + 'disabled_types_event', + 'each_ff', + 'min_ff_event_normal', + 'min_ff_event_warning', + 'min_ff_event_critical'); } $values = array();