#12631 added field ignore_unknown in api modules and cli

This commit is contained in:
Daniel Cebrian 2023-12-14 18:11:34 +01:00
parent 12f2bce2f2
commit d84faad8cf
6 changed files with 73 additions and 43 deletions

View File

@ -1075,7 +1075,7 @@ if (enterprise_installed() === true) {
} }
$tableAdvancedAgent->data['ignore_unknown'][] = html_print_label_input_block( $tableAdvancedAgent->data['ignore_unknown'][] = html_print_label_input_block(
__('Ignore unknown').ui_print_help_tip(__('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known state.'), true), __('Ignore unknown').ui_print_help_tip(__('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
html_print_checkbox_switch( html_print_checkbox_switch(
'ignore_unknown', 'ignore_unknown',
1, 1,

View File

@ -645,7 +645,7 @@ if ($disabledBecauseInPolicy) {
); );
} }
$table_simple->data['caption_ignore_unknown'][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known state.'), true); $table_simple->data['caption_ignore_unknown'][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true);
$table_simple->data['ignore_unknown'][0] = html_print_checkbox_switch( $table_simple->data['ignore_unknown'][0] = html_print_checkbox_switch(
'ignore_unknown', 'ignore_unknown',
1, 1,

View File

@ -1187,7 +1187,7 @@ $table->data[7][1] .= html_print_select(
true true
); );
$table->data[8][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known state.'), true); $table->data[8][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true);
$table->data[8][1] = html_print_select( $table->data[8][1] = html_print_select(
[ [
'' => __('No change'), '' => __('No change'),

View File

@ -1545,7 +1545,7 @@ $table->data[40][0] = html_print_label_input_block(
); );
$table->data[40][1] = html_print_label_input_block( $table->data[40][1] = html_print_label_input_block(
__('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known state.'), true), __('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true),
html_print_select( html_print_select(
[ [
'' => __('No change'), '' => __('No change'),

View File

@ -3676,6 +3676,7 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3)
'critical_inverse' => $other['data'][28], 'critical_inverse' => $other['data'][28],
'warning_inverse' => $other['data'][29], 'warning_inverse' => $other['data'][29],
'ff_type' => $other['data'][30], 'ff_type' => $other['data'][30],
'ignore_unknown' => $other['data'][32],
]; ];
if (! $values['descripcion']) { if (! $values['descripcion']) {
@ -3840,6 +3841,7 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3)
'warning_inverse', 'warning_inverse',
'policy_linked', 'policy_linked',
'ff_type', 'ff_type',
'ignore_unknown',
]; ];
$values = []; $values = [];
@ -3853,7 +3855,6 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3)
} }
$values['policy_linked'] = 0; $values['policy_linked'] = 0;
$result_update = modules_update_agent_module($id_module, $values); $result_update = modules_update_agent_module($id_module, $values);
if ($result_update < 0) { if ($result_update < 0) {
@ -3954,6 +3955,7 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3)
'critical_inverse' => $other['data'][33], 'critical_inverse' => $other['data'][33],
'warning_inverse' => $other['data'][34], 'warning_inverse' => $other['data'][34],
'ff_type' => $other['data'][35], 'ff_type' => $other['data'][35],
'ignore_unknown' => $other['data'][37],
]; ];
$plugin = db_get_row('tplugin', 'id', $values['id_plugin']); $plugin = db_get_row('tplugin', 'id', $values['id_plugin']);
@ -4115,6 +4117,7 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3)
'warning_inverse', 'warning_inverse',
'policy_linked', 'policy_linked',
'ff_type', 'ff_type',
'ignore_unknown',
]; ];
$values = []; $values = [];
@ -4905,6 +4908,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
'min_ff_event_warning' => $other['data'][32], 'min_ff_event_warning' => $other['data'][32],
'min_ff_event_critical' => $other['data'][33], 'min_ff_event_critical' => $other['data'][33],
'ff_type' => $other['data'][34], 'ff_type' => $other['data'][34],
'ignore_unknown' => $other['data'][36],
]; ];
} else { } else {
$values = [ $values = [
@ -4937,6 +4941,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
'min_ff_event_warning' => $other['data'][26], 'min_ff_event_warning' => $other['data'][26],
'min_ff_event_critical' => $other['data'][27], 'min_ff_event_critical' => $other['data'][27],
'ff_type' => $other['data'][28], 'ff_type' => $other['data'][28],
'ignore_unknown' => $other['data'][29],
]; ];
} }
@ -5105,6 +5110,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
'min_ff_event_critical', 'min_ff_event_critical',
'policy_linked', 'policy_linked',
'ff_type', 'ff_type',
'ignore_unknown',
]; ];
} else { } else {
$snmp_module_fields = [ $snmp_module_fields = [
@ -5137,6 +5143,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
'min_ff_event_critical', 'min_ff_event_critical',
'policy_linked', 'policy_linked',
'ff_type', 'ff_type',
'ignore_unknown',
]; ];
} }
@ -8123,6 +8130,7 @@ function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3)
$values['min_ff_event_warning'] = $other['data'][25]; $values['min_ff_event_warning'] = $other['data'][25];
$values['min_ff_event_critical'] = $other['data'][26]; $values['min_ff_event_critical'] = $other['data'][26];
$values['ff_type'] = $other['data'][27]; $values['ff_type'] = $other['data'][27];
$values['ignore_unknown'] = $other['data'][28];
if ($name_module_policy !== false) { if ($name_module_policy !== false) {
if ($name_module_policy[0]['name'] == $other['data'][0]) { if ($name_module_policy[0]['name'] == $other['data'][0]) {
@ -8225,6 +8233,7 @@ function api_set_update_network_module_policy($id, $thrash1, $other, $thrash3)
'custom_id', 'custom_id',
'disabled_types_event', 'disabled_types_event',
'module_macros', 'module_macros',
'ignore_unknown',
]; ];
$cont = 0; $cont = 0;
@ -8341,6 +8350,7 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3)
$values['min_ff_event_warning'] = $other['data'][30]; $values['min_ff_event_warning'] = $other['data'][30];
$values['min_ff_event_critical'] = $other['data'][31]; $values['min_ff_event_critical'] = $other['data'][31];
$values['ff_type'] = $other['data'][32]; $values['ff_type'] = $other['data'][32];
$values['ignore_unknown'] = $other['data'][33];
if ($name_module_policy !== false) { if ($name_module_policy !== false) {
if ($name_module_policy[0]['name'] == $other['data'][0]) { if ($name_module_policy[0]['name'] == $other['data'][0]) {
@ -8467,6 +8477,7 @@ function api_set_update_plugin_module_policy($id, $thrash1, $other, $thrash3)
'disabled_types_event', 'disabled_types_event',
'macros', 'macros',
'module_macros', 'module_macros',
'ignore_unknown',
]; ];
$cont = 0; $cont = 0;
@ -8785,6 +8796,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
'min_ff_event_warning' => $other['data'][31], 'min_ff_event_warning' => $other['data'][31],
'min_ff_event_critical' => $other['data'][32], 'min_ff_event_critical' => $other['data'][32],
'ff_type' => $other['data'][33], 'ff_type' => $other['data'][33],
'ignore_unknown' => $other['data'][34],
]; ];
} else { } else {
$values = [ $values = [
@ -8815,6 +8827,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
'min_ff_event_warning' => $other['data'][25], 'min_ff_event_warning' => $other['data'][25],
'min_ff_event_critical' => $other['data'][26], 'min_ff_event_critical' => $other['data'][26],
'ff_type' => $other['data'][27], 'ff_type' => $other['data'][27],
'ignore_unknown' => $other['data'][28],
]; ];
} }
@ -8947,6 +8960,7 @@ function api_set_update_snmp_module_policy($id, $thrash1, $other, $thrash3)
'plugin_parameter', 'plugin_parameter',
'plugin_user', 'plugin_user',
'plugin_pass', 'plugin_pass',
'ignore_unknown',
]; ];
} else { } else {
$fields_snmp_module = [ $fields_snmp_module = [
@ -8971,6 +8985,7 @@ function api_set_update_snmp_module_policy($id, $thrash1, $other, $thrash3)
'max', 'max',
'custom_id', 'custom_id',
'description', 'description',
'ignore_unknown',
]; ];
} }

