From de2075c553b521b788a27d75b9e3c8ad8727e9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Wed, 17 Apr 2024 08:27:01 -0600 Subject: [PATCH 1/2] Update plugin parameter --- .../include/functions_welcome_wizard.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/functions_welcome_wizard.php b/pandora_console/include/functions_welcome_wizard.php index 249fa53e20..e05786e5c7 100644 --- a/pandora_console/include/functions_welcome_wizard.php +++ b/pandora_console/include/functions_welcome_wizard.php @@ -65,11 +65,7 @@ function create_module_latency_goliat($id_agent, $module_name, $id_group, $url_s 'id_export' => '0', 'plugin_user' => '', 'plugin_pass' => '0', - 'plugin_parameter' => 'task_begin -get '.$url_search.' -resource 1 -'.$str_search.' -task_end', + 'plugin_parameter' => io_safe_input("task_begin\nget $url_search\nresource 1\ncheck_string $url_search\ntask_end\n"), 'id_plugin' => '0', 'post_process' => '0', 'prediction_module' => '0', @@ -157,13 +153,9 @@ function create_module_status_goliat($id_agent, $module_name, $id_group, $url_se 'tcp_rcv' => '', 'tcp_send' => '', 'id_export' => '0', - 'plugin_user' => '', - 'plugin_pass' => '0', - 'plugin_parameter' => 'task_begin -get '.$url_search.' -resource 1 -'.$str_search.' -task_end', + 'plugin_user' => io_safe_input('Pandora FMS / Webcheck'), + 'plugin_pass' => '1', + 'plugin_parameter' => io_safe_input("task_begin\nget $url_search\nresource 1\ncheck_string $url_search\ntask_end\n"), 'id_plugin' => '0', 'post_process' => '0', 'prediction_module' => '0', From 77aa6b5bd27774d83b1c28138b140e37ad5634e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Thu, 18 Apr 2024 12:37:37 -0600 Subject: [PATCH 2/2] FIx str_search --- pandora_console/include/functions_welcome_wizard.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_welcome_wizard.php b/pandora_console/include/functions_welcome_wizard.php index e05786e5c7..8967789999 100644 --- a/pandora_console/include/functions_welcome_wizard.php +++ b/pandora_console/include/functions_welcome_wizard.php @@ -43,7 +43,7 @@ function create_module_latency_goliat($id_agent, $module_name, $id_group, $url_search, $string_search='') { if ($string_search !== '') { - $str_search = 'check_string '.$string_search.''; + $str_search = "check_string $string_search"; } include_once 'include/functions_modules.php'; @@ -65,7 +65,7 @@ function create_module_latency_goliat($id_agent, $module_name, $id_group, $url_s 'id_export' => '0', 'plugin_user' => '', 'plugin_pass' => '0', - 'plugin_parameter' => io_safe_input("task_begin\nget $url_search\nresource 1\ncheck_string $url_search\ntask_end\n"), + 'plugin_parameter' => io_safe_input("task_begin\nget $url_search\nresource 1\n$str_search\ntask_end\n"), 'id_plugin' => '0', 'post_process' => '0', 'prediction_module' => '0', @@ -133,7 +133,7 @@ function create_module_latency_goliat($id_agent, $module_name, $id_group, $url_s function create_module_status_goliat($id_agent, $module_name, $id_group, $url_search, $string_search='') { if ($string_search !== '') { - $str_search = 'check_string '.$string_search.' '; + $str_search = "check_string $string_search"; } include_once 'include/functions_modules.php'; @@ -155,7 +155,7 @@ function create_module_status_goliat($id_agent, $module_name, $id_group, $url_se 'id_export' => '0', 'plugin_user' => io_safe_input('Pandora FMS / Webcheck'), 'plugin_pass' => '1', - 'plugin_parameter' => io_safe_input("task_begin\nget $url_search\nresource 1\ncheck_string $url_search\ntask_end\n"), + 'plugin_parameter' => io_safe_input("task_begin\nget $url_search\nresource 1\n$str_search\ntask_end\n"), 'id_plugin' => '0', 'post_process' => '0', 'prediction_module' => '0',