From ace3603b1362a1e44c007dc7e4dd376635800e31 Mon Sep 17 00:00:00 2001 From: "edu.corral" Date: Tue, 20 Sep 2022 14:31:48 +0200 Subject: [PATCH] ent 9396 agent_update_custom_fields help --- pandora_server/util/pandora_manage.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f722c49e40..9a00d46328 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -142,7 +142,7 @@ sub help_screen{ help_screen_line('--get_cluster_status', '', 'Getting cluster status'); help_screen_line('--set_disabled_and_standby', ' ', 'Overwrite and disable and standby status'); help_screen_line('--reset_agent_counts', '', 'Resets module counts and alert counts in the agents'); - help_screen_line('--update_agent_custom_fields', ' ', "Update an agent custom field. The fields can be \n\t the following: Serial number, Department ... and types can be 0 text and 1 combo "); + help_screen_line('--agent_update_custom_fields', ' ', "Update an agent custom field. The fields can be \n\t the following: Serial number, Department ... and types can be 0 text and 1 combo "); print "\nMODULES:\n\n" unless $param ne ''; help_screen_line('--create_data_module', " [ \n\t \n\t \n\t \n\t \n\t ]", 'Add data server module to agent'); @@ -3135,7 +3135,7 @@ sub cli_user_update() { ############################################################################## # Update an agent customs field. -# Related option: --update_agent_custom_fields +# Related option: --agent_update_custom_fields ############################################################################## sub cli_agent_update_custom_fields() { @@ -3149,6 +3149,7 @@ sub cli_agent_update_custom_fields() { if($agent_name eq '') { print_log "[ERROR] Agent '$id_agent' doesn't exist\n\n"; + print "--agent_update_custom_fields, , Updates an agent custom field. The fields can be \n\t the following: Serial number, Department ... and types can be 0 text and 1 combo )\n\n"; exit; } @@ -3158,6 +3159,7 @@ sub cli_agent_update_custom_fields() { if($custom_field eq '') { print_log "[ERROR] Field '$field' doesn't exist\n\n"; + print "--agent_update_custom_fields, , Updates an agent custom field. The fields can be \n\t the following: Serial number, Department ... and types can be 0 text and 1 combo )\n\n"; exit; } @@ -3178,7 +3180,7 @@ sub cli_agent_update_custom_fields() { print_log "\n[INFO] Updating field '$field' in agent with ID '$id_agent'\n\n"; - my $result = pandora_update_agent_custom_field ($dbh, $new_value, $custom_field, $id_agent); + my $result = pandora_agent_update_custom_field ($dbh, $new_value, $custom_field, $id_agent); if($result == "0E0"){ print_log "[ERROR] Error updating field '$field'\n\n";