View File

@ -145,12 +145,12 @@ sub help_screen{
help_screen_line('--agent_update_custom_fields', '<id_agent> <type_field> <field_to_change> <new_value>', "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', '<id_agent> <type_field> <field_to_change> <new_value>', "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 ''; print "\nMODULES:\n\n" unless $param ne '';
help_screen_line('--create_data_module', "<module_name> <module_type> <agent_name> [<description> <module_group> \n\t <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> \n\t <history_data> <definition_file> <warning_str> <critical_str>\n\t <unknown_events> <ff_threshold> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <ff_timeout> <warning_inverse> <critical_inverse>\n\t <critical_instructions> <warning_instructions> <unknown_instructions> <use_alias>]", 'Add data server module to agent'); help_screen_line('--create_data_module', "<module_name> <module_type> <agent_name> [<description> <module_group> \n\t <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> \n\t <history_data> <definition_file> <warning_str> <critical_str>\n\t <unknown_events> <ff_threshold> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <ff_timeout> <warning_inverse> <critical_inverse>\n\t <critical_instructions> <warning_instructions> <unknown_instructions> <use_alias> <ignore_unknown>]", 'Add data server module to agent');
help_screen_line('--create_web_module', "<module_name> <module_type> <agent_name> [<description> <module_group> \n\t <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> \n\t <history_data> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <definition_file>\n\t <proxy_url> <proxy_auth_login> <proxy_auth_password> <warning_str> <critical_str>\n\t <unknown_events> <ff_threshold> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <ff_timeout> <warning_inverse> <critical_inverse>\n\t <critical_instructions> <warning_instructions> <unknown_instructions> <use_alias>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web server module to agent'); help_screen_line('--create_web_module', "<module_name> <module_type> <agent_name> [<description> <module_group> \n\t <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> \n\t <history_data> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <definition_file>\n\t <proxy_url> <proxy_auth_login> <proxy_auth_password> <warning_str> <critical_str>\n\t <unknown_events> <ff_threshold> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <ff_timeout> <warning_inverse> <critical_inverse>\n\t <critical_instructions> <warning_instructions> <unknown_instructions> <use_alias> <ignore_unknown>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web server module to agent');
help_screen_line('--create_network_module', "<module_name> <module_type> <agent_name> <module_address> \n\t [<module_port> <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold>\n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <use_alias>]", 'Add not snmp network module to agent'); help_screen_line('--create_network_module', "<module_name> <module_type> <agent_name> <module_address> \n\t [<module_port> <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold>\n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <use_alias> <ignore_unknown>]", 'Add not snmp network module to agent');
help_screen_line('--create_snmp_module', "<module_name> <module_type> <agent_name> <module_address> <module_port>\n\t <version> [<community> <oid> <description> <module_group> <min> <max> <post_process> <interval>\n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> \n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> \n\t <snmp3_auth_user> <snmp3_auth_pass> <ff_threshold> <warning_str> \n\t <critical_str> <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries> <use_alias>] help_screen_line('--create_snmp_module', "<module_name> <module_type> <agent_name> <module_address> <module_port>\n\t <version> [<community> <oid> <description> <module_group> <min> <max> <post_process> <interval>\n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> \n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> \n\t <snmp3_auth_user> <snmp3_auth_pass> <ff_threshold> <warning_str> \n\t <critical_str> <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries> <use_alias> <ignore_unknown>]
\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add snmp network module to agent'); \n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add snmp network module to agent');
help_screen_line('--create_plugin_module', "<module_name> <module_type> <agent_name> <module_address> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> \n\t <critical_max> <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal> <ff_threshold_warning>\n\t <ff_threshold_critical> <timeout> \n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <use_alias>]", 'Add plug-in module to agent'); help_screen_line('--create_plugin_module', "<module_name> <module_type> <agent_name> <module_address> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> \n\t <critical_max> <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal> <ff_threshold_warning>\n\t <ff_threshold_critical> <timeout> \n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <use_alias> <ignore_unknown>]", 'Add plug-in module to agent');
help_screen_line('--get_module_group', '[<module_group_name>]', 'Dysplay all module groups'); help_screen_line('--get_module_group', '[<module_group_name>]', 'Dysplay all module groups');
help_screen_line('--create_module_group', '<module_group_name>'); help_screen_line('--create_module_group', '<module_group_name>');
help_screen_line('--module_group_synch', "<server_name1|server_name2|server_name3...> [<return_type>]", 'Synchronize metaconsole module groups'); help_screen_line('--module_group_synch', "<server_name1|server_name2|server_name3...> [<return_type>]", 'Synchronize metaconsole module groups');
@ -214,12 +214,12 @@ sub help_screen{
help_screen_line('--delete_not_policy_modules', '', 'Delete all modules without policy from configuration file'); help_screen_line('--delete_not_policy_modules', '', 'Delete all modules without policy from configuration file');
help_screen_line('--disable_policy_alerts', '<policy_name>', 'Disable all the alerts of a policy'); help_screen_line('--disable_policy_alerts', '<policy_name>', 'Disable all the alerts of a policy');
help_screen_line('--create_policy', '<policy_name> <group_name> <description>'); help_screen_line('--create_policy', '<policy_name> <group_name> <description>');
help_screen_line('--create_policy_data_module', "<policy_name> <module_name> <module_type> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> \n\t <critical_min> <critical_max> <history_data> <data_configuration> <warning_str> \n\t <critical_str> <unknown_events> <ff_threshold> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <ff_timeout> <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add data server module to policy'); help_screen_line('--create_policy_data_module', "<policy_name> <module_name> <module_type> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> \n\t <critical_min> <critical_max> <history_data> <data_configuration> <warning_str> \n\t <critical_str> <unknown_events> <ff_threshold> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <ff_timeout> <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", 'Add data server module to policy');
help_screen_line('--create_policy_web_module', "<policy_name> <module_name> <module_type> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> \n\t <critical_min> <critical_max> <history_data> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <data_configuration> <proxy_url> <proxy_auth_login> <proxy_auth_password> <warning_str> \n\t <critical_str> <unknown_events> <ff_threshold> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <ff_timeout> <warning_inverse> <critical_inverse> <critical_instructions> <warning_instructions> <unknown_instructions>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web server module to policy'); help_screen_line('--create_policy_web_module', "<policy_name> <module_name> <module_type> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> \n\t <critical_min> <critical_max> <history_data> <retries> <requests> <agent_browser_id> <auth_server> <auth_realm> <data_configuration> <proxy_url> <proxy_auth_login> <proxy_auth_password> <warning_str> \n\t <critical_str> <unknown_events> <ff_threshold> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <ff_timeout> <warning_inverse> <critical_inverse> <critical_instructions> <warning_instructions> <unknown_instructions> <ignore_unknown>].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web server module to policy');
help_screen_line('--create_policy_network_module', "<policy_name> <module_name> <module_type> [<module_port> \n\t <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold> \n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", "Add not snmp network module to policy"); help_screen_line('--create_policy_network_module', "<policy_name> <module_name> <module_type> [<module_port> \n\t <description> <module_group> <min> <max> <post_process> <interval> \n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> <ff_threshold> \n\t <warning_str> <critical_str> <unknown_events> <each_ff>\n\t <ff_threshold_normal> <ff_threshold_warning> <ff_threshold_critical>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", "Add not snmp network module to policy");
help_screen_line('--create_policy_snmp_module', "<policy_name> <module_name> <module_type> <module_port> \n\t <version> [<community> <oid> <description> <module_group> <min> <max> \n\t <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> <history_data>\n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> <snmp3_auth_user> \n\t <snmp3_priv_pass> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>\n\t help_screen_line('--create_policy_snmp_module', "<policy_name> <module_name> <module_type> <module_port> \n\t <version> [<community> <oid> <description> <module_group> <min> <max> \n\t <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max> <history_data>\n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> <snmp3_auth_user> \n\t <snmp3_priv_pass> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>\n\t
<critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add snmp network module to policy'); <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", 'Add snmp network module to policy');
help_screen_line('--create_policy_plugin_module', "<policy_name> <module_name> <module_type> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> <module_group> <min> \n\t <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max>\n\t <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add plug-in module to policy'); help_screen_line('--create_policy_plugin_module', "<policy_name> <module_name> <module_type> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> <module_group> <min> \n\t <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> <critical_max>\n\t <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical>\n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse> <ignore_unknown>]", 'Add plug-in module to policy');
help_screen_line('--create_policy_data_module_from_local_component', '<policy_name> <component_name>'); help_screen_line('--create_policy_data_module_from_local_component', '<policy_name> <component_name>');
help_screen_line('--add_collection_to_policy', "<policy_name> <collection_name>"); help_screen_line('--add_collection_to_policy', "<policy_name> <collection_name>");
help_screen_line('--validate_policy_alerts', '<policy_name>', 'Validate the alerts of a given policy'); help_screen_line('--validate_policy_alerts', '<policy_name>', 'Validate the alerts of a given policy');
@ -1655,21 +1655,21 @@ sub cli_create_data_module($) {
$min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min, $min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $definition_file, $configuration_data, $warning_str, $critical_str, $enable_unknown_events, $critical_max, $history_data, $definition_file, $configuration_data, $warning_str, $critical_str, $enable_unknown_events,
$ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout, $ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias); $warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $description, $module_group, ($module_name, $module_type, $agent_name, $description, $module_group,
$min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min, $min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $definition_file, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold, $critical_max, $history_data, $definition_file, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias) = @ARGV[2..31]; $warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown) = @ARGV[2..32];
} }
else { else {
($policy_name, $module_name, $module_type, $description, $module_group, ($policy_name, $module_name, $module_type, $description, $module_group,
$min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min, $min,$max,$post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $configuration_data, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold, $critical_max, $history_data, $configuration_data, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..31]; $warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $ignore_unknown) = @ARGV[2..32];
} }
my $module_name_def; my $module_name_def;
@ -1886,6 +1886,7 @@ sub cli_create_data_module($) {
$parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions); $parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions);
$parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions); $parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions);
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
if (defined $use_alias and $use_alias eq 'use_alias') { if (defined $use_alias and $use_alias eq 'use_alias') {
@ -1894,6 +1895,9 @@ sub cli_create_data_module($) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh); pandora_create_module_from_hash ($conf, \%parameters, $dbh);
} }
} else { } else {
if ($parameters{'id_agente'} eq '') {
$parameters{'id_agente'} = $agent_id;
}
pandora_create_module_from_hash ($conf, \%parameters, $dbh); pandora_create_module_from_hash ($conf, \%parameters, $dbh);
} }
} }
@ -1914,7 +1918,7 @@ sub cli_create_web_module($) {
$critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm, $critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm,
$definition_file, $proxy_url, $proxy_auth_login, $proxy_auth_password, $configuration_data, $warning_str, $critical_str, $enable_unknown_events, $definition_file, $proxy_url, $proxy_auth_login, $proxy_auth_password, $configuration_data, $warning_str, $critical_str, $enable_unknown_events,
$ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout, $ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias); $warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $description, $module_group, ($module_name, $module_type, $agent_name, $description, $module_group,
@ -1922,7 +1926,7 @@ sub cli_create_web_module($) {
$critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm, $critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm,
$definition_file, $proxy_url, $proxy_auth_login, $proxy_auth_password, $warning_str, $critical_str, $definition_file, $proxy_url, $proxy_auth_login, $proxy_auth_password, $warning_str, $critical_str,
$enable_unknown_events, $ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout, $enable_unknown_events, $ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias) = @ARGV[2..39]; $warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $use_alias, $ignore_unknown) = @ARGV[2..40];
} }
else { else {
($policy_name, $module_name, $module_type, $description, $module_group, ($policy_name, $module_name, $module_type, $description, $module_group,
@ -1930,7 +1934,7 @@ sub cli_create_web_module($) {
$critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm, $configuration_data, $proxy_url, $critical_max, $history_data, $retries, $requests, $agent_browser_id, $auth_server, $auth_realm, $configuration_data, $proxy_url,
$proxy_auth_login, $proxy_auth_password, $warning_str, $critical_str, $proxy_auth_login, $proxy_auth_password, $warning_str, $critical_str,
$enable_unknown_events, $ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout, $enable_unknown_events, $ff_threshold, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $ff_timeout,
$warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions) = @ARGV[2..38]; $warning_inverse, $critical_inverse, $critical_instructions, $warning_instructions, $unknown_instructions, $ignore_unknown) = @ARGV[2..39];
} }
my $module_name_def; my $module_name_def;
@ -2158,6 +2162,7 @@ sub cli_create_web_module($) {
$parameters{'tcp_rcv'} = $proxy_auth_password unless !defined ($proxy_auth_password); $parameters{'tcp_rcv'} = $proxy_auth_password unless !defined ($proxy_auth_password);
$parameters{'ip_target'} = $auth_server unless !defined ($auth_server); $parameters{'ip_target'} = $auth_server unless !defined ($auth_server);
$parameters{'snmp_community'} = $auth_realm unless !defined ($auth_realm); $parameters{'snmp_community'} = $auth_realm unless !defined ($auth_realm);
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
@ -2168,6 +2173,9 @@ sub cli_create_web_module($) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh); pandora_create_module_from_hash ($conf, \%parameters, $dbh);
} }
} else { } else {
if ($parameters{'id_agente'} eq '') {
$parameters{'id_agente'} = $agent_id;
}
pandora_create_module_from_hash ($conf, \%parameters, $dbh); pandora_create_module_from_hash ($conf, \%parameters, $dbh);
} }
} }
@ -2357,7 +2365,7 @@ sub cli_create_network_module($) {
$module_group, $min, $max, $post_process, $interval, $warning_min, $warning_max, $critical_min, $module_group, $min, $max, $post_process, $interval, $warning_min, $warning_max, $critical_min,
$critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $each_ff, $critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $each_ff,
$ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries, $critical_instructions, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries, $critical_instructions,
$warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias); $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $module_address, $module_port, $description, ($module_name, $module_type, $agent_name, $module_address, $module_port, $description,
@ -2365,7 +2373,7 @@ sub cli_create_network_module($) {
$critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $each_ff, $ff_threshold_normal, $ff_threshold_warning,
$ff_threshold_critical, $timeout, $retries,$critical_instructions, $warning_instructions, $unknown_instructions, $ff_threshold_critical, $timeout, $retries,$critical_instructions, $warning_instructions, $unknown_instructions,
$warning_inverse, $critical_inverse, $use_alias) = @ARGV[2..33]; $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..34];
} }
else { else {
($policy_name, $module_name, $module_type, $module_port, $description, ($policy_name, $module_name, $module_type, $module_port, $description,
@ -2373,7 +2381,7 @@ sub cli_create_network_module($) {
$critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $critical_max, $history_data, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $each_ff, $ff_threshold_normal, $ff_threshold_warning,
$ff_threshold_critical, $timeout, $retries, $critical_instructions, $warning_instructions, $unknown_instructions, $ff_threshold_critical, $timeout, $retries, $critical_instructions, $warning_instructions, $unknown_instructions,
$warning_inverse, $critical_inverse) = @ARGV[2..31]; $warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..34];
} }
my $module_name_def; my $module_name_def;
@ -2509,6 +2517,8 @@ sub cli_create_network_module($) {
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse); $parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse); $parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
if (defined $use_alias and $use_alias eq 'use_alias') { if (defined $use_alias and $use_alias eq 'use_alias') {
@ -2517,6 +2527,9 @@ sub cli_create_network_module($) {
pandora_create_module_from_hash ($conf, \%parameters, $dbh); pandora_create_module_from_hash ($conf, \%parameters, $dbh);
} }
} else { } else {
if ($parameters{'id_agente'} eq '') {
$parameters{'id_agente'} = $agent_id;
}
pandora_create_module_from_hash ($conf, \%parameters, $dbh); pandora_create_module_from_hash ($conf, \%parameters, $dbh);
} }
} }
@ -2537,7 +2550,7 @@ sub cli_create_snmp_module($) {
$warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass, $warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass,
$snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries,
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias); $critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $module_address, $module_port, $version, $community, ($module_name, $module_type, $agent_name, $module_address, $module_port, $version, $community,
@ -2545,7 +2558,7 @@ sub cli_create_snmp_module($) {
$warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass, $warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass,
$snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries,
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias) = @ARGV[2..42]; $critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..43];
} }
else { else {
($policy_name, $module_name, $module_type, $module_port, $version, $community, ($policy_name, $module_name, $module_type, $module_port, $version, $community,
@ -2553,7 +2566,7 @@ sub cli_create_snmp_module($) {
$warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass, $warning_max, $critical_min, $critical_max, $history_data, $snmp3_priv_method, $snmp3_priv_pass,
$snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $snmp3_sec_level, $snmp3_auth_method, $snmp3_auth_user, $snmp3_auth_pass, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $retries,
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse) = @ARGV[2..40]; $critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..41];
} }
my $module_name_def; my $module_name_def;
@ -2694,6 +2707,7 @@ sub cli_create_snmp_module($) {
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse); $parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse); $parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
if (defined $use_alias and $use_alias eq 'use_alias') { if (defined $use_alias and $use_alias eq 'use_alias') {
@ -2722,7 +2736,7 @@ sub cli_create_plugin_module($) {
$interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data, $interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data,
$ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout,
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias); $critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
($module_name, $module_type, $agent_name, $module_address, $module_port, $plugin_name, ($module_name, $module_type, $agent_name, $module_address, $module_port, $plugin_name,
@ -2730,7 +2744,7 @@ sub cli_create_plugin_module($) {
$interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data, $interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data,
$ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout,
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias) = @ARGV[2..36]; $critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..37];
} }
else { else {
($policy_name, $module_name, $module_type, $module_port, $plugin_name, ($policy_name, $module_name, $module_type, $module_port, $plugin_name,
@ -2738,7 +2752,7 @@ sub cli_create_plugin_module($) {
$interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data, $interval, $warning_min, $warning_max, $critical_min, $critical_max, $history_data,
$ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events,
$each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout, $each_ff, $ff_threshold_normal, $ff_threshold_warning, $ff_threshold_critical, $timeout,
$critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse) = @ARGV[2..34]; $critical_instructions, $warning_instructions, $unknown_instructions, $warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..35];
} }
my $module_name_def; my $module_name_def;
@ -2894,6 +2908,7 @@ sub cli_create_plugin_module($) {
$parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions);
$parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse); $parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse);
$parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse); $parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse);
$parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown);
if ($in_policy == 0) { if ($in_policy == 0) {
if (defined $use_alias and $use_alias eq 'use_alias') { if (defined $use_alias and $use_alias eq 'use_alias') {
@ -7799,11 +7814,11 @@ sub pandora_manage_main ($$$) {
cli_delete_agent(); cli_delete_agent();
} }
elsif ($param eq '--create_data_module') { elsif ($param eq '--create_data_module') {
param_check($ltotal, 30, 24); param_check($ltotal, 31, 24);
cli_create_data_module(0); cli_create_data_module(0);
} }
elsif ($param eq '--create_web_module') { elsif ($param eq '--create_web_module') {
param_check($ltotal, 39, 36); param_check($ltotal, 40, 36);
cli_create_web_module(0); cli_create_web_module(0);
} }
@ -7820,15 +7835,15 @@ sub pandora_manage_main ($$$) {
cli_module_group_synch(); cli_module_group_synch();
} }
elsif ($param eq '--create_network_module') { elsif ($param eq '--create_network_module') {
param_check($ltotal, 33, 21); param_check($ltotal, 34, 21);
cli_create_network_module(0); cli_create_network_module(0);
} }
elsif ($param eq '--create_snmp_module') { elsif ($param eq '--create_snmp_module') {
param_check($ltotal, 41, 29); param_check($ltotal, 43, 29);
cli_create_snmp_module(0); cli_create_snmp_module(0);
} }
elsif ($param eq '--create_plugin_module') { elsif ($param eq '--create_plugin_module') {
param_check($ltotal, 35, 20); param_check($ltotal, 37, 20);
cli_create_plugin_module(0); cli_create_plugin_module(0);
} }
elsif ($param eq '--delete_module') { elsif ($param eq '--delete_module') {
@ -8016,23 +8031,23 @@ sub pandora_manage_main ($$$) {
cli_create_policy(); cli_create_policy();
} }
elsif ($param eq '--create_policy_data_module') { elsif ($param eq '--create_policy_data_module') {
param_check($ltotal, 29, 21); param_check($ltotal, 30, 21);
cli_create_data_module(1); cli_create_data_module(1);
} }
elsif ($param eq '--create_policy_web_module') { elsif ($param eq '--create_policy_web_module') {
param_check($ltotal, 37, 33); param_check($ltotal, 38, 33);
cli_create_web_module(1); cli_create_web_module(1);
} }
elsif ($param eq '--create_policy_network_module') { elsif ($param eq '--create_policy_network_module') {
param_check($ltotal, 30, 20); param_check($ltotal, 34, 20);
cli_create_network_module(1); cli_create_network_module(1);
} }
elsif ($param eq '--create_policy_snmp_module') { elsif ($param eq '--create_policy_snmp_module') {
param_check($ltotal, 39, 27); param_check($ltotal, 41, 27);
cli_create_snmp_module(1); cli_create_snmp_module(1);
} }
elsif ($param eq '--create_policy_plugin_module') { elsif ($param eq '--create_policy_plugin_module') {
param_check($ltotal, 33, 19); param_check($ltotal, 35, 19);
cli_create_plugin_module(1); cli_create_plugin_module(1);
} }
elsif ($param eq '--create_alert_template') { elsif ($param eq '--create_alert_template') {