From 34d4abede6e78954b0280e88b56e6b554fccc9e4 Mon Sep 17 00:00:00 2001 From: jsatoh Date: Tue, 24 Jun 2014 02:35:46 +0000 Subject: [PATCH] 2014-06-24 Junichi Satoh * include/functions_api.php: Added support for 'each_ff' and 'ff_timeout' to 'set add_*_module_policy'. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10268 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++ pandora_console/include/functions_api.php | 38 +++++++++++++++++++---- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 44591b770f..a2a0ac182a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-06-24 Junichi Satoh + + * include/functions_api.php: Added support for 'each_ff' and + 'ff_timeout' to 'set add_*_module_policy'. + 2014-06-24 Junichi Satoh * include/functions_api.php: Added support for ff_threshold to diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index cfe2e9779d..eec7b57ab6 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -3239,7 +3239,8 @@ function api_set_add_agent_policy($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: * @@ -3290,6 +3291,12 @@ function api_set_add_data_module_policy($id, $thrash1, $other, $thrash3) { $values['configuration_data'] = $other['data'][15]; $values['disabled_types_event'] = $disabled_types_event; $values['module_macros'] = $other['data'][17]; + $values['min_ff_event'] = $other['data'][18]; + $values['each_ff'] = $other['data'][19]; + $values['min_ff_event_normal'] = $other['data'][20]; + $values['min_ff_event_warning'] = $other['data'][21]; + $values['min_ff_event_critical'] = $other['data'][22]; + $values['ff_timeout'] = $other['data'][23]; if ($name_module_policy !== false) { if ($name_module_policy[0]['name'] == $other['data'][0]) { @@ -3383,7 +3390,8 @@ function api_set_update_data_module_policy($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: * @@ -3449,6 +3457,10 @@ function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3) { $values['custom_id'] = $other['data'][20]; $values['disabled_types_event'] = $disabled_types_event; $values['module_macros'] = $other['data'][22]; + $values['each_ff'] = $other['data'][23]; + $values['min_ff_event_normal'] = $other['data'][24]; + $values['min_ff_event_warning'] = $other['data'][25]; + $values['min_ff_event_critical'] = $other['data'][26]; if ($name_module_policy !== false) { if ($name_module_policy[0]['name'] == $other['data'][0]) { @@ -3545,7 +3557,8 @@ function api_set_update_network_module_policy($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: * @@ -3609,6 +3622,10 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3) { $values['disabled_types_event'] = $disabled_types_event; $values['macros'] = base64_decode ($other['data'][26]); $values['module_macros'] = $other['data'][27]; + $values['each_ff'] = $other['data'][28]; + $values['min_ff_event_normal'] = $other['data'][29]; + $values['min_ff_event_warning'] = $other['data'][30]; + $values['min_ff_event_critical'] = $other['data'][31]; if ($name_module_policy !== false) { if ($name_module_policy[0]['name'] == $other['data'][0]) { @@ -3843,7 +3860,8 @@ function api_set_update_module_in_conf($id_agent, $module_name, $configuration_d * ;;;;;;;; * ;;;;;;; * ;;;;;;;; - * ; in this order + * ;;;;;; + * ; in this order * and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -3925,7 +3943,11 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) { 'plugin_parameter' => $other['data'][25], 'plugin_user' => $other['data'][26], 'plugin_pass' => $other['data'][27], - 'disabled_types_event' => $disabled_types_event + 'disabled_types_event' => $disabled_types_event, + '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] ); } else { @@ -3951,7 +3973,11 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) { 'max' => $other['data'][19], 'custom_id' => $other['data'][20], 'description' => $other['data'][21], - 'disabled_types_event' => $disabled_types_event + 'disabled_types_event' => $disabled_types_event, + 'each_ff' => $other['data'][23], + 'min_ff_event_normal' => $other['data'][24], + 'min_ff_event_warning' => $other['data'][25], + 'min_ff_event_critical' => $other['data'][26] ); }