Merge branch 'ent-12631-nuevo-modo-de-los-modulos-ignorar-desconocidos-ignore-unknown-parte-de-consola' into 'develop'

Ent 12631 Nuevo modo de los modulos: ignorar desconocidos (Ignore unknown). Parte de Consola

See merge request artica/pandorafms!6757
This commit is contained in:
Daniel Rodriguez 2023-12-18 13:40:21 +00:00
commit 348c48d974
12 changed files with 201 additions and 83 deletions

View File

@ -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;

View File

@ -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),

View File

@ -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,

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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 '<form method="post" class="max_floating_element_size" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">';
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',

View File

@ -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',
];
}

View File

@ -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`),

View File

@ -1240,48 +1240,48 @@ INSERT INTO `tpolicies` VALUES (4,'Basic&#x20;AIX&#x20;Local&#x20;Monitoring','B
INSERT INTO `tpolicies` VALUES (5,'Basic&#x20;HP-UX&#x20;Local&#x20;Monitoring','Basic&#x20;local&#x20;checks&#x20;to&#x20;monitoring&#x20;HP/UX&#x20;systems.',2,0,0,0);
INSERT INTO `tpolicies` VALUES (6,'Basic&#x20;Remote&#x20;Checks','Basic&#x20;Remote&#x20;Checks&#x20;&#40;ping,&#x20;latency,&#x20;ports&#41;.',9,0,0,0);
INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;powershell&#x20;-c&#x20;&quot;Get-NetAdapterStatistics&#x20;|Measure-Object&#x20;-Sum&#x20;ReceivedBytes&#x20;|Select&#x20;-ExpandProperty&#x20;Sum&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;','',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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;powershell&#x20;-c&#x20;&quot;Get-NetAdapterStatistics&#x20;|Measure-Object&#x20;-Sum&#x20;SentBytes&#x20;|Select&#x20;-ExpandProperty&#x20;Sum&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;','',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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_cpuusage&#x20;all&#x0a;module_unit&#x20;%&#x0a;module_min_warning&#x20;79.00&#x0a;module_max_warning&#x20;90.00;module_min_critical&#x20;91.00&#x0a;module_max_critical&#x20;00.00;&#x0amodule_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',1,'CPU&#x20;usage&#x20;&#40;%&#41;','CPU&#x20;%','%',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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;tasklist&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;gawk&#x20;&quot;{print&#x20;$1}&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;powershell&#x20;-c&#x20;&quot;&#40;&#40;get-date&#41;&#x20;-&#x20;&#40;gcim&#x20;Win32_OperatingSystem&#41;.LastBootUpTime&#x20;|&#x20;Select&#x20;-ExpandProperty&#x20;Ticks&#41;&#x20;/&#x20;100000&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',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&#x0a;module_name&#x20;WMI&#x20;Service&#x0a;module_type&#x20;generic_proc&#x0a;module_service&#x20;winmgmt&#x0a;module_end&#x0a;&#x0a;',2,'WMI&#x20;Service&#x20;enabled','WMI&#x20;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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;awk&#x20;&#039;!/lo:/&#x20;{s+=$2}END{print&#x20;s}&#039;&#x20;/proc/net/dev&#x0a;module_min_warning&#x20;0&#x0a;module_max_warning&#x20;0&#x0a;module_min_critical&#x20;0&#x0a;module_max_critical&#x20;0&#x0a;module_end&#x0a;&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;','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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;awk&#x20;&#039;!/lo:/&#x20;{s+=$10}END{print&#x20;s}&#039;&#x20;/proc/net/dev&#x0a;module_min_warning&#x20;0&#x0a;module_max_warning&#x20;0&#x0a;module_min_critical&#x20;0&#x0a;module_max_critical&#x20;0&#x0a;module_end&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;','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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$13&#x20;+&#x20;$14&#x20;}&#039;&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;&#x0a;',1,'Current&#x20;use&#x20;of&#x20;CPU&#x20;&#40;System&#x20;+&#x20;User&#41;.','CPU&#x20;%','%',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&#x0a;module_name&#x20;I/O&#x20;Lock&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$16}&#039;&#x0a;module_description&#x20;I/O&#x20;Wait&#x20;Disk&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'','I/O&#x20;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&#x20;&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;cat&#x20;/proc/loadavg&#x20;|awk&#x20;&#039;{print&#x20;$2}&#039;&#x0a;module_end&#x0a;&#x0a;',1,'Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;5&#x20;minutes&#41;.','Load&#x20;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&#x0a;module_name&#x20;Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;echo&#x20;&gt;&#x20;/dev/tcp/127.0.0.1/22&#x20;&gt;/dev/null&#x20;2&gt;&amp;1&#x20;&amp;&amp;&#x20;echo&#x20;1&#x20;||&#x20;echo&#x20;0&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',2,'Checks&#x20;if&#x20;port&#x20;22&#x20;&#40;SSH&#41;&#x20;is&#x20;listening.','Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;','',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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;ps&#x20;ax&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;wc&#x20;-l&#x0a;module_description&#x20;Total&#x20;processes&#x0a;module_end',1,'','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;awk&#x20;&#039;{print&#x20;$1*100}&#039;&#x20;/proc/uptime&#x0a;module_end&#x0a;',1,'Host&#x20;Up&#x20;time&#x20;&#40;Timeticks&#41;','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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1|&#x20;awk&#x20;&#039;{print&#x20;&#40;100-$NF&#41;}&#039;&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;',1,'CPU&#x20;usage&#x20;%','CPU&#x20;%','%',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&#x0d;&#x0a;module_name&#x20;Disk&#x20;/&#x20;usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-k&#x20;/&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;tr&#x20;-d&#x20;&quot;%&quot;&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$5}&#039;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'Disk&#x20;use&#x20;percentage&#x20;for&#x20;root&#x20;partition&#x20;&#40;/&#41;','Disk&#x20;/&#x20;usage&#x20;&#40;%&#41;','',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&#x0d;&#x0a;module_name&#x20;Disk&#x20;/var&#x20;usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-k&#x20;/var&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;tr&#x20;-d&#x20;&quot;%&quot;&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$5}&#039;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'Disk&#x20;use&#x20;percentage&#x20;for&#x20;var&#x20;partition&#x20;&#40;/var&#41;','Disk&#x20;/var&#x20;usage&#x20;&#40;%&#41;','',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&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;&#x0a;module_end&#x0a;',1,'Load&#x20;average','Load&#x20;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&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_freepercentmemory&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',1,'Percentage&#x20;Mem&#x20;Free','Memory&#x20;Free&#x20;%','',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&#x0a;module_name&#x20;Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;timeout&#x20;1&#x20;bash&#x20;-c&#x20;&quot;echo&#x20;&gt;&#x20;/dev/tcp/127.0.0.1/22&quot;&#x20;&gt;/dev/null&#x20;2&gt;&amp;1&#x20;&amp;&amp;&#x20;echo&#x20;1&#x20;||&#x20;echo&#x20;0&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;',2,'Checks&#x20;if&#x20;port&#x20;22&#x20;&#40;SSH&#41;&#x20;is&#x20;listening.','Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;','',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&#x0a;module_name&#x20;Swap&#x20;Used&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;swap&#x20;-l&#x20;|tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;100&#x20;-&#x20;&#40;$NF&#x20;/&#x20;$&#40;NF-1&#41;&#x20;*&#x20;100&#41;}&#039;&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'Swap&#x20;memory&#x20;available&#x20;in&#x20;%','Swap&#x20;Used&#x20;%','%',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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;ps&#x20;-A&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$1}&#039;&#x0a;module_end',1,'Total&#x20;processes','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;perl&#x20;-e&#x20;&quot;print&#x20;100*&#40;time&#x20;-&#x20;$&#40;kstat&#x20;-p&#x20;unix:0:system_misc:boot_time&#x20;|awk&#x20;&#039;{print&#x20;$2}&#039;&#41;&#41;&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',1,'Host&#x20;Up&#x20;time&#x20;&#40;Timeticks&#41;','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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;sar&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;100&#x20;-&#x20;$5}&#039;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;in&#x20;%&#x0a;module_unit&#x20;%&#x0a;module_end',1,'','CPU&#x20;%','%',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&#x0a;module_name&#x20;CPU&#x20;User&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;sar&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$2}&#039;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;in&#x20;%&#x0a;module_unit&#x20;%&#x0a;module_end',1,'','CPU&#x20;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&#x20;&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;*1}&#039;&#x20;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x20;&#x0a;module_end',1,'','Load&#x20;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&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;svmon&#x20;-G|grep&#x20;memory&#x20;|&#x20;awk&#x20;&#039;{print&#x20;&#40;1-&#x20;$3/$2&#x20;&#41;*100}&#039;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0a;module_end&#x0a;',1,'','Memory&#x20;Free&#x20;%','',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&#x0a;module_name&#x20;Pagination&#x20;use&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;&#x20;lsps&#x20;-s&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$2+0}&#039;&#x0a;module_end',1,'','Pagination&#x20;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&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;lssrc&#x20;-a&#x20;|&#x20;grep&#x20;ssh&#x20;|&#x20;grep&#x20;active&#x0a;module_end',2,'','Service&#x20;sshd&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data_string&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;&quot;s/us&#92;.*$//g&quot;&#x20;|&#x20;sed&#x20;&quot;s/,&#92;.*$//g&quot;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0a;module_end&#x0a;',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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_cpuusage&#x20;all&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;',1,'','CPU&#x20;%','',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&#x0a;module_name&#x20;CPU&#x20;User&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$&#40;16&#41;&#x20;}&#039;&#x0a;module_description&#x20;%&#x20;of&#x20;User&#x20;CPU&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;&#x0a;',1,'','CPU&#x20;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&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;&#x0a;module_description&#x20;System&#x20;load&#x20;average&#x0a;module_end&#x0a;',1,'','Load&#x20;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&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;echo&#x20;&quot;&quot;&#x20;&gt;&#x20;/tmp/hpvm_toptest;&#x20;top&#x20;-d&#x20;1&#x20;-f&#x20;/tmp/hpvm_toptest&#x20;2&gt;/dev/null&#x20;1&gt;/dev/null;&#x20;cat&#x20;/tmp/hpvm_toptest&#x20;|&#x20;grep&#x20;-i&#x20;Memory&#x20;|&#x20;head&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$8/&#40;$2+$5&#41;&#x20;*&#x20;100}&#039;&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'','Memory&#x20;Free&#x20;%','',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&#x0a;module_name&#x20;&#x20;Service&#x20;sshd&#x20;status&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;ps&#x20;-ef&#x20;|&#x20;grep&#x20;&#x20;-v&#x20;grep&#x20;|&#x20;grep&#x20;&quot;/opt/ssh/sbin/sshd&quot;&#x20;|&#x20;wc&#x20;-l&#x0a;module_description&#x20;SSH&#x20;running&#x0a;module_end&#x0a;&#x0a;',2,'','Service&#x20;sshd&#x20;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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;echo&#x20;$&#40;&#40;&#40;`ps&#x20;-e&#x20;|&#x20;wc&#x20;-l`&#41;-1&#41;&#41;&#x20;|&#x20;tr&#x20;-d&#x20;&ldquo;&#92;n&rdquo;&#x0a;module_description&#x20;Total&#x20;processes&#x0a;module_end&#x0a;&#x0a;',1,'','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data_string&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0a;module_end&#x0a;',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&#x0a;module_name&#x20;Zombie&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;ps&#x20;-&shy;elf&#x20;|&#x20;awk&#x20;&#039;$2~/&#039;Z&#039;/{print&#x20;$2}&#039;&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;tr&#x20;-d&#x20;&quot;&#92;n&quot;&#x0a;module_description&#x20;Zombie&#x20;processes&#x0a;module_end&#x0a;',1,'','Zombie&#x20;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&#x20;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&#x20;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&#x20;if&#x20;port&#x20;161&#x20;is&#x20;open&#x20;and&#x20;reachable&#x20;for&#x20;Pandora&#x20;FMS&#x20;server.','SNMP&#x20;Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target&#x20;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&#x20;if&#x20;port&#x20;22&#x20;is&#x20;open&#x20;and&#x20;reachable&#x20;for&#x20;Pandora&#x20;FMS&#x20;server.','SSH&#x20;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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;powershell&#x20;-c&#x20;&quot;Get-NetAdapterStatistics&#x20;|Measure-Object&#x20;-Sum&#x20;ReceivedBytes&#x20;|Select&#x20;-ExpandProperty&#x20;Sum&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;','',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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;powershell&#x20;-c&#x20;&quot;Get-NetAdapterStatistics&#x20;|Measure-Object&#x20;-Sum&#x20;SentBytes&#x20;|Select&#x20;-ExpandProperty&#x20;Sum&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;','',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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_cpuusage&#x20;all&#x0a;module_unit&#x20;%&#x0a;module_min_warning&#x20;79.00&#x0a;module_max_warning&#x20;90.00;module_min_critical&#x20;91.00&#x0a;module_max_critical&#x20;00.00;&#x0amodule_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',1,'CPU&#x20;usage&#x20;&#40;%&#41;','CPU&#x20;%','%',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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;tasklist&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;gawk&#x20;&quot;{print&#x20;$1}&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;powershell&#x20;-c&#x20;&quot;&#40;&#40;get-date&#41;&#x20;-&#x20;&#40;gcim&#x20;Win32_OperatingSystem&#41;.LastBootUpTime&#x20;|&#x20;Select&#x20;-ExpandProperty&#x20;Ticks&#41;&#x20;/&#x20;100000&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',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&#x0a;module_name&#x20;WMI&#x20;Service&#x0a;module_type&#x20;generic_proc&#x0a;module_service&#x20;winmgmt&#x0a;module_end&#x0a;&#x0a;',2,'WMI&#x20;Service&#x20;enabled','WMI&#x20;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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;awk&#x20;&#039;!/lo:/&#x20;{s+=$2}END{print&#x20;s}&#039;&#x20;/proc/net/dev&#x0a;module_min_warning&#x20;0&#x0a;module_max_warning&#x20;0&#x0a;module_min_critical&#x20;0&#x0a;module_max_critical&#x20;0&#x0a;module_end&#x0a;&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Received&#41;','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&#x0a;module_name&#x20;Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;&#x0a;module_type&#x20;generic_data_inc&#x0a;module_exec&#x20;awk&#x20;&#039;!/lo:/&#x20;{s+=$10}END{print&#x20;s}&#039;&#x20;/proc/net/dev&#x0a;module_min_warning&#x20;0&#x0a;module_max_warning&#x20;0&#x0a;module_min_critical&#x20;0&#x0a;module_max_critical&#x20;0&#x0a;module_end&#x0a;',4,'','Bytes&#x20;per&#x20;second&#x20;&#40;Sent&#41;','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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$13&#x20;+&#x20;$14&#x20;}&#039;&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;&#x0a;',1,'Current&#x20;use&#x20;of&#x20;CPU&#x20;&#40;System&#x20;+&#x20;User&#41;.','CPU&#x20;%','%',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&#x0a;module_name&#x20;I/O&#x20;Lock&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$16}&#039;&#x0a;module_description&#x20;I/O&#x20;Wait&#x20;Disk&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'','I/O&#x20;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&#x20;&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;cat&#x20;/proc/loadavg&#x20;|awk&#x20;&#039;{print&#x20;$2}&#039;&#x0a;module_end&#x0a;&#x0a;',1,'Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;5&#x20;minutes&#41;.','Load&#x20;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&#x0a;module_name&#x20;Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;echo&#x20;&gt;&#x20;/dev/tcp/127.0.0.1/22&#x20;&gt;/dev/null&#x20;2&gt;&amp;1&#x20;&amp;&amp;&#x20;echo&#x20;1&#x20;||&#x20;echo&#x20;0&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',2,'Checks&#x20;if&#x20;port&#x20;22&#x20;&#40;SSH&#41;&#x20;is&#x20;listening.','Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;','',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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;ps&#x20;ax&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;wc&#x20;-l&#x0a;module_description&#x20;Total&#x20;processes&#x0a;module_end',1,'','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;awk&#x20;&#039;{print&#x20;$1*100}&#039;&#x20;/proc/uptime&#x0a;module_end&#x0a;',1,'Host&#x20;Up&#x20;time&#x20;&#40;Timeticks&#41;','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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;1&#x20;|&#x20;tail&#x20;-1|&#x20;awk&#x20;&#039;{print&#x20;&#40;100-$NF&#41;}&#039;&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;',1,'CPU&#x20;usage&#x20;%','CPU&#x20;%','%',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&#x0d;&#x0a;module_name&#x20;Disk&#x20;/&#x20;usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-k&#x20;/&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;tr&#x20;-d&#x20;&quot;%&quot;&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$5}&#039;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'Disk&#x20;use&#x20;percentage&#x20;for&#x20;root&#x20;partition&#x20;&#40;/&#41;','Disk&#x20;/&#x20;usage&#x20;&#40;%&#41;','',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&#x0d;&#x0a;module_name&#x20;Disk&#x20;/var&#x20;usage&#x20;&#40;%&#41;&#x0d;&#x0a;module_type&#x20;generic_data&#x0d;&#x0a;module_exec&#x20;df&#x20;-k&#x20;/var&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;tr&#x20;-d&#x20;&quot;%&quot;&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$5}&#039;&#x0d;&#x0a;module_end&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;&#x0d;&#x0a;',1,'Disk&#x20;use&#x20;percentage&#x20;for&#x20;var&#x20;partition&#x20;&#40;/var&#41;','Disk&#x20;/var&#x20;usage&#x20;&#40;%&#41;','',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&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;&#x0a;module_end&#x0a;',1,'Load&#x20;average','Load&#x20;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&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_freepercentmemory&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',1,'Percentage&#x20;Mem&#x20;Free','Memory&#x20;Free&#x20;%','',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&#x0a;module_name&#x20;Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;timeout&#x20;1&#x20;bash&#x20;-c&#x20;&quot;echo&#x20;&gt;&#x20;/dev/tcp/127.0.0.1/22&quot;&#x20;&gt;/dev/null&#x20;2&gt;&amp;1&#x20;&amp;&amp;&#x20;echo&#x20;1&#x20;||&#x20;echo&#x20;0&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;',2,'Checks&#x20;if&#x20;port&#x20;22&#x20;&#40;SSH&#41;&#x20;is&#x20;listening.','Port&#x20;22&#x20;Open&#x20;&#40;SSH&#41;','',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&#x0a;module_name&#x20;Swap&#x20;Used&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;swap&#x20;-l&#x20;|tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;100&#x20;-&#x20;&#40;$NF&#x20;/&#x20;$&#40;NF-1&#41;&#x20;*&#x20;100&#41;}&#039;&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'Swap&#x20;memory&#x20;available&#x20;in&#x20;%','Swap&#x20;Used&#x20;%','%',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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;ps&#x20;-A&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$1}&#039;&#x0a;module_end',1,'Total&#x20;processes','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;perl&#x20;-e&#x20;&quot;print&#x20;100*&#40;time&#x20;-&#x20;$&#40;kstat&#x20;-p&#x20;unix:0:system_misc:boot_time&#x20;|awk&#x20;&#039;{print&#x20;$2}&#039;&#41;&#41;&quot;&#x0a;module_end&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;&#x0a;',1,'Host&#x20;Up&#x20;time&#x20;&#40;Timeticks&#41;','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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;sar&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;100&#x20;-&#x20;$5}&#039;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;in&#x20;%&#x0a;module_unit&#x20;%&#x0a;module_end',1,'','CPU&#x20;%','%',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&#x0a;module_name&#x20;CPU&#x20;User&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;sar&#x20;1&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$2}&#039;&#x0a;module_description&#x20;CPU&#x20;usage&#x20;in&#x20;%&#x0a;module_unit&#x20;%&#x0a;module_end',1,'','CPU&#x20;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&#x20;&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;*1}&#039;&#x20;&#x0a;module_description&#x20;Average&#x20;process&#x20;in&#x20;CPU&#x20;&#40;Last&#x20;minute&#41;&#x20;&#x0a;module_end',1,'','Load&#x20;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&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;svmon&#x20;-G|grep&#x20;memory&#x20;|&#x20;awk&#x20;&#039;{print&#x20;&#40;1-&#x20;$3/$2&#x20;&#41;*100}&#039;&#x0a;module_description&#x20;Percentage&#x20;Mem&#x20;Free&#x0a;module_end&#x0a;',1,'','Memory&#x20;Free&#x20;%','',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&#x0a;module_name&#x20;Pagination&#x20;use&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;&#x20;lsps&#x20;-s&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$2+0}&#039;&#x0a;module_end',1,'','Pagination&#x20;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&#x0a;module_name&#x20;Service&#x20;sshd&#x20;status&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;lssrc&#x20;-a&#x20;|&#x20;grep&#x20;ssh&#x20;|&#x20;grep&#x20;active&#x0a;module_end',2,'','Service&#x20;sshd&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data_string&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;&quot;s/us&#92;.*$//g&quot;&#x20;|&#x20;sed&#x20;&quot;s/,&#92;.*$//g&quot;&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0a;module_end&#x0a;',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&#x0a;module_name&#x20;CPU&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_cpuusage&#x20;all&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;',1,'','CPU&#x20;%','',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&#x0a;module_name&#x20;CPU&#x20;User&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;vmstat&#x20;1&#x20;2&#x20;|&#x20;tail&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{&#x20;print&#x20;$&#40;16&#41;&#x20;}&#039;&#x0a;module_description&#x20;%&#x20;of&#x20;User&#x20;CPU&#x0a;module_unit&#x20;%&#x0a;module_end&#x0a;&#x0a;',1,'','CPU&#x20;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&#x0a;module_name&#x20;Load&#x20;Average&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-2&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;&#x0a;module_description&#x20;System&#x20;load&#x20;average&#x0a;module_end&#x0a;',1,'','Load&#x20;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&#x0a;module_name&#x20;Memory&#x20;Free&#x20;%&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;echo&#x20;&quot;&quot;&#x20;&gt;&#x20;/tmp/hpvm_toptest;&#x20;top&#x20;-d&#x20;1&#x20;-f&#x20;/tmp/hpvm_toptest&#x20;2&gt;/dev/null&#x20;1&gt;/dev/null;&#x20;cat&#x20;/tmp/hpvm_toptest&#x20;|&#x20;grep&#x20;-i&#x20;Memory&#x20;|&#x20;head&#x20;-1&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$8/&#40;$2+$5&#41;&#x20;*&#x20;100}&#039;&#x0a;module_end&#x0a;&#x0a;&#x0a;',1,'','Memory&#x20;Free&#x20;%','',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&#x0a;module_name&#x20;&#x20;Service&#x20;sshd&#x20;status&#x0a;module_type&#x20;generic_proc&#x0a;module_exec&#x20;ps&#x20;-ef&#x20;|&#x20;grep&#x20;&#x20;-v&#x20;grep&#x20;|&#x20;grep&#x20;&quot;/opt/ssh/sbin/sshd&quot;&#x20;|&#x20;wc&#x20;-l&#x0a;module_description&#x20;SSH&#x20;running&#x0a;module_end&#x0a;&#x0a;',2,'','Service&#x20;sshd&#x20;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&#x0a;module_name&#x20;Total&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;echo&#x20;$&#40;&#40;&#40;`ps&#x20;-e&#x20;|&#x20;wc&#x20;-l`&#41;-1&#41;&#41;&#x20;|&#x20;tr&#x20;-d&#x20;&ldquo;&#92;n&rdquo;&#x0a;module_description&#x20;Total&#x20;processes&#x0a;module_end&#x0a;&#x0a;',1,'','Total&#x20;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&#x0a;module_name&#x20;Uptime&#x0a;module_type&#x20;generic_data_string&#x0a;module_exec&#x20;uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g&#x0a;module_description&#x20;Host&#x20;Up&#x20;time&#x0a;module_end&#x0a;',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&#x0a;module_name&#x20;Zombie&#x20;processes&#x0a;module_type&#x20;generic_data&#x0a;module_exec&#x20;ps&#x20;-&shy;elf&#x20;|&#x20;awk&#x20;&#039;$2~/&#039;Z&#039;/{print&#x20;$2}&#039;&#x20;|&#x20;wc&#x20;-l&#x20;|&#x20;tr&#x20;-d&#x20;&quot;&#92;n&quot;&#x0a;module_description&#x20;Zombie&#x20;processes&#x0a;module_end&#x0a;',1,'','Zombie&#x20;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&#x20;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&#x20;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&#x20;if&#x20;port&#x20;161&#x20;is&#x20;open&#x20;and&#x20;reachable&#x20;for&#x20;Pandora&#x20;FMS&#x20;server.','SNMP&#x20;Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target&#x20;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&#x20;if&#x20;port&#x20;22&#x20;is&#x20;open&#x20;and&#x20;reachable&#x20;for&#x20;Pandora&#x20;FMS&#x20;server.','SSH&#x20;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&#x20;//B&#x20;&quot;%ProgramFiles%&#92;Pandora_Agent&#92;util&#92;df_percent_used.vbs&quot;',0);
INSERT INTO `tpolicy_plugins` VALUES (2,1,'cscript.exe&#x20;//B&#x20;&quot;%ProgramFiles%&#92;Pandora_Agent&#92;util&#92;mem_percent_used.vbs&quot;',0);

View File

@ -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 ?

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 ");
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_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_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_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_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> <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> <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> <ignore_unknown>]
\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('--create_module_group', '<module_group_name>');
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('--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_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_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_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_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> <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> <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
<critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", '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');
<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> <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('--add_collection_to_policy', "<policy_name> <collection_name>");
help_screen_line('--validate_policy_alerts', '<policy_name>', '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') {