diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql index 8d62be696b..f9e02745c0 100644 --- a/pandora_console/extras/mr/67.sql +++ b/pandora_console/extras/mr/67.sql @@ -1138,4 +1138,10 @@ UPDATE talert_actions SET field2='[PANDORA] Alert FIRED on _agent_ / _module_ / UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.vmware'; +ALTER TABLE `tagente_modulo` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0; +ALTER TABLE `tpolicy_modules` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0; + +ALTER TABLE `tagente` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0; +ALTER TABLE `tmetaconsole_agent` ADD COLUMN `ignore_unknown` TINYINT NOT NULL DEFAULT 0; + COMMIT; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 51893ca8a6..1af5e3d780 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -1074,6 +1074,17 @@ if (enterprise_installed() === true) { ); } +$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 status.'), true), + html_print_checkbox_switch( + 'ignore_unknown', + 1, + $ignore_unknown, + true, + false + ) +); + ui_toggle( html_print_table($tableAdvancedAgent, true), diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index cad6faad62..3da403ef80 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -232,6 +232,7 @@ if ($create_agent) { $cps = (int) get_parameter_switch('cps', -1); $fixed_ip = (int) get_parameter_switch('fixed_ip', 0); $vul_scan_enabled = (int) get_parameter_switch('vul_scan_enabled', 2); + $ignore_unknown = (int) get_parameter_switch('ignore_unknown', 0); $agent_version = $config['current_package']; $secondary_groups = (array) get_parameter('secondary_groups_selected', ''); $fields = db_get_all_fields_in_table('tagent_custom_fields'); @@ -300,6 +301,7 @@ if ($create_agent) { 'cps' => $cps, 'fixed_ip' => $fixed_ip, 'vul_scan_enabled' => $vul_scan_enabled, + 'ignore_unknown' => $ignore_unknown, 'agent_version' => $agent_version, ] ); @@ -1016,6 +1018,7 @@ if ($update_agent) { $satellite_server = (int) get_parameter('satellite_server', 0); $fixed_ip = (int) get_parameter_switch('fixed_ip', 0); $vul_scan_enabled = (int) get_parameter_switch('vul_scan_enabled', 2); + $ignore_unknown = (int) get_parameter_switch('ignore_unknown', 0); $security_vunerability = (int) get_parameter_switch('security_vunerability', 0); $security_hardening = (int) get_parameter_switch('security_hardening', 0); $security_monitoring = (int) get_parameter_switch('security_monitoring', 0); @@ -1150,6 +1153,7 @@ if ($update_agent) { 'satellite_server' => $satellite_server, 'fixed_ip' => $fixed_ip, 'vul_scan_enabled' => $vul_scan_enabled, + 'ignore_unknown' => $ignore_unknown, ]; if ($config['metaconsole_agent_cache'] == 1) { @@ -1383,6 +1387,7 @@ if ($id_agente) { $satellite_server = (int) $agent['satellite_server']; $fixed_ip = (int) $agent['fixed_ip']; $vul_scan_enabled = (int) $agent['vul_scan_enabled']; + $ignore_unknown = (int) $agent['ignore_unknown']; if (strpos($agent['agent_version'], '(')) { $agent_version = (int) explode('.', explode('(', $agent['agent_version'])[0])[2]; } else { @@ -1633,6 +1638,7 @@ if ($update_module === true || $create_module === true) { $custom_id = (string) get_parameter('custom_id'); $history_data = (int) get_parameter('history_data'); + $ignore_unknown = (int) get_parameter('ignore_unknown'); $dynamic_interval = (int) get_parameter('dynamic_interval'); $dynamic_max = (int) get_parameter('dynamic_max'); $dynamic_min = (int) get_parameter('dynamic_min'); @@ -1841,6 +1847,7 @@ if ($update_module) { 'max_retries' => $max_retries, 'custom_id' => $custom_id, 'history_data' => $history_data, + 'ignore_unknown' => $ignore_unknown, 'dynamic_interval' => $dynamic_interval, 'dynamic_max' => $dynamic_max, 'dynamic_min' => $dynamic_min, @@ -2042,6 +2049,7 @@ if ($create_module) { 'id_modulo' => $id_module, 'custom_id' => $custom_id, 'history_data' => $history_data, + 'ignore_unknown' => $ignore_unknown, 'dynamic_interval' => $dynamic_interval, 'dynamic_max' => $dynamic_max, 'dynamic_min' => $dynamic_min, diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index a52813fbf3..5fc4f12809 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -305,6 +305,7 @@ if ($id_agent_module) { $max_retries = $module['max_retries']; $custom_id = $module['custom_id']; $history_data = $module['history_data']; + $ignore_unknown = $module['ignore_unknown']; $dynamic_interval = $module['dynamic_interval']; $dynamic_max = $module['dynamic_max']; $dynamic_min = $module['dynamic_min']; @@ -443,6 +444,7 @@ if ($id_agent_module) { $plugin_parameter = ''; $custom_id = ''; $history_data = 1; + $ignore_unknown = 0; $dynamic_interval = 0; $dynamic_min = 0; $dynamic_max = 0; diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index c396634f67..fbc0499e75 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -645,6 +645,15 @@ 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 status.'), true); +$table_simple->data['ignore_unknown'][0] = html_print_checkbox_switch( + 'ignore_unknown', + 1, + $ignore_unknown, + true, + false +); + // Business Logic for Advanced Part. global $__code_from; // Code comes from module_editor. @@ -1426,7 +1435,7 @@ if ($__code_from === 'modules') { $throw_unknown_events_check = policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN); } -$table_advanced->data['caption_discard_unknown'][0] = __('Discard unknown events'); +$table_advanced->data['caption_discard_unknown'][0] = __('Discard unknown events').ui_print_help_tip(__('With this mode, the unknown state will be detected, but it will not generate events.'), true); $table_advanced->data['discard_unknown'][0] = html_print_checkbox_switch( 'throw_unknown_events', 1, diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 25b04e7c48..82698266a1 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -194,6 +194,10 @@ if ($update_agents) { $values['safe_mode_module'] = '0'; } + if (get_parameter('ignore_unknown', '') != '') { + $values['ignore_unknown'] = get_parameter('ignore_unknown'); + } + $secondary_groups_added = (array) get_parameter( 'secondary_groups_added', [] @@ -1183,6 +1187,24 @@ $table->data[7][1] .= html_print_select( 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( + [ + '' => __('No change'), + '1' => __('Yes'), + '0' => __('No'), + ], + 'ignore_unknown', + '', + '', + '', + '', + true, + false, + false, + 'w100p' +); + ui_toggle(html_print_table($table, true), __('Advanced options')); unset($table); diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 156ca507d8..4711821c52 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -1319,7 +1319,7 @@ $table->data[29][0] = html_print_label_input_block( ); $table->data[29][1] = html_print_label_input_block( - __('Discard unknown events'), + __('Discard unknown events').ui_print_help_tip(__('With this mode, the unknown state will be detected, but it will not generate events.'), true), html_print_select( [ '' => __('No change'), @@ -1544,6 +1544,26 @@ $table->data[40][0] = 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 status.'), true), + html_print_select( + [ + '' => __('No change'), + '1' => __('Yes'), + '0' => __('No'), + ], + 'ignore_unknown', + '', + '', + '', + '', + true, + false, + false, + 'w100p' + ) +); + echo '
'; html_print_table($table); @@ -2358,6 +2378,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' 'plugin_pass', 'id_export', 'history_data', + 'ignore_unknown', 'critical_inverse', 'warning_inverse', 'percentage_warning', diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index bf1c1b3004..7417a48125 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -3676,6 +3676,7 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3) 'critical_inverse' => $other['data'][28], 'warning_inverse' => $other['data'][29], 'ff_type' => $other['data'][30], + 'ignore_unknown' => $other['data'][32], ]; if (! $values['descripcion']) { @@ -3840,6 +3841,7 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3) 'warning_inverse', 'policy_linked', 'ff_type', + 'ignore_unknown', ]; $values = []; @@ -3853,7 +3855,6 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3) } $values['policy_linked'] = 0; - $result_update = modules_update_agent_module($id_module, $values); if ($result_update < 0) { @@ -3954,6 +3955,7 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3) 'critical_inverse' => $other['data'][33], 'warning_inverse' => $other['data'][34], 'ff_type' => $other['data'][35], + 'ignore_unknown' => $other['data'][37], ]; $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', 'policy_linked', 'ff_type', + 'ignore_unknown', ]; $values = []; @@ -4241,6 +4244,7 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3) 'critical_inverse' => $other['data'][24], 'warning_inverse' => $other['data'][25], 'ff_type' => $other['data'][26], + 'ignore_unknown' => $other['data'][27], ]; if (! $values['descripcion']) { @@ -4763,6 +4767,7 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3) 'warning_inverse', 'policy_linked', 'ff_type', + 'ignore_unknown', ]; $values = []; @@ -4903,6 +4908,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3) 'min_ff_event_warning' => $other['data'][32], 'min_ff_event_critical' => $other['data'][33], 'ff_type' => $other['data'][34], + 'ignore_unknown' => $other['data'][36], ]; } else { $values = [ @@ -4935,6 +4941,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3) 'min_ff_event_warning' => $other['data'][26], 'min_ff_event_critical' => $other['data'][27], 'ff_type' => $other['data'][28], + 'ignore_unknown' => $other['data'][29], ]; } @@ -5103,6 +5110,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3) 'min_ff_event_critical', 'policy_linked', 'ff_type', + 'ignore_unknown', ]; } else { $snmp_module_fields = [ @@ -5135,6 +5143,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3) 'min_ff_event_critical', 'policy_linked', 'ff_type', + 'ignore_unknown', ]; } @@ -7982,6 +7991,7 @@ function api_set_update_data_module_policy($id, $thrash1, $other, $thrash3) 'configuration_data', 'disabled_types_event', 'module_macros', + 'ignore_unknown', ]; $cont = 0; @@ -8120,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_critical'] = $other['data'][26]; $values['ff_type'] = $other['data'][27]; + $values['ignore_unknown'] = $other['data'][28]; if ($name_module_policy !== false) { if ($name_module_policy[0]['name'] == $other['data'][0]) { @@ -8222,6 +8233,7 @@ function api_set_update_network_module_policy($id, $thrash1, $other, $thrash3) 'custom_id', 'disabled_types_event', 'module_macros', + 'ignore_unknown', ]; $cont = 0; @@ -8338,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_critical'] = $other['data'][31]; $values['ff_type'] = $other['data'][32]; + $values['ignore_unknown'] = $other['data'][33]; if ($name_module_policy !== false) { if ($name_module_policy[0]['name'] == $other['data'][0]) { @@ -8464,6 +8477,7 @@ function api_set_update_plugin_module_policy($id, $thrash1, $other, $thrash3) 'disabled_types_event', 'macros', 'module_macros', + 'ignore_unknown', ]; $cont = 0; @@ -8782,6 +8796,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) 'min_ff_event_warning' => $other['data'][31], 'min_ff_event_critical' => $other['data'][32], 'ff_type' => $other['data'][33], + 'ignore_unknown' => $other['data'][34], ]; } else { $values = [ @@ -8812,6 +8827,7 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3) 'min_ff_event_warning' => $other['data'][25], 'min_ff_event_critical' => $other['data'][26], 'ff_type' => $other['data'][27], + 'ignore_unknown' => $other['data'][28], ]; } @@ -8944,6 +8960,7 @@ function api_set_update_snmp_module_policy($id, $thrash1, $other, $thrash3) 'plugin_parameter', 'plugin_user', 'plugin_pass', + 'ignore_unknown', ]; } else { $fields_snmp_module = [ @@ -8968,6 +8985,7 @@ function api_set_update_snmp_module_policy($id, $thrash1, $other, $thrash3) 'max', 'custom_id', 'description', + 'ignore_unknown', ]; } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 05170bc115..37dc1bf0af 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -92,6 +92,7 @@ CREATE TABLE IF NOT EXISTS `tagente` ( `fixed_ip` TINYINT NOT NULL DEFAULT 0, `disabled_by_downtime` TINYINT NOT NULL DEFAULT 0, `vul_scan_enabled` TINYINT NOT NULL DEFAULT 2, + `ignore_unknown` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (`id_agente`), KEY `nombre` (`nombre`(255)), KEY `direccion` (`direccion`), @@ -279,6 +280,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `disabled_by_downtime` TINYINT NOT NULL DEFAULT 0, `last_compact` TIMESTAMP NOT NULL DEFAULT 0, `made_enabled` TINYINT UNSIGNED DEFAULT 0, + `ignore_unknown` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (`id_agente_modulo`), KEY `main_idx` (`id_agente_modulo`,`id_agente`), KEY `tam_agente` (`id_agente`), @@ -2539,6 +2541,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_modules` ( `percentage_critical` TINYINT UNSIGNED DEFAULT 0, `warning_time` INT UNSIGNED DEFAULT 0, `made_enabled` TINYINT UNSIGNED DEFAULT 0, + `ignore_unknown` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `main_idx` (`id_policy`), UNIQUE (`id_policy`, `name`) @@ -3549,6 +3552,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` ( `fixed_ip` TINYINT NOT NULL DEFAULT 0, `disabled_by_downtime` TINYINT NOT NULL DEFAULT 0, `vul_scan_enabled` TINYINT NOT NULL DEFAULT 2, + `ignore_unknown` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (`id_agente`), KEY `nombre` (`nombre`(255)), KEY `direccion` (`direccion`), diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 6ac17923c0..f0ee7cbcdc 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -1240,48 +1240,48 @@ INSERT INTO `tpolicies` VALUES (4,'Basic AIX Local Monitoring','B INSERT INTO `tpolicies` VALUES (5,'Basic HP-UX Local Monitoring','Basic local checks to monitoring HP/UX systems.',2,0,0,0); INSERT INTO `tpolicies` VALUES (6,'Basic Remote Checks','Basic Remote Checks (ping, latency, ports).',9,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin module_name Bytes per second (Received) module_type generic_data_inc module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum ReceivedBytes |Select -ExpandProperty Sum" module_end ',4,'','Bytes per second (Received)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (2,1,'module_begin module_name Bytes per second (Sent) module_type generic_data_inc module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum SentBytes |Select -ExpandProperty Sum" module_end ',4,'','Bytes per second (Sent)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (3,1,'module_begin module_name CPU % module_type generic_data module_cpuusage all module_unit % module_min_warning 79.00 module_max_warning 90.00;module_min_critical 91.00 module_max_critical 00.00; module_end ',1,'CPU usage (%)','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,79.00,90.00,'',91.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (4,1,'module_begin module_name Total processes module_type generic_data module_exec tasklist | wc -l | gawk "{print $1}" module_end ',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (5,1,'module_begin module_name Uptime module_type generic_data module_exec powershell -c "((get-date) - (gcim Win32_OperatingSystem).LastBootUpTime | Select -ExpandProperty Ticks) / 100000" module_end ',1,'','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (6,1,'module_begin module_name WMI Service module_type generic_proc module_service winmgmt module_end ',2,'WMI Service enabled','WMI Service','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (7,2,'module_begin module_name Bytes per second (Received) module_type generic_data_inc module_exec awk '!/lo:/ {s+=$2}END{print s}' /proc/net/dev module_min_warning 0 module_max_warning 0 module_min_critical 0 module_max_critical 0 module_end ',4,'','Bytes per second (Received)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (8,2,'module_begin module_name Bytes per second (Sent) module_type generic_data_inc module_exec awk '!/lo:/ {s+=$10}END{print s}' /proc/net/dev module_min_warning 0 module_max_warning 0 module_min_critical 0 module_max_critical 0 module_end ',4,'','Bytes per second (Sent)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (9,2,'module_begin module_name CPU % module_type generic_data module_exec vmstat 1 1 | tail -1 | awk '{ print $13 + $14 }' module_unit % module_end ',1,'Current use of CPU (System + User).','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (10,2,'module_begin module_name I/O Lock module_type generic_data module_exec vmstat 1 1 | tail -1 | awk '{print $16}' module_description I/O Wait Disk module_end ',1,'','I/O Lock','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (11,2,'module_begin module_name Load Average module_type generic_data module_exec cat /proc/loadavg |awk '{print $2}' module_end ',1,'Average process in CPU (Last 5 minutes).','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (12,2,'module_begin module_name Port 22 Open (SSH) module_type generic_proc module_exec echo > /dev/tcp/127.0.0.1/22 >/dev/null 2>&1 && echo 1 || echo 0 module_end ',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (13,2,'module_begin module_name Total processes module_type generic_data module_exec ps ax | tail -n +2 | wc -l module_description Total processes module_end',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (14,2,'module_begin module_name Uptime module_type generic_data module_exec awk '{print $1*100}' /proc/uptime module_end ',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (15,3,'module_begin module_name CPU % module_type generic_data module_exec vmstat 1 1 | tail -1| awk '{print (100-$NF)}' module_unit % module_end ',1,'CPU usage %','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (16,3,'module_begin module_name Disk / usage (%) module_type generic_data module_exec df -k / | tail -1 | tr -d "%" | awk '{print $5}' module_end ',1,'Disk use percentage for root partition (/)','Disk / usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (17,3,'module_begin module_name Disk /var usage (%) module_type generic_data module_exec df -k /var | tail -1 | tr -d "%" | awk '{print $5}' module_end ',1,'Disk use percentage for var partition (/var)','Disk /var usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (18,3,'module_begin module_name Load Average module_type generic_data module_exec uptime | awk '{print $(NF-2)}' | tr -d ',' module_end ',1,'Load average','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (19,3,'module_begin module_name Memory Free % module_type generic_data module_freepercentmemory module_end ',1,'Percentage Mem Free','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,8.00,15.00,'',0.00,7.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (20,3,'module_begin module_name Port 22 Open (SSH) module_type generic_proc module_exec timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/22" >/dev/null 2>&1 && echo 1 || echo 0 module_end ',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (21,3,'module_begin module_name Swap Used % module_type generic_data module_exec swap -l |tail -1 | awk '{print 100 - ($NF / $(NF-1) * 100)}' module_unit % module_end ',1,'Swap memory available in %','Swap Used %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (22,3,'module_begin module_name Total processes module_type generic_data module_exec ps -A | wc -l | awk '{print $1}' module_end',1,'Total processes','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (23,3,'module_beg module_name Uptime module_type generic_data module_exec perl -e "print 100*(time - $(kstat -p unix:0:system_misc:boot_time |awk '{print $2}'))" module_end ',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (24,4,'module_begin module_name CPU % module_type generic_data module_exec sar 1 | tail -1 | awk '{print 100 - $5}' module_description CPU usage in % module_unit % module_end',1,'','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (25,4,'module_begin module_name CPU User module_type generic_data module_exec sar 1 | tail -1 | awk '{print $2}' module_description CPU usage in % module_unit % module_end',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (26,4,'module_begin module_name Load Average module_type generic_data module_exec uptime | awk '{print $(NF-2)*1}' module_description Average process in CPU (Last minute) module_end',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (27,4,'module_begin module_name Memory Free % module_type generic_data module_exec svmon -G|grep memory | awk '{print (1- $3/$2 )*100}' module_description Percentage Mem Free module_end ',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (28,4,'module_begin module_name Pagination use module_type generic_data module_exec lsps -s | tail -1 | awk '{print $2+0}' module_end',1,'','Pagination use','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (29,4,'module_begin module_name Service sshd status module_type generic_proc module_exec lssrc -a | grep ssh | grep active module_end',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (30,4,'module_begin module_name Uptime module_type generic_data_string module_exec uptime |sed "s/us\.*$//g" | sed "s/,\.*$//g" module_description Host Up time module_end ',1,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (31,5,'module_begin module_name CPU % module_type generic_data module_cpuusage all module_unit % module_end ',1,'','CPU %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (32,5,'module_begin module_name CPU User module_type generic_data module_exec vmstat 1 2 | tail -1 | awk '{ print $(16) }' module_description % of User CPU module_unit % module_end ',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (33,5,'module_begin module_name Load Average module_type generic_data module_exec uptime | awk '{print $(NF-2)}' | tr -d ',' module_description System load average module_end ',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (34,5,'module_begin module_name Memory Free % module_type generic_data module_exec echo "" > /tmp/hpvm_toptest; top -d 1 -f /tmp/hpvm_toptest 2>/dev/null 1>/dev/null; cat /tmp/hpvm_toptest | grep -i Memory | head -1 | awk '{print $8/($2+$5) * 100}' module_end ',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (35,5,'module_begin module_name Service sshd status module_type generic_proc module_exec ps -ef | grep -v grep | grep "/opt/ssh/sbin/sshd" | wc -l module_description SSH running module_end ',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (36,5,'module_begin module_name Total processes module_type generic_data module_exec echo $(((`ps -e | wc -l`)-1)) | tr -d “\n” module_description Total processes module_end ',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (37,5,'module_begin module_name Uptime module_type generic_data_string module_exec uptime |sed s/us\.*$//g | sed s/,\.*$//g module_description Host Up time module_end ',3,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (38,5,'module_begin module_name Zombie processes module_type generic_data module_exec ps -­elf | awk '$2~/'Z'/{print $2}' | wc -l | tr -d "\n" module_description Zombie processes module_end ',1,'','Zombie processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (39,6,'',6,'','Host Alive','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (40,6,'',7,'','Host Latency','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,80.00,149.00,'',150.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (41,6,'',2,'Checks if port 161 is open and reachable for Pandora FMS server.','SNMP Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target IP;;_address_--_field2_;Port;;161',3,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"_address_\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Port\",\"help\":\"\",\"value\":\"161\"}}','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `tpolicy_modules` VALUES (42,6,'',9,'Checks if port 22 is open and reachable for Pandora FMS server.','SSH Reachable','',0,0,300,'',22,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin module_name Bytes per second (Received) module_type generic_data_inc module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum ReceivedBytes |Select -ExpandProperty Sum" module_end ',4,'','Bytes per second (Received)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (2,1,'module_begin module_name Bytes per second (Sent) module_type generic_data_inc module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum SentBytes |Select -ExpandProperty Sum" module_end ',4,'','Bytes per second (Sent)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (3,1,'module_begin module_name CPU % module_type generic_data module_cpuusage all module_unit % module_min_warning 79.00 module_max_warning 90.00;module_min_critical 91.00 module_max_critical 00.00; module_end ',1,'CPU usage (%)','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,79.00,90.00,'',91.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (4,1,'module_begin module_name Total processes module_type generic_data module_exec tasklist | wc -l | gawk "{print $1}" module_end ',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (5,1,'module_begin module_name Uptime module_type generic_data module_exec powershell -c "((get-date) - (gcim Win32_OperatingSystem).LastBootUpTime | Select -ExpandProperty Ticks) / 100000" module_end ',1,'','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (6,1,'module_begin module_name WMI Service module_type generic_proc module_service winmgmt module_end ',2,'WMI Service enabled','WMI Service','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (7,2,'module_begin module_name Bytes per second (Received) module_type generic_data_inc module_exec awk '!/lo:/ {s+=$2}END{print s}' /proc/net/dev module_min_warning 0 module_max_warning 0 module_min_critical 0 module_max_critical 0 module_end ',4,'','Bytes per second (Received)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (8,2,'module_begin module_name Bytes per second (Sent) module_type generic_data_inc module_exec awk '!/lo:/ {s+=$10}END{print s}' /proc/net/dev module_min_warning 0 module_max_warning 0 module_min_critical 0 module_max_critical 0 module_end ',4,'','Bytes per second (Sent)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (9,2,'module_begin module_name CPU % module_type generic_data module_exec vmstat 1 1 | tail -1 | awk '{ print $13 + $14 }' module_unit % module_end ',1,'Current use of CPU (System + User).','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (10,2,'module_begin module_name I/O Lock module_type generic_data module_exec vmstat 1 1 | tail -1 | awk '{print $16}' module_description I/O Wait Disk module_end ',1,'','I/O Lock','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (11,2,'module_begin module_name Load Average module_type generic_data module_exec cat /proc/loadavg |awk '{print $2}' module_end ',1,'Average process in CPU (Last 5 minutes).','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (12,2,'module_begin module_name Port 22 Open (SSH) module_type generic_proc module_exec echo > /dev/tcp/127.0.0.1/22 >/dev/null 2>&1 && echo 1 || echo 0 module_end ',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (13,2,'module_begin module_name Total processes module_type generic_data module_exec ps ax | tail -n +2 | wc -l module_description Total processes module_end',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (14,2,'module_begin module_name Uptime module_type generic_data module_exec awk '{print $1*100}' /proc/uptime module_end ',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (15,3,'module_begin module_name CPU % module_type generic_data module_exec vmstat 1 1 | tail -1| awk '{print (100-$NF)}' module_unit % module_end ',1,'CPU usage %','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (16,3,'module_begin module_name Disk / usage (%) module_type generic_data module_exec df -k / | tail -1 | tr -d "%" | awk '{print $5}' module_end ',1,'Disk use percentage for root partition (/)','Disk / usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (17,3,'module_begin module_name Disk /var usage (%) module_type generic_data module_exec df -k /var | tail -1 | tr -d "%" | awk '{print $5}' module_end ',1,'Disk use percentage for var partition (/var)','Disk /var usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (18,3,'module_begin module_name Load Average module_type generic_data module_exec uptime | awk '{print $(NF-2)}' | tr -d ',' module_end ',1,'Load average','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (19,3,'module_begin module_name Memory Free % module_type generic_data module_freepercentmemory module_end ',1,'Percentage Mem Free','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,8.00,15.00,'',0.00,7.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (20,3,'module_begin module_name Port 22 Open (SSH) module_type generic_proc module_exec timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/22" >/dev/null 2>&1 && echo 1 || echo 0 module_end ',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (21,3,'module_begin module_name Swap Used % module_type generic_data module_exec swap -l |tail -1 | awk '{print 100 - ($NF / $(NF-1) * 100)}' module_unit % module_end ',1,'Swap memory available in %','Swap Used %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (22,3,'module_begin module_name Total processes module_type generic_data module_exec ps -A | wc -l | awk '{print $1}' module_end',1,'Total processes','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (23,3,'module_beg module_name Uptime module_type generic_data module_exec perl -e "print 100*(time - $(kstat -p unix:0:system_misc:boot_time |awk '{print $2}'))" module_end ',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (24,4,'module_begin module_name CPU % module_type generic_data module_exec sar 1 | tail -1 | awk '{print 100 - $5}' module_description CPU usage in % module_unit % module_end',1,'','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (25,4,'module_begin module_name CPU User module_type generic_data module_exec sar 1 | tail -1 | awk '{print $2}' module_description CPU usage in % module_unit % module_end',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (26,4,'module_begin module_name Load Average module_type generic_data module_exec uptime | awk '{print $(NF-2)*1}' module_description Average process in CPU (Last minute) module_end',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (27,4,'module_begin module_name Memory Free % module_type generic_data module_exec svmon -G|grep memory | awk '{print (1- $3/$2 )*100}' module_description Percentage Mem Free module_end ',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (28,4,'module_begin module_name Pagination use module_type generic_data module_exec lsps -s | tail -1 | awk '{print $2+0}' module_end',1,'','Pagination use','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (29,4,'module_begin module_name Service sshd status module_type generic_proc module_exec lssrc -a | grep ssh | grep active module_end',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (30,4,'module_begin module_name Uptime module_type generic_data_string module_exec uptime |sed "s/us\.*$//g" | sed "s/,\.*$//g" module_description Host Up time module_end ',1,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (31,5,'module_begin module_name CPU % module_type generic_data module_cpuusage all module_unit % module_end ',1,'','CPU %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (32,5,'module_begin module_name CPU User module_type generic_data module_exec vmstat 1 2 | tail -1 | awk '{ print $(16) }' module_description % of User CPU module_unit % module_end ',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (33,5,'module_begin module_name Load Average module_type generic_data module_exec uptime | awk '{print $(NF-2)}' | tr -d ',' module_description System load average module_end ',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (34,5,'module_begin module_name Memory Free % module_type generic_data module_exec echo "" > /tmp/hpvm_toptest; top -d 1 -f /tmp/hpvm_toptest 2>/dev/null 1>/dev/null; cat /tmp/hpvm_toptest | grep -i Memory | head -1 | awk '{print $8/($2+$5) * 100}' module_end ',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (35,5,'module_begin module_name Service sshd status module_type generic_proc module_exec ps -ef | grep -v grep | grep "/opt/ssh/sbin/sshd" | wc -l module_description SSH running module_end ',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (36,5,'module_begin module_name Total processes module_type generic_data module_exec echo $(((`ps -e | wc -l`)-1)) | tr -d “\n” module_description Total processes module_end ',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (37,5,'module_begin module_name Uptime module_type generic_data_string module_exec uptime |sed s/us\.*$//g | sed s/,\.*$//g module_description Host Up time module_end ',3,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (38,5,'module_begin module_name Zombie processes module_type generic_data module_exec ps -­elf | awk '$2~/'Z'/{print $2}' | wc -l | tr -d "\n" module_description Zombie processes module_end ',1,'','Zombie processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (39,6,'',6,'','Host Alive','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (40,6,'',7,'','Host Latency','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,80.00,149.00,'',150.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (41,6,'',2,'Checks if port 161 is open and reachable for Pandora FMS server.','SNMP Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target IP;;_address_--_field2_;Port;;161',3,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"_address_\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Port\",\"help\":\"\",\"value\":\"161\"}}','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `tpolicy_modules` VALUES (42,6,'',9,'Checks if port 22 is open and reachable for Pandora FMS server.','SSH Reachable','',0,0,300,'',22,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); INSERT INTO `tpolicy_plugins` VALUES (1,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"',0); INSERT INTO `tpolicy_plugins` VALUES (2,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"',0); diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 84d3d51bd2..c42e993a9a 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -7036,7 +7036,9 @@ sub pandora_module_unknown ($$) { WHERE tagente.id_agente = tagente_estado.id_agente AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente.disabled = 0 + AND tagente.ignore_unknown = 0 AND tagente_modulo.disabled = 0 + AND tagente_modulo.ignore_unknown = 0 AND ((tagente_modulo.id_tipo_modulo IN (21, 22, 23) AND tagente_estado.estado <> 0) OR (' . ($pa_config->{'unknown_updates'} == 0 ? diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 3ea6c61070..b504e9fbc0 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -145,12 +145,12 @@ sub help_screen{ 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'); - help_screen_line('--create_web_module', " [ \n\t \n\t \n\t \n\t \n\t \n\t ].\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', " \n\t [ \n\t \n\t \n\t \n\t \n\t ]", 'Add not snmp network module to agent'); - help_screen_line('--create_snmp_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t ] + help_screen_line('--create_data_module', " [ \n\t \n\t \n\t \n\t \n\t ]", 'Add data server module to agent'); + help_screen_line('--create_web_module', " [ \n\t \n\t \n\t \n\t \n\t \n\t ].\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', " \n\t [ \n\t \n\t \n\t \n\t \n\t ]", 'Add not snmp network module to agent'); + help_screen_line('--create_snmp_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t ] \n\t \n\t ]", 'Add snmp network module to agent'); - help_screen_line('--create_plugin_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add plug-in module to agent'); + help_screen_line('--create_plugin_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add plug-in module to agent'); help_screen_line('--get_module_group', '[]', 'Dysplay all module groups'); help_screen_line('--create_module_group', ''); help_screen_line('--module_group_synch', " []", '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('--disable_policy_alerts', '', 'Disable all the alerts of a policy'); help_screen_line('--create_policy', ' '); - help_screen_line('--create_policy_data_module', " [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add data server module to policy'); - help_screen_line('--create_policy_web_module', " [ \n\t \n\t \n\t \n\t \n\t ].\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', " [ \n\t \n\t \n\t \n\t \n\t \n\t ]", "Add not snmp network module to policy"); + help_screen_line('--create_policy_data_module', " [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add data server module to policy'); + help_screen_line('--create_policy_web_module', " [ \n\t \n\t \n\t \n\t \n\t ].\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', " [ \n\t \n\t \n\t \n\t \n\t \n\t ]", "Add not snmp network module to policy"); help_screen_line('--create_policy_snmp_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t - \n\t ]", 'Add snmp network module to policy'); - help_screen_line('--create_policy_plugin_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add plug-in module to policy'); + \n\t ]", 'Add snmp network module to policy'); + help_screen_line('--create_policy_plugin_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add plug-in module to policy'); help_screen_line('--create_policy_data_module_from_local_component', ' '); help_screen_line('--add_collection_to_policy', " "); help_screen_line('--validate_policy_alerts', '', 'Validate the alerts of a given policy'); @@ -1655,23 +1655,23 @@ sub cli_create_data_module($) { $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, $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) { ($module_name, $module_type, $agent_name, $description, $module_group, $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, $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 { ($policy_name, $module_name, $module_type, $description, $module_group, $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, $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_type_def; @@ -1790,7 +1790,7 @@ sub cli_create_data_module($) { enterprise_hook('pandora_update_md5_file', [$conf, $agent_name]); } } - + if ($in_policy == 0) { if (defined $use_alias and $use_alias eq 'use_alias') { foreach my $id (@id_agents) { @@ -1886,7 +1886,8 @@ sub cli_create_data_module($) { $parameters{'critical_instructions'} = $critical_instructions unless !defined ($critical_instructions); $parameters{'warning_instructions'} = $warning_instructions unless !defined ($warning_instructions); $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); - + $parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown); + if ($in_policy == 0) { if (defined $use_alias and $use_alias eq 'use_alias') { foreach my $id (@id_agents) { @@ -1894,6 +1895,9 @@ sub cli_create_data_module($) { pandora_create_module_from_hash ($conf, \%parameters, $dbh); } } else { + if ($parameters{'id_agente'} eq '') { + $parameters{'id_agente'} = $agent_id; + } 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, $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, - $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) { ($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, $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, - $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 { ($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, $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, - $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; @@ -2158,6 +2162,7 @@ sub cli_create_web_module($) { $parameters{'tcp_rcv'} = $proxy_auth_password unless !defined ($proxy_auth_password); $parameters{'ip_target'} = $auth_server unless !defined ($auth_server); $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); } } else { + if ($parameters{'id_agente'} eq '') { + $parameters{'id_agente'} = $agent_id; + } 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, $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, - $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) { ($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, $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..33]; + $warning_inverse, $critical_inverse, $use_alias, $ignore_unknown) = @ARGV[2..34]; } else { ($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, $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..31]; + $warning_inverse, $critical_inverse, $ignore_unknown) = @ARGV[2..34]; } my $module_name_def; @@ -2509,6 +2517,8 @@ sub cli_create_network_module($) { $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse); $parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse); + $parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown); + if ($in_policy == 0) { 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); } } else { + if ($parameters{'id_agente'} eq '') { + $parameters{'id_agente'} = $agent_id; + } 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, $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, - $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) { ($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, $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, - $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 { ($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, $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, - $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; @@ -2694,6 +2707,7 @@ sub cli_create_snmp_module($) { $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse); $parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse); + $parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown); if ($in_policy == 0) { 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, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $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) { ($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, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $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 { ($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, $ff_threshold, $warning_str, $critical_str, $enable_unknown_events, $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; @@ -2894,6 +2908,7 @@ sub cli_create_plugin_module($) { $parameters{'unknown_instructions'} = $unknown_instructions unless !defined ($unknown_instructions); $parameters{'critical_inverse'} = $critical_inverse unless !defined ($critical_inverse); $parameters{'warning_inverse'} = $warning_inverse unless !defined ($warning_inverse); + $parameters{'ignore_unknown'} = $ignore_unknown unless !defined ($ignore_unknown); if ($in_policy == 0) { if (defined $use_alias and $use_alias eq 'use_alias') { @@ -7801,11 +7816,11 @@ sub pandora_manage_main ($$$) { cli_delete_agent(); } elsif ($param eq '--create_data_module') { - param_check($ltotal, 30, 24); + param_check($ltotal, 31, 24); cli_create_data_module(0); } elsif ($param eq '--create_web_module') { - param_check($ltotal, 39, 36); + param_check($ltotal, 40, 36); cli_create_web_module(0); } @@ -7822,15 +7837,15 @@ sub pandora_manage_main ($$$) { cli_module_group_synch(); } elsif ($param eq '--create_network_module') { - param_check($ltotal, 33, 21); + param_check($ltotal, 34, 21); cli_create_network_module(0); } elsif ($param eq '--create_snmp_module') { - param_check($ltotal, 41, 29); + param_check($ltotal, 43, 29); cli_create_snmp_module(0); } elsif ($param eq '--create_plugin_module') { - param_check($ltotal, 35, 20); + param_check($ltotal, 37, 20); cli_create_plugin_module(0); } elsif ($param eq '--delete_module') { @@ -8018,23 +8033,23 @@ sub pandora_manage_main ($$$) { cli_create_policy(); } elsif ($param eq '--create_policy_data_module') { - param_check($ltotal, 29, 21); + param_check($ltotal, 30, 21); cli_create_data_module(1); } elsif ($param eq '--create_policy_web_module') { - param_check($ltotal, 37, 33); + param_check($ltotal, 38, 33); cli_create_web_module(1); } elsif ($param eq '--create_policy_network_module') { - param_check($ltotal, 30, 20); + param_check($ltotal, 34, 20); cli_create_network_module(1); } elsif ($param eq '--create_policy_snmp_module') { - param_check($ltotal, 39, 27); + param_check($ltotal, 41, 27); cli_create_snmp_module(1); } elsif ($param eq '--create_policy_plugin_module') { - param_check($ltotal, 33, 19); + param_check($ltotal, 35, 19); cli_create_plugin_module(1); } elsif ($param eq '--create_alert_template') {