Merge remote-tracking branch 'origin/develop' into ent-8130-ncm-fase-2

Conflicts:
	pandora_console/extras/mr/51.sql
This commit is contained in:
fbsanchez 2021-12-03 10:24:01 +01:00
commit 3e7a81ea33
45 changed files with 855 additions and 232 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.758.1-211202 Version: 7.0NG.758.1-211203
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.758.1-211202" pandora_version="7.0NG.758.1-211203"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.758.1'; use constant AGENT_VERSION => '7.0NG.758.1';
use constant AGENT_BUILD => '211202'; use constant AGENT_BUILD => '211203';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.758.1" PI_VERSION="7.0NG.758.1"
PI_BUILD="211202" PI_BUILD="211203"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{211202} {211203}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.758.1 Build 211202") #define PANDORA_VERSION ("7.0NG.758.1 Build 211203")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.758.1(Build 211202))" VALUE "ProductVersion", "(7.0NG.758.1(Build 211203))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.758.1-211202 Version: 7.0NG.758.1-211203
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.758.1-211202" pandora_version="7.0NG.758.1-211203"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -2,6 +2,13 @@ START TRANSACTION;
ALTER TABLE `tagente_modulo` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0; ALTER TABLE `tagente_modulo` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tagente_modulo` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0; ALTER TABLE `tagente_modulo` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tnetwork_component` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tnetwork_component` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tlocal_component` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tlocal_component` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tpolicy_modules` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tpolicy_modules` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE tagente_modulo MODIFY debug_content TEXT; ALTER TABLE tagente_modulo MODIFY debug_content TEXT;
CREATE TABLE IF NOT EXISTS `tncm_queue` ( CREATE TABLE IF NOT EXISTS `tncm_queue` (

View File

@ -172,6 +172,8 @@ ALTER TABLE tagente_modulo ADD COLUMN `dynamic_min` bigint(20) default '0';
ALTER TABLE tagente_modulo ADD COLUMN `prediction_sample_window` int(10) default 0; ALTER TABLE tagente_modulo ADD COLUMN `prediction_sample_window` int(10) default 0;
ALTER TABLE tagente_modulo ADD COLUMN `prediction_samples` int(4) default 0; ALTER TABLE tagente_modulo ADD COLUMN `prediction_samples` int(4) default 0;
ALTER TABLE tagente_modulo ADD COLUMN `prediction_threshold` int(4) default 0; ALTER TABLE tagente_modulo ADD COLUMN `prediction_threshold` int(4) default 0;
ALTER TABLE tagente_modulo ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE tagente_modulo ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tagente_estado` -- Table `tagente_estado`
@ -189,3 +191,21 @@ ALTER TABLE tgraph_source ADD COLUMN `id_server` int(11) NOT NULL default 0;
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
ALTER TABLE tevent_filter ADD COLUMN `id_agent_module` int(25) DEFAULT 0; ALTER TABLE tevent_filter ADD COLUMN `id_agent_module` int(25) DEFAULT 0;
ALTER TABLE tevent_filter ADD COLUMN `id_agent` int(25) DEFAULT 0; ALTER TABLE tevent_filter ADD COLUMN `id_agent` int(25) DEFAULT 0;
-- ---------------------------------------------------------------------
-- Table `tevent_filter`
-- ---------------------------------------------------------------------
ALTER TABLE `tnetwork_component` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tnetwork_component` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
-- ---------------------------------------------------------------------
-- Table `tevent_filter`
-- ---------------------------------------------------------------------
ALTER TABLE `tlocal_component` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tlocal_component` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;
-- ---------------------------------------------------------------------
-- Table `tevent_filter`
-- ---------------------------------------------------------------------
ALTER TABLE `tpolicy_modules` ADD COLUMN `percentage_critical` tinyint(1) UNSIGNED DEFAULT 0;
ALTER TABLE `tpolicy_modules` ADD COLUMN `percentage_warning` tinyint(1) UNSIGNED DEFAULT 0;

View File

@ -96,6 +96,8 @@ if (isset($_POST['template_id'])) {
'str_critical' => $row2['str_critical'], 'str_critical' => $row2['str_critical'],
'critical_inverse' => $row2['critical_inverse'], 'critical_inverse' => $row2['critical_inverse'],
'warning_inverse' => $row2['warning_inverse'], 'warning_inverse' => $row2['warning_inverse'],
'percentage_warning' => $row2['percentage_warning'],
'percentage_critical' => $row2['percentage_critical'],
'critical_instructions' => $row2['critical_instructions'], 'critical_instructions' => $row2['critical_instructions'],
'warning_instructions' => $row2['warning_instructions'], 'warning_instructions' => $row2['warning_instructions'],
'unknown_instructions' => $row2['unknown_instructions'], 'unknown_instructions' => $row2['unknown_instructions'],

View File

@ -1544,6 +1544,8 @@ if ($update_module || $create_module) {
$unknown_instructions = (string) get_parameter('unknown_instructions'); $unknown_instructions = (string) get_parameter('unknown_instructions');
$critical_inverse = (int) get_parameter('critical_inverse'); $critical_inverse = (int) get_parameter('critical_inverse');
$warning_inverse = (int) get_parameter('warning_inverse'); $warning_inverse = (int) get_parameter('warning_inverse');
$percentage_critical = (int) get_parameter('percentage_critical');
$percentage_warning = (int) get_parameter('percentage_warning');
$id_category = (int) get_parameter('id_category'); $id_category = (int) get_parameter('id_category');
@ -1697,6 +1699,8 @@ if ($update_module) {
'unknown_instructions' => $unknown_instructions, 'unknown_instructions' => $unknown_instructions,
'critical_inverse' => $critical_inverse, 'critical_inverse' => $critical_inverse,
'warning_inverse' => $warning_inverse, 'warning_inverse' => $warning_inverse,
'percentage_critical' => $percentage_critical,
'percentage_warning' => $percentage_warning,
'cron_interval' => $cron_interval, 'cron_interval' => $cron_interval,
'id_category' => $id_category, 'id_category' => $id_category,
'disabled_types_event' => addslashes($disabled_types_event), 'disabled_types_event' => addslashes($disabled_types_event),
@ -1903,6 +1907,8 @@ if ($create_module) {
'unknown_instructions' => $unknown_instructions, 'unknown_instructions' => $unknown_instructions,
'critical_inverse' => $critical_inverse, 'critical_inverse' => $critical_inverse,
'warning_inverse' => $warning_inverse, 'warning_inverse' => $warning_inverse,
'percentage_critical' => $percentage_critical,
'percentage_warning' => $percentage_warning,
'cron_interval' => $cron_interval, 'cron_interval' => $cron_interval,
'id_category' => $id_category, 'id_category' => $id_category,
'disabled_types_event' => addslashes($disabled_types_event), 'disabled_types_event' => addslashes($disabled_types_event),

View File

@ -704,6 +704,8 @@ if ((bool) $checked === true) {
'quiet', 'quiet',
'critical_inverse', 'critical_inverse',
'warning_inverse', 'warning_inverse',
'percentage_critical',
'percentage_warning',
'id_policy_module', 'id_policy_module',
] ]
); );

View File

@ -99,6 +99,9 @@ if (is_ajax()) {
$component['str_critical'] = io_safe_output($component['str_critical']); $component['str_critical'] = io_safe_output($component['str_critical']);
$component['warning_inverse'] = (bool) $component['warning_inverse']; $component['warning_inverse'] = (bool) $component['warning_inverse'];
$component['critical_inverse'] = (bool) $component['critical_inverse']; $component['critical_inverse'] = (bool) $component['critical_inverse'];
$component['percentage_warning'] = (bool) $component['percentage_warning'];
$component['percentage_critical'] = (bool) $component['percentage_critical'];
echo io_json_mb_encode($component); echo io_json_mb_encode($component);
return; return;
@ -328,6 +331,9 @@ if ($id_agent_module) {
$critical_inverse = $module['critical_inverse']; $critical_inverse = $module['critical_inverse'];
$warning_inverse = $module['warning_inverse']; $warning_inverse = $module['warning_inverse'];
$percentage_critical = $module['percentage_critical'];
$percentage_warning = $module['percentage_warning'];
$id_category = $module['id_category']; $id_category = $module['id_category'];
@ -467,6 +473,8 @@ if ($id_agent_module) {
$critical_inverse = ''; $critical_inverse = '';
$warning_inverse = ''; $warning_inverse = '';
$percentage_critical = '';
$percentage_warning = '';
$each_ff = 0; $each_ff = 0;
$ff_event_normal = ''; $ff_event_normal = '';

View File

@ -456,8 +456,16 @@ if (modules_is_string_type($id_module_type) || $edit) {
).'</span>'; ).'</span>';
} }
$table_simple->data[2][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table_simple->data[2][1] .= '<div id="warning_inverse"><em>'.__('Inverse interval').'</em>';
$table_simple->data[2][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy); $table_simple->data[2][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy);
$table_simple->data[2][1] .= '</div>';
if (modules_is_string_type($id_module_type) === false) {
$table_simple->data[2][1] .= '<div id="percentage_warning"><em>'.__('Percentage').'</em>';
$table_simple->data[2][1] .= html_print_checkbox('percentage_warning', 1, $percentage_warning, true, $disabledBecauseInPolicy);
$table_simple->data[2][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$table_simple->data[2][1] .= '</div>';
}
if (!modules_is_string_type($id_module_type) || $edit) { if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[2][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>'; $table_simple->data[2][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
@ -509,8 +517,17 @@ if (modules_is_string_type($id_module_type) || $edit) {
).'</span>'; ).'</span>';
} }
$table_simple->data[3][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table_simple->data[3][1] .= '<div id="critical_inverse"><em>'.__('Inverse interval').'</em>';
$table_simple->data[3][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy); $table_simple->data[3][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy);
$table_simple->data[3][1] .= '</div>';
if (modules_is_string_type($id_module_type) === false) {
$table_simple->data[3][1] .= '<div id="percentage_critical" /><em>'.__('Percentage').'</em>';
$table_simple->data[3][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$table_simple->data[3][1] .= html_print_checkbox('percentage_critical', 1, $percentage_critical, true, $disabledBecauseInPolicy);
$table_simple->data[3][1] .= '</div>';
}
$table_simple->data[4][0] = __('Historical data'); $table_simple->data[4][0] = __('Historical data');
if ($disabledBecauseInPolicy) { if ($disabledBecauseInPolicy) {
@ -1551,6 +1568,8 @@ $(document).ready (function () {
$('#minmax_critical').show(); $('#minmax_critical').show();
$('#minmax_warning').show(); $('#minmax_warning').show();
$('#svg_dinamic').show(); $('#svg_dinamic').show();
$('#percentage_warning').show();
$('#percentage_critical').show();
} }
else { else {
// String types // String types
@ -1559,6 +1578,8 @@ $(document).ready (function () {
$('#minmax_critical').hide(); $('#minmax_critical').hide();
$('#minmax_warning').hide(); $('#minmax_warning').hide();
$('#svg_dinamic').hide(); $('#svg_dinamic').hide();
$('#percentage_warning').hide();
$('#percentage_critical').hide();
} }
if (type_name_selected.match(/async/) == null) { if (type_name_selected.match(/async/) == null) {
@ -1628,11 +1649,64 @@ $(document).ready (function () {
$('#text-max_critical').val(0); $('#text-max_critical').val(0);
} }
}); });
if ($('#checkbox-warning_inverse').prop('checked') === true) {
$('#percentage_warning').hide();
}
if ($('#checkbox-critical_inverse').prop('checked') === true) {
$('#percentage_critical').hide();
}
if ($('#checkbox-percentage_warning').prop('checked') === true) {
$('#warning_inverse').hide();
}
if ($('#checkbox-percentage_critical').prop('checked') === true) {
$('#critical_inverse').hide();
}
$('#checkbox-warning_inverse').change (function() { $('#checkbox-warning_inverse').change (function() {
paint_graph_values(); paint_graph_values();
}); if ($('#checkbox-warning_inverse').prop('checked') === true){
$('#checkbox-percentage_warning').prop('checked', false);
$('#percentage_warning').hide();
} else {
$('#percentage_warning').show();
}
});
$('#checkbox-critical_inverse').change (function() { $('#checkbox-critical_inverse').change (function() {
paint_graph_values(); paint_graph_values();
if ($('#checkbox-critical_inverse').prop('checked') === true){
$('#checkbox-percentage_critical').prop('checked', false);
$('#percentage_critical').hide();
} else {
$('#percentage_critical').show();
}
});
$('#checkbox-percentage_warning').change (function() {
paint_graph_values();
if ($('#checkbox-percentage_warning').prop('checked') === true){
$('#checkbox-warning_inverse').prop('checked', false);
$('#warning_inverse').hide();
} else {
$('#warning_inverse').show();
}
});
$('#checkbox-percentage_critical').change (function() {
paint_graph_values();
if ($('#checkbox-percentage_critical').prop('checked') === true){
$('#checkbox-critical_inverse').prop('checked', false);
$('#critical_inverse').hide();
}
else {
$('#critical_inverse').show();
}
}); });
}); });
@ -1915,6 +1989,43 @@ function paint_graph_values(){
//messages error //messages error
var message_error_warning = '<?php echo __('Please introduce a maximum warning higher than the minimun warning'); ?>'; var message_error_warning = '<?php echo __('Please introduce a maximum warning higher than the minimun warning'); ?>';
var message_error_critical = '<?php echo __('Please introduce a maximum critical higher than the minimun critical'); ?>'; var message_error_critical = '<?php echo __('Please introduce a maximum critical higher than the minimun critical'); ?>';
var message_error_percentage = '<?php echo __('Please introduce a positive percentage value'); ?>';
//Percentage selector
var percentage_w = $('#checkbox-percentage_warning').prop('checked');
var percentage_c = $('#checkbox-percentage_critical').prop('checked');
if(percentage_w == true || percentage_c == true) {
d3.select("#svg_dinamic rect").remove();
//create svg
var svg = d3.select("#svg_dinamic");
svg.selectAll("g").remove();
if (percentage_w === true) {
if(max_w < 0 || min_w < 0) {
paint_graph_status(0,0,0,0,0,0,1,0,legend_normal,legend_warning,legend_critical,message_error_percentage,message_error_percentage);
} else {
$("#text-max_warning").removeClass("input_error");
$("#text-min_warning").removeClass("input_error");
}
}
if(percentage_c === true) {
if(max_c < 0 || min_c < 0) {
paint_graph_status(0,0,0,0,0,0,0,1,legend_normal,legend_warning,legend_critical,message_error_percentage,message_error_percentage);
} else {
$("#text-min-critical").removeClass("input_error");
$("#text-max_critical").removeClass("input_error");
}
}
return;
} else {
$('#svg_dinamic').show();
}
//if haven't error //if haven't error
if(max_w == 0 || max_w > min_w){ if(max_w == 0 || max_w > min_w){

View File

@ -613,6 +613,28 @@ $table->data['edit1'][1] = '<table width="100%">';
); );
$table->data['edit1'][1] .= '</td>'; $table->data['edit1'][1] .= '</td>';
$table->data['edit1'][1] .= '</tr>'; $table->data['edit1'][1] .= '</tr>';
$table->data['edit1'][1] .= '<tr>';
$table->data['edit1'][1] .= '<td>';
$table->data['edit1'][1] .= '<em>'.__('Percentage').'</em>';
$table->data['edit1'][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$table->data['edit1'][1] .= '</td>';
$table->data['edit1'][1] .= '<td align="right">';
$table->data['edit1'][1] .= html_print_select(
[
'' => __('No change'),
'1' => __('Yes'),
'0' => __('No'),
],
'percentage_warning',
'',
'',
'',
'',
true
);
$table->data['edit1'][1] .= '</td>';
$table->data['edit1'][1] .= '</tr>';
$table->data['edit1'][1] .= '</table>'; $table->data['edit1'][1] .= '</table>';
$table->data['edit1'][2] = __('Critical status'); $table->data['edit1'][2] = __('Critical status');
@ -682,6 +704,28 @@ $table->data['edit1'][1] = '<table width="100%">';
); );
$table->data['edit1'][3] .= '</td>'; $table->data['edit1'][3] .= '</td>';
$table->data['edit1'][3] .= '</tr>'; $table->data['edit1'][3] .= '</tr>';
$table->data['edit1'][3] .= '<tr>';
$table->data['edit1'][3] .= '<td>';
$table->data['edit1'][3] .= '<em>'.__('Percentage').'</em>';
$table->data['edit1'][3] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$table->data['edit1'][3] .= '</td>';
$table->data['edit1'][3] .= '<td align="right">';
$table->data['edit1'][3] .= html_print_select(
[
'' => __('No change'),
'1' => __('Yes'),
'0' => __('No'),
],
'percentage_critical',
'',
'',
'',
'',
true
);
$table->data['edit1'][3] .= '</td>';
$table->data['edit1'][3] .= '</tr>';
$table->data['edit1'][3] .= '</table>'; $table->data['edit1'][3] .= '</table>';
$table->data['edit1_1'][0] = '<b>'.__('Description').'</b>'; $table->data['edit1_1'][0] = '<b>'.__('Description').'</b>';
@ -1571,6 +1615,12 @@ $(document).ready (function () {
else if (this.id == "checkbox-warning_inverse") { else if (this.id == "checkbox-warning_inverse") {
return; //Do none return; //Do none
} }
else if (this.id == "checkbox-percentage_critical") {
return; //Do none
}
else if (this.id == "checkbox-percentage_warning") {
return; //Do none
}
else if (this.id == "checkbox-critical_inverse") { else if (this.id == "checkbox-critical_inverse") {
return; //Do none return; //Do none
} }
@ -1829,6 +1879,31 @@ $(document).ready (function () {
} }
} }
}); });
$('#warning_inverse').change(function() {
if($(this).val() == 1) {
$("#percentage_warning").val('0').change()
}
});
$('#critical_inverse').change(function() {
if($(this).val() == 1) {
$("#percentage_critical").val('0').change();
}
});
$('#percentage_warning').change(function() {
if($(this).val() == 1) {
$("#warning_inverse").val('0').change()
}
});
$('#percentage_critical').change(function() {
if($(this).val() == 1) {
$("#critical_inverse").val('0').change()
}
});
}); });
@ -1950,6 +2025,8 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
'history_data', 'history_data',
'critical_inverse', 'critical_inverse',
'warning_inverse', 'warning_inverse',
'percentage_warning',
'percentage_critical',
'critical_instructions', 'critical_instructions',
'warning_instructions', 'warning_instructions',
'unknown_instructions', 'unknown_instructions',

View File

@ -130,6 +130,9 @@ $warning_instructions = (string) get_parameter('warning_instructions');
$unknown_instructions = (string) get_parameter('unknown_instructions'); $unknown_instructions = (string) get_parameter('unknown_instructions');
$critical_inverse = (int) get_parameter('critical_inverse'); $critical_inverse = (int) get_parameter('critical_inverse');
$warning_inverse = (int) get_parameter('warning_inverse'); $warning_inverse = (int) get_parameter('warning_inverse');
$percentage_critical = (int) get_parameter('percentage_critical');
$percentage_warning = (int) get_parameter('percentage_warning');
$id_category = (int) get_parameter('id_category'); $id_category = (int) get_parameter('id_category');
$id_tag_selected = (array) get_parameter('id_tag_selected'); $id_tag_selected = (array) get_parameter('id_tag_selected');
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
@ -383,6 +386,8 @@ if ($is_management_allowed === true && $create_component) {
'unknown_instructions' => $unknown_instructions, 'unknown_instructions' => $unknown_instructions,
'critical_inverse' => $critical_inverse, 'critical_inverse' => $critical_inverse,
'warning_inverse' => $warning_inverse, 'warning_inverse' => $warning_inverse,
'percentage_warning' => $percentage_warning,
'percentage_critical' => $percentage_critical,
'id_category' => $id_category, 'id_category' => $id_category,
'tags' => $tags, 'tags' => $tags,
'disabled_types_event' => $disabled_types_event, 'disabled_types_event' => $disabled_types_event,
@ -482,6 +487,8 @@ if ($is_management_allowed === true && $update_component) {
'unknown_instructions' => $unknown_instructions, 'unknown_instructions' => $unknown_instructions,
'critical_inverse' => $critical_inverse, 'critical_inverse' => $critical_inverse,
'warning_inverse' => $warning_inverse, 'warning_inverse' => $warning_inverse,
'percentage_warning' => $percentage_warning,
'percentage_critical' => $percentage_critical,
'id_category' => $id_category, 'id_category' => $id_category,
'tags' => $tags, 'tags' => $tags,
'disabled_types_event' => $disabled_types_event, 'disabled_types_event' => $disabled_types_event,

View File

@ -93,6 +93,8 @@ if ($create_network_from_module) {
$unknown_instructions = $data_module['unknown_instructions']; $unknown_instructions = $data_module['unknown_instructions'];
$critical_inverse = $data_module['critical_inverse']; $critical_inverse = $data_module['critical_inverse'];
$warning_inverse = $data_module['warning_inverse']; $warning_inverse = $data_module['warning_inverse'];
$percentage_critical = $data_module['percentage_critical'];
$percentage_warning = $data_module['percentage_warning'];
$id_category = $data_module['id_category']; $id_category = $data_module['id_category'];
$ff_event_normal = $data_module['min_ff_event_normal']; $ff_event_normal = $data_module['min_ff_event_normal'];
$ff_event_warning = $data_module['min_ff_event_warning']; $ff_event_warning = $data_module['min_ff_event_warning'];
@ -150,7 +152,9 @@ if (isset($id)) {
$warning_instructions = $component['warning_instructions']; $warning_instructions = $component['warning_instructions'];
$unknown_instructions = $component['unknown_instructions']; $unknown_instructions = $component['unknown_instructions'];
$critical_inverse = $component['critical_inverse']; $critical_inverse = $component['critical_inverse'];
$percentage_critical = $component['percentage_critical'];
$warning_inverse = $component['warning_inverse']; $warning_inverse = $component['warning_inverse'];
$percentage_warning = $component['percentage_warning'];
$id_category = $component['id_category']; $id_category = $component['id_category'];
$tags = $component['tags']; $tags = $component['tags'];
$ff_event_normal = $component['min_ff_event_normal']; $ff_event_normal = $component['min_ff_event_normal'];
@ -233,6 +237,8 @@ if (isset($id)) {
$unknown_instructions = ''; $unknown_instructions = '';
$critical_inverse = 0; $critical_inverse = 0;
$warning_inverse = 0; $warning_inverse = 0;
$percentage_critical = 0;
$percentage_warning = 0;
$id_category = 0; $id_category = 0;
$tags = ''; $tags = '';
$ff_event_normal = 0; $ff_event_normal = 0;
@ -823,6 +829,60 @@ $(document).ready (function () {
}); });
$("#snmp_version" ).trigger("change"); $("#snmp_version" ).trigger("change");
if ($('#checkbox-warning_inverse').prop('checked') === true) {
$('#percentage_warning').hide();
}
if ($('#checkbox-critical_inverse').prop('checked') === true) {
$('#percentage_critical').hide();
}
if ($('#checkbox-percentage_warning').prop('checked') === true) {
$('#warning_inverse').hide();
}
if ($('#checkbox-percentage_critical').prop('checked') === true) {
$('#critical_inverse').hide();
}
$('#checkbox-warning_inverse').change (function() {
if ($('#checkbox-warning_inverse').prop('checked') === true){
$('#checkbox-percentage_warning').prop('checked', false);
$('#percentage_warning').hide();
} else {
$('#percentage_warning').show();
}
});
$('#checkbox-critical_inverse').change (function() {
if ($('#checkbox-critical_inverse').prop('checked') === true){
$('#checkbox-percentage_critical').prop('checked', false);
$('#percentage_critical').hide();
} else {
$('#percentage_critical').show();
}
});
$('#checkbox-percentage_warning').change (function() {
if ($('#checkbox-percentage_warning').prop('checked') === true){
$('#checkbox-warning_inverse').prop('checked', false);
$('#warning_inverse').hide();
} else {
$('#warning_inverse').show();
}
});
$('#checkbox-percentage_critical').change (function() {
if ($('#checkbox-percentage_critical').prop('checked') === true){
$('#checkbox-critical_inverse').prop('checked', false);
$('#critical_inverse').hide();
}
else {
$('#critical_inverse').show();
}
});
}); });
<?php <?php

View File

@ -13,6 +13,8 @@
// GNU General Public License for more details. // GNU General Public License for more details.
global $config; global $config;
require_once $config['homedir'].'/include/graphs/functions_d3.php'; require_once $config['homedir'].'/include/graphs/functions_d3.php';
include_javascript_d3();
if (! check_acl($config['id_user'], 0, 'PM') && ! check_acl($config['id_user'], 0, 'AW')) { if (! check_acl($config['id_user'], 0, 'PM') && ! check_acl($config['id_user'], 0, 'AW')) {
db_pandora_audit( db_pandora_audit(
@ -185,8 +187,14 @@ $table->data[4][1] .= html_print_input_text(
1024, 1024,
true true
).'</span>'; ).'</span>';
$table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table->data[4][1] .= '<div id="warning_inverse"><em>'.__('Inverse interval').'</em>';
$table->data[4][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true); $table->data[4][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true);
$table->data[4][1] .= '</div>';
$table->data[4][1] .= '<div id="percentage_warning"><em>'.__('Percentage').'</em>';
$table->data[4][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$table->data[4][1] .= html_print_checkbox('percentage_warning', 1, $percentage_warning, true);
$table->data[4][1] .= '</div>';
$table->data[4][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>'; $table->data[4][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
$table->colspan[4][2] = 2; $table->colspan[4][2] = 2;
@ -220,8 +228,15 @@ $table->data[5][1] .= html_print_input_text(
1024, 1024,
true true
).'</span>'; ).'</span>';
$table->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table->data[5][1] .= '<div id="critical_inverse"><em>'.__('Inverse interval').'</em>';
$table->data[5][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true); $table->data[5][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true);
$table->data[5][1] .= '</div>';
$table->data[5][1] .= '<div id="percentage_critical"><em>'.__('Percentage').'</em>';
$table->data[5][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$table->data[5][1] .= html_print_checkbox('percentage_critical', 1, $percentage_critical, true);
$table->data[5][1] .= '</div>';
$table->data[6][0] = __('FF threshold'); $table->data[6][0] = __('FF threshold');
$table->colspan[6][1] = 3; $table->colspan[6][1] = 3;
@ -518,6 +533,9 @@ $next_row++;
$('#string_warning').hide(); $('#string_warning').hide();
$('#minmax_critical').show(); $('#minmax_critical').show();
$('#minmax_warning').show(); $('#minmax_warning').show();
$('#percentage_warning').show();
$('#percentage_critical').show();
} }
else { else {
// String types // String types
@ -525,6 +543,8 @@ $next_row++;
$('#string_warning').show(); $('#string_warning').show();
$('#minmax_critical').hide(); $('#minmax_critical').hide();
$('#minmax_warning').hide(); $('#minmax_warning').hide();
$('#percentage_warning').hide();
$('#percentage_critical').hide();
} }
}); });
@ -566,11 +586,64 @@ $next_row++;
$('#text-max_critical').val(0); $('#text-max_critical').val(0);
} }
}); });
if ($('#checkbox-warning_inverse').prop('checked') === true) {
$('#percentage_warning').hide();
}
if ($('#checkbox-critical_inverse').prop('checked') === true) {
$('#percentage_critical').hide();
}
if ($('#checkbox-percentage_warning').prop('checked') === true) {
$('#warning_inverse').hide();
}
if ($('#checkbox-percentage_critical').prop('checked') === true) {
$('#critical_inverse').hide();
}
$('#checkbox-warning_inverse').change (function() { $('#checkbox-warning_inverse').change (function() {
paint_graph_values(); paint_graph_values();
}); if ($('#checkbox-warning_inverse').prop('checked') === true){
$('#checkbox-percentage_warning').prop('checked', false);
$('#percentage_warning').hide();
} else {
$('#percentage_warning').show();
}
});
$('#checkbox-critical_inverse').change (function() { $('#checkbox-critical_inverse').change (function() {
paint_graph_values(); paint_graph_values();
if ($('#checkbox-critical_inverse').prop('checked') === true){
$('#checkbox-percentage_critical').prop('checked', false);
$('#percentage_critical').hide();
} else {
$('#percentage_critical').show();
}
});
$('#checkbox-percentage_warning').change (function() {
paint_graph_values();
if ($('#checkbox-percentage_warning').prop('checked') === true){
$('#checkbox-warning_inverse').prop('checked', false);
$('#warning_inverse').hide();
} else {
$('#warning_inverse').show();
}
});
$('#checkbox-percentage_critical').change (function() {
paint_graph_values();
if ($('#checkbox-percentage_critical').prop('checked') === true){
$('#checkbox-critical_inverse').prop('checked', false);
$('#critical_inverse').hide();
}
else {
$('#critical_inverse').show();
}
}); });
}); });
@ -634,6 +707,43 @@ $next_row++;
//messages error //messages error
var message_error_warning = '<?php echo __('Please introduce a maximum warning higher than the minimun warning'); ?>'; var message_error_warning = '<?php echo __('Please introduce a maximum warning higher than the minimun warning'); ?>';
var message_error_critical = '<?php echo __('Please introduce a maximum critical higher than the minimun critical'); ?>'; var message_error_critical = '<?php echo __('Please introduce a maximum critical higher than the minimun critical'); ?>';
var message_error_percentage = '<?php echo __('Please introduce a positive percentage value'); ?>';
//Percentage selector
var percentage_w = $('#checkbox-percentage_warning').prop('checked');
var percentage_c = $('#checkbox-percentage_critical').prop('checked');
if(percentage_w == true || percentage_c == true) {
d3.select("#svg_dinamic rect").remove();
//create svg
var svg = d3.select("#svg_dinamic");
svg.selectAll("g").remove();
if (percentage_w === true) {
if(max_w < 0 || min_w < 0) {
paint_graph_status(0,0,0,0,0,0,1,0,legend_normal,legend_warning,legend_critical,message_error_percentage,message_error_percentage);
} else {
$("#text-max_warning").removeClass("input_error");
$("#text-min_warning").removeClass("input_error");
}
}
if(percentage_c === true) {
if(max_c < 0 || min_c < 0) {
paint_graph_status(0,0,0,0,0,0,0,1,legend_normal,legend_warning,legend_critical,message_error_percentage,message_error_percentage);
} else {
$("#text-min-critical").removeClass("input_error");
$("#text-max_critical").removeClass("input_error");
}
}
return;
} else {
$('#svg_dinamic').show();
}
//if haven't error //if haven't error
if(max_w == 0 || max_w > min_w){ if(max_w == 0 || max_w > min_w){

View File

@ -389,8 +389,14 @@ $data[1] .= '</span>';
$data[1] .= '<span class="string_values" id="warning_string_values"><em>'.__('String').' </em>&nbsp;'; $data[1] .= '<span class="string_values" id="warning_string_values"><em>'.__('String').' </em>&nbsp;';
$data[1] .= html_print_input_text('str_warning', $str_warning, '', 5, 1024, true).'</span>'; $data[1] .= html_print_input_text('str_warning', $str_warning, '', 5, 1024, true).'</span>';
// Warning inverse values. // Warning inverse values.
$data[1] .= '<br /><em>'.__('Inverse interval').'</em>&nbsp;'; $data[1] .= '<div id="warning_inverse"><em>'.__('Inverse interval').'</em>&nbsp;';
$data[1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true); $data[1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true);
$data[1] .= '</div>';
$data[1] .= '<div id="percentage_warning"><em>'.__('Percentage').'</em>&nbsp;';
$data[1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$data[1] .= html_print_checkbox('percentage_warning', 1, $percentage_warning, true);
$data[1] .= '</div>';
$data[2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>'; $data[2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
$table->colspan['warning-svg-row'][2] = 2; $table->colspan['warning-svg-row'][2] = 2;
@ -425,8 +431,15 @@ $data[1] .= '</span>';
$data[1] .= '<span class="string_values" id="critical_string_values"><em>'.__('String').' </em>&nbsp;'; $data[1] .= '<span class="string_values" id="critical_string_values"><em>'.__('String').' </em>&nbsp;';
$data[1] .= html_print_input_text('str_critical', $str_critical, '', 5, 1024, true).'</span>'; $data[1] .= html_print_input_text('str_critical', $str_critical, '', 5, 1024, true).'</span>';
// Critical inverse values. // Critical inverse values.
$data[1] .= '<br /><em>'.__('Inverse interval').'</em>&nbsp;'; $data[1] .= '<div id="critical_inverse"><em>'.__('Inverse interval').'</em>&nbsp;';
$data[1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true); $data[1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true);
$data[1] .= '</div>';
$data[1] .= '<Ddiv id="percentage_critical"><em>'.__('Percentage').'</em>&nbsp;';
$data[1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
$data[1] .= html_print_checkbox('percentage_critical', 1, $percentage_critical, true);
$data[1] .= '</div>';
push_table_row($data, 'critical-row'); push_table_row($data, 'critical-row');

View File

@ -1441,6 +1441,10 @@ class AgentWizard extends HTML
$result[$value]['criticalInv'] = $data[$k]; $result[$value]['criticalInv'] = $data[$k];
} else if (empty(preg_match('/module-warning-inv/', $k)) === false) { } else if (empty(preg_match('/module-warning-inv/', $k)) === false) {
$result[$value]['warningInv'] = $data[$k]; $result[$value]['warningInv'] = $data[$k];
} else if (empty(preg_match('/module-warning-perc/', $k)) === false) {
$result[$value]['warningPerc'] = $data[$k.'_sent'];
} else if (empty(preg_match('/module-critical-perc/', $k)) === false) {
$result[$value]['criticalPerc'] = $data[$k.'_sent'];
} else if (empty(preg_match('/module-type/', $k)) === false) { } else if (empty(preg_match('/module-type/', $k)) === false) {
$result[$value]['moduleType'] = $data[$k]; $result[$value]['moduleType'] = $data[$k];
} else if (empty(preg_match('/module-unit/', $k)) === false) { } else if (empty(preg_match('/module-unit/', $k)) === false) {
@ -1856,6 +1860,8 @@ class AgentWizard extends HTML
$values['max_warning'] = $candidate['warningMax']; $values['max_warning'] = $candidate['warningMax'];
$values['min_critical'] = $candidate['criticalMin']; $values['min_critical'] = $candidate['criticalMin'];
$values['max_critical'] = $candidate['criticalMax']; $values['max_critical'] = $candidate['criticalMax'];
$values['percentage_warning'] = $candidate['warningPerc'];
$values['percentage_critical'] = $candidate['criticalPerc'];
} }
$values['warning_inverse'] = $candidate['warningInv']; $values['warning_inverse'] = $candidate['warningInv'];
@ -2292,6 +2298,8 @@ class AgentWizard extends HTML
$tmp->max_warning($candidate['warningMax']); $tmp->max_warning($candidate['warningMax']);
$tmp->min_critical($candidate['criticalMin']); $tmp->min_critical($candidate['criticalMin']);
$tmp->max_critical($candidate['criticalMax']); $tmp->max_critical($candidate['criticalMax']);
$tmp->percentage_warning($candidate['warningPerc']);
$tmp->percentage_critical($candidate['criticalPerc']);
} }
$tmp->warning_inverse($candidate['warningInv']); $tmp->warning_inverse($candidate['warningInv']);
@ -2457,6 +2465,8 @@ class AgentWizard extends HTML
'min_critical' => $moduleData['module_thresholds']['min_critical'], 'min_critical' => $moduleData['module_thresholds']['min_critical'],
'max_critical' => $moduleData['module_thresholds']['max_critical'], 'max_critical' => $moduleData['module_thresholds']['max_critical'],
'inv_critical' => $moduleData['module_thresholds']['inv_critical'], 'inv_critical' => $moduleData['module_thresholds']['inv_critical'],
'perc_warning' => $moduleData['module_thresholds']['perc_warning'],
'perc_critical' => $moduleData['module_thresholds']['perc_critical'],
'module_enabled' => $moduleData['default_enabled'], 'module_enabled' => $moduleData['default_enabled'],
'name_oid' => $moduleData['value'], 'name_oid' => $moduleData['value'],
'value' => $moduleData['value'], 'value' => $moduleData['value'],
@ -2636,6 +2646,8 @@ class AgentWizard extends HTML
'min_critical' => $moduleData['module_thresholds']['min_critical'], 'min_critical' => $moduleData['module_thresholds']['min_critical'],
'max_critical' => $moduleData['module_thresholds']['max_critical'], 'max_critical' => $moduleData['module_thresholds']['max_critical'],
'inv_critical' => $moduleData['module_thresholds']['inv_critical'], 'inv_critical' => $moduleData['module_thresholds']['inv_critical'],
'perc_warning' => $moduleData['module_thresholds']['perc_warning'],
'perc_critical' => $moduleData['module_thresholds']['perc_critical'],
'module_enabled' => $moduleData['module_enabled'], 'module_enabled' => $moduleData['module_enabled'],
'current_value' => $currentValue, 'current_value' => $currentValue,
'name_oid' => $moduleData['value'], 'name_oid' => $moduleData['value'],
@ -3280,6 +3292,8 @@ class AgentWizard extends HTML
nc.min_critical, nc.min_critical,
nc.max_critical, nc.max_critical,
nc.critical_inverse AS `inv_critical`, nc.critical_inverse AS `inv_critical`,
nc.percentage_warning AS `perc_warning`,
nc.percentage_critical AS `perc_critical`,
nc.module_enabled, nc.module_enabled,
%s, %s,
nc.scan_type, nc.scan_type,
@ -3867,9 +3881,11 @@ class AgentWizard extends HTML
$table->width = '100%'; $table->width = '100%';
$table->class = 'info_table'; $table->class = 'info_table';
// Subheaders for Warning and Critical columns. // Subheaders for Warning and Critical columns.
$subheaders = '<span class=\'font_w300 mrgn_lft_0.8em\'>Min.</span>'; $subheaders = '<span class=\'wizard-colum-levels font_w300 mrgn_lft_0.8em\'>Min.</span>';
$subheaders .= '<span class=\'font_w300 mrgn_lft_1.6em\'>Max.</span>'; $subheaders .= '<span class=\'wizard-colum-levels font_w300 mrgn_lft_1.6em\'>Max.</span>';
$subheaders .= '<span class=\'font_w300 mrgn_lft_2em\'>Inv.</span>'; $subheaders .= '<span class=\'wizard-colum-levels font_w300 mrgn_lft_2em\'>Inv.</span>';
$subheaders .= '<span class=\'wizard-colum-levels font_w300 mrgn_lft_2em\'>%.</span>';
// Warning header. // Warning header.
$warning_header = html_print_div( $warning_header = html_print_div(
[ [
@ -4081,7 +4097,7 @@ class AgentWizard extends HTML
); );
$data_warning .= html_print_div( $data_warning .= html_print_div(
[ [
'class' => 'wizard-column-levels', 'class' => 'wizard-column-levels-check',
'style' => 'margin-top: 0.3em;', 'style' => 'margin-top: 0.3em;',
'content' => html_print_checkbox( 'content' => html_print_checkbox(
'module-warning-inv-'.$uniqueId, 'module-warning-inv-'.$uniqueId,
@ -4089,7 +4105,24 @@ class AgentWizard extends HTML
$module['inv_warning'], $module['inv_warning'],
true, true,
false, false,
'', 'change_control(this, \''.$uniqueId.'\')',
false,
'form="form-create-modules"'
),
],
true
);
$data_warning .= html_print_div(
[
'class' => 'wizard-column-levels-check',
'style' => 'margin-top: 0.3em;',
'content' => html_print_checkbox(
'module-warning-perc-'.$uniqueId,
$module['perc_warning'],
$module['perc_warning'],
true,
false,
'change_control(this, \''.$uniqueId.'\')',
false, false,
'form="form-create-modules"' 'form="form-create-modules"'
), ),
@ -4148,15 +4181,33 @@ class AgentWizard extends HTML
$data[4] .= html_print_div( $data[4] .= html_print_div(
[ [
'class' => 'wizard-column-levels', 'class' => 'wizard-column-levels-check',
'style' => 'margin-top: 0.3em;', 'style' => 'margin-top: 0.3em;',
'content' => html_print_checkbox( 'content' => html_print_checkbox(
'module-critical_inv_'.$uniqueId, 'module-critical-inv-'.$uniqueId,
$module['inv_critical'], $module['inv_critical'],
$module['inv_critical'], $module['inv_critical'],
true, true,
false, false,
'', 'change_control(this, \''.$uniqueId.'\')',
false,
'form="form-create-modules"'
),
],
true
);
$data[4] .= html_print_div(
[
'class' => 'wizard-column-levels-check',
'style' => 'margin-top: 0.3em;',
'content' => html_print_checkbox(
'module-critical-perc-'.$uniqueId,
$module['perc_critical'],
$module['perc_critical'],
true,
false,
'change_control(this,\''.$uniqueId.'\')',
false, false,
'form="form-create-modules"' 'form="form-create-modules"'
), ),
@ -4528,12 +4579,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => $min_warning, 'min_warning' => $min_warning,
'max_warning' => $max_warning, 'max_warning' => $max_warning,
'inv_warning' => $inv_warning, 'inv_warning' => $inv_warning,
'min_critical' => $min_critical, 'min_critical' => $min_critical,
'max_critical' => $max_critical, 'max_critical' => $max_critical,
'inv_critical' => $inv_critical, 'inv_critical' => $inv_critical,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -4583,12 +4636,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -4635,12 +4690,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => $minc, 'min_critical' => $minc,
'max_critical' => $maxc, 'max_critical' => $maxc,
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
} }
@ -4723,12 +4780,14 @@ class AgentWizard extends HTML
'module_enabled' => false, 'module_enabled' => false,
'module_unit' => '%', 'module_unit' => '%',
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '85', 'min_critical' => '85',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -4760,12 +4819,14 @@ class AgentWizard extends HTML
'module_enabled' => false, 'module_enabled' => false,
'module_unit' => '%', 'module_unit' => '%',
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -4797,12 +4858,14 @@ class AgentWizard extends HTML
'module_enabled' => false, 'module_enabled' => false,
'module_unit' => '%', 'module_unit' => '%',
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
} }
@ -4826,12 +4889,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfInDiscards. // IfInDiscards.
@ -4851,12 +4916,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfOutDiscards. // IfOutDiscards.
@ -4876,12 +4943,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfInErrors. // IfInErrors.
@ -4901,12 +4970,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfOutErrors. // IfOutErrors.
@ -4926,12 +4997,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -4994,12 +5067,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5020,12 +5095,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5046,12 +5123,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfOutUcastPkts. // IfOutUcastPkts.
@ -5071,12 +5150,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfInNUcastPkts. // IfInNUcastPkts.
@ -5096,12 +5177,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfOutNUcastPkts. // IfOutNUcastPkts.
@ -5121,12 +5204,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5189,12 +5274,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5215,12 +5302,14 @@ class AgentWizard extends HTML
'default_enabled' => true, 'default_enabled' => true,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5241,12 +5330,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5267,12 +5358,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfHCInNUcastPkts. // IfHCInNUcastPkts.
@ -5292,12 +5385,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
// IfOutNUcastPkts. // IfOutNUcastPkts.
@ -5317,12 +5412,14 @@ class AgentWizard extends HTML
'default_enabled' => false, 'default_enabled' => false,
'module_enabled' => false, 'module_enabled' => false,
'module_thresholds' => [ 'module_thresholds' => [
'min_warning' => '0', 'min_warning' => '0',
'max_warning' => '0', 'max_warning' => '0',
'inv_warning' => false, 'inv_warning' => false,
'min_critical' => '0', 'min_critical' => '0',
'max_critical' => '0', 'max_critical' => '0',
'inv_critical' => false, 'inv_critical' => false,
'perc_warning' => false,
'perc_critical' => false,
], ],
]; ];
@ -5825,6 +5922,29 @@ class AgentWizard extends HTML
}); });
} }
function change_control(checkbox, uniqueId) {
var checkbox_name = $(checkbox).attr('name');
if($(checkbox).prop('checked', true)) {
if(checkbox_name.match(/warning-inv/gm) !== null) {
$('#checkbox-module-warning-perc-'+uniqueId).prop('checked', false);
}
if(checkbox_name.match(/critical-inv/gm) !== null) {
$('#checkbox-module-critical-perc-'+uniqueId).prop('checked', false);
}
if(checkbox_name.match(/warning-perc/gm) !== null) {
$('#checkbox-module-warning-inv-'+uniqueId).prop('checked', false);
}
if(checkbox_name.match(/critical-perc/gm) !== null) {
$('#checkbox-module-critical-inv-'+uniqueId).prop('checked', false);
}
}
}
</script> </script>
<?php <?php
$str = ob_get_clean(); $str = ob_get_clean();

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC211202'; $build_version = 'PC211203';
$pandora_version = 'v7.0NG.758.1'; $pandora_version = 'v7.0NG.758.1';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -532,6 +532,8 @@ function network_components_create_module_from_network_component($id_network_com
'min_ff_event', 'min_ff_event',
'critical_inverse', 'critical_inverse',
'warning_inverse', 'warning_inverse',
'percentage_warning',
'percentage_critical',
'module_critical_instructions', 'module_critical_instructions',
'module_warning_instructions', 'module_warning_instructions',
'module_unknown_instructions', 'module_unknown_instructions',

View File

@ -1279,6 +1279,8 @@ function snmp_browser_create_modules_snmp(
'unknown_instructions' => '', 'unknown_instructions' => '',
'critical_inverse' => 0, 'critical_inverse' => 0,
'warning_inverse' => 0, 'warning_inverse' => 0,
'percentage_warning' => 0,
'percentage_critical' => 0,
'id_category' => 0, 'id_category' => 0,
'tags' => '', 'tags' => '',
'disabled_types_event' => '{"going_unknown":1}', 'disabled_types_event' => '{"going_unknown":1}',
@ -1336,6 +1338,8 @@ function snmp_browser_create_modules_snmp(
'unknown_instructions' => '', 'unknown_instructions' => '',
'critical_inverse' => 0, 'critical_inverse' => 0,
'warning_inverse' => 0, 'warning_inverse' => 0,
'percentage_warning' => 0,
'percentage_critical' => 0,
'id_category' => 0, 'id_category' => 0,
'disabled_types_event' => '{"going_unknown":1}', 'disabled_types_event' => '{"going_unknown":1}',
'min_ff_event_normal' => 0, 'min_ff_event_normal' => 0,
@ -1394,6 +1398,8 @@ function snmp_browser_create_modules_snmp(
'unknown_instructions' => '', 'unknown_instructions' => '',
'critical_inverse' => 0, 'critical_inverse' => 0,
'warning_inverse' => 0, 'warning_inverse' => 0,
'percentage_warning' => 0,
'percentage_critical' => 0,
'id_category' => 0, 'id_category' => 0,
'disabled_types_event' => '{"going_unknown":1}', 'disabled_types_event' => '{"going_unknown":1}',
'min_ff_event_normal' => 0, 'min_ff_event_normal' => 0,

View File

@ -105,6 +105,8 @@ function configure_modules_form() {
$("#text-unit").attr("value", ""); $("#text-unit").attr("value", "");
$("#checkbox-critical_inverse").attr("value", 0); $("#checkbox-critical_inverse").attr("value", 0);
$("#checkbox-warning_inverse").attr("value", 0); $("#checkbox-warning_inverse").attr("value", 0);
$("#checkbox-percentage_warning").attr("value", 0);
$("#checkbox-percentage_critical").attr("value", 0);
$("#checkbox-ff_type").attr("value", 0); $("#checkbox-ff_type").attr("value", 0);
$("#textarea_critical_instructions").attr("value", ""); $("#textarea_critical_instructions").attr("value", "");
$("#textarea_warning_instructions").attr("value", ""); $("#textarea_warning_instructions").attr("value", "");
@ -205,6 +207,16 @@ function configure_modules_form() {
data["critical_inverse"] data["critical_inverse"]
); );
$("#checkbox-warning_inverse").prop("uncheck", data["warning_inverse"]); $("#checkbox-warning_inverse").prop("uncheck", data["warning_inverse"]);
$("#checkbox-percentage_warning").prop(
"uncheck",
data["percentage_warning"]
);
$("#checkbox-percentage_critical").prop(
"uncheck",
data["percentage_critical"]
);
$("#component_loading").hide(); $("#component_loading").hide();
$("#id_module_type").change(); $("#id_module_type").change();
if ($("#id_category").is("select")) { if ($("#id_category").is("select")) {
@ -464,6 +476,15 @@ function configure_modules_form() {
data["critical_inverse"] data["critical_inverse"]
); );
$("#checkbox-warning_inverse").prop("checked", data["warning_inverse"]); $("#checkbox-warning_inverse").prop("checked", data["warning_inverse"]);
$("#checkbox-percentage_warning").prop(
"uncheck",
data["percentage_warning"]
);
$("#checkbox-percentage_critical").prop(
"uncheck",
data["percentage_critical"]
);
$("#component_loading").hide(); $("#component_loading").hide();
$("#id_module_type").change(); $("#id_module_type").change();
if ($("#id_category").is("select")) { if ($("#id_category").is("select")) {

View File

@ -148,6 +148,12 @@ ul.wizard li > textarea {
text-align: center; text-align: center;
} }
.wizard-column-levels-check {
float: left;
width: 17%;
text-align: center;
}
.action_button_list { .action_button_list {
height: 60px; height: 60px;
} }

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.758.1'; $version = '7.0NG.758.1';
$build = '211202'; $build = '211203';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -267,6 +267,8 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
`parent_module_id` int(10) unsigned NOT NULL default 0, `parent_module_id` int(10) unsigned NOT NULL default 0,
`cps` int NOT NULL default 0, `cps` int NOT NULL default 0,
`debug_content` TEXT, `debug_content` TEXT,
`percentage_critical` tinyint(1) unsigned default '0',
`percentage_warning` tinyint(1) unsigned default '0',
PRIMARY KEY (`id_agente_modulo`), PRIMARY KEY (`id_agente_modulo`),
KEY `main_idx` (`id_agente_modulo`,`id_agente`), KEY `main_idx` (`id_agente_modulo`,`id_agente`),
KEY `tam_agente` (`id_agente`), KEY `tam_agente` (`id_agente`),
@ -997,6 +999,8 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
`scan_filters` text NOT NULL, `scan_filters` text NOT NULL,
`query_filters` text NOT NULL, `query_filters` text NOT NULL,
`enabled` tinyint(1) UNSIGNED DEFAULT 1, `enabled` tinyint(1) UNSIGNED DEFAULT 1,
`percentage_critical` tinyint(1) unsigned default '0',
`percentage_warning` tinyint(1) unsigned default '0',
PRIMARY KEY (`id_nc`) PRIMARY KEY (`id_nc`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -2435,6 +2439,8 @@ CREATE TABLE IF NOT EXISTS `tlocal_component` (
`prediction_sample_window` int(10) default 0, `prediction_sample_window` int(10) default 0,
`prediction_samples` int(4) default 0, `prediction_samples` int(4) default 0,
`prediction_threshold` int(4) default 0, `prediction_threshold` int(4) default 0,
`percentage_critical` tinyint(1) UNSIGNED DEFAULT 0,
`percentage_warning` tinyint(1) UNSIGNED DEFAULT 0,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
FOREIGN KEY (`id_network_component_group`) REFERENCES tnetwork_component_group(`id_sg`) FOREIGN KEY (`id_network_component_group`) REFERENCES tnetwork_component_group(`id_sg`)
ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE
@ -2515,6 +2521,8 @@ CREATE TABLE IF NOT EXISTS `tpolicy_modules` (
`prediction_samples` int(4) default 0, `prediction_samples` int(4) default 0,
`prediction_threshold` int(4) default 0, `prediction_threshold` int(4) default 0,
`cps` int NOT NULL DEFAULT 0, `cps` int NOT NULL DEFAULT 0,
`percentage_warning` tinyint(1) UNSIGNED DEFAULT 0,
`percentage_critical` tinyint(1) UNSIGNED DEFAULT 0,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `main_idx` (`id_policy`), KEY `main_idx` (`id_policy`),
UNIQUE (`id_policy`, `name`) UNIQUE (`id_policy`, `name`)

View File

@ -1209,48 +1209,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); 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);
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); 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);
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); 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);
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); 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);
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_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); 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_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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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); 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);
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 (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); 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

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.758.1-211202 Version: 7.0NG.758.1-211203
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.758.1-211202" pandora_version="7.0NG.758.1-211203"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.758.1"; my $pandora_version = "7.0NG.758.1";
my $pandora_build = "211202"; my $pandora_build = "211203";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -1945,7 +1945,7 @@ sub pandora_process_module ($$$$$$$$$;$) {
} }
# Get new status # Get new status
my $new_status = get_module_status ($processed_data, $module, $module_type); my $new_status = get_module_status ($processed_data, $module, $module_type, $last_data_value);
my $last_status_change = $agent_status->{'last_status_change'}; my $last_status_change = $agent_status->{'last_status_change'};
# Set the last status change macro. Even if its value changes later, whe want the original value. # Set the last status change macro. Even if its value changes later, whe want the original value.
@ -4525,20 +4525,21 @@ sub on_demand_macro($$$$$$;$) {
return(defined($field_value)) ? $field_value : ''; return(defined($field_value)) ? $field_value : '';
} elsif ($macro =~ /_moduledata_(\S+)_/) { } elsif ($macro =~ /_moduledata_(\S+)_/) {
my $field_number = $1; my $field_number = $1;
my $id_mod = get_db_value ($dbh, 'SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = ? AND nombre = ?', $module->{'id_agente'}, $field_number); my $id_mod = get_db_value ($dbh, 'SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = ? AND nombre = ?', $module->{'id_agente'}, $field_number);
my $type_mod = get_db_value ($dbh, 'SELECT id_tipo_modulo FROM tagente_modulo WHERE id_agente_modulo = ?', $id_mod); my $module_data = get_db_single_row ($dbh, 'SELECT id_tipo_modulo, unit FROM tagente_modulo WHERE id_agente_modulo = ?', $id_mod);
my $unit_mod = get_db_value ($dbh, 'SELECT unit FROM tagente_modulo WHERE id_agente_modulo = ?', $id_mod); my $type_mod = $module_data->{'id_tipo_modulo'};
my $unit_mod = $module_data->{'unit'};
my $field_value = ""; my $field_value = "";
if (defined($type_mod) if (defined($type_mod)
&& ($type_mod eq 3 || $type_mod eq 23|| $type_mod eq 17 || $type_mod eq 10 || $type_mod eq 33 ) && ($type_mod eq 3 || $type_mod eq 10 || $type_mod eq 17 || $type_mod eq 23 || $type_mod eq 33 || $type_mod eq 36)
) { ) {
$field_value = get_db_value($dbh, 'SELECT datos FROM tagente_datos_string where id_agente_modulo = ? order by utimestamp desc limit 1', $id_mod); $field_value = get_db_value($dbh, 'SELECT datos FROM tagente_estado WHERE id_agente_modulo = ?', $id_mod);
} }
else{ else{
$field_value = get_db_value($dbh, 'SELECT datos FROM tagente_datos where id_agente_modulo = ? order by utimestamp desc limit 1', $id_mod); $field_value = get_db_value($dbh, 'SELECT datos FROM tagente_estado WHERE id_agente_modulo = ?', $id_mod);
my $data_precision = $pa_config->{'graph_precision'}; my $data_precision = $pa_config->{'graph_precision'};
$field_value = sprintf("%.$data_precision" . "f", $field_value); $field_value = sprintf("%.$data_precision" . "f", $field_value);
$field_value =~ s/0+$//; $field_value =~ s/0+$//;
@ -4793,8 +4794,8 @@ sub log4x_get_severity_num($) {
########################################################################## ##########################################################################
# Returns the status of the module: 0 (NORMAL), 1 (CRITICAL), 2 (WARNING). # Returns the status of the module: 0 (NORMAL), 1 (CRITICAL), 2 (WARNING).
########################################################################## ##########################################################################
sub get_module_status ($$$) { sub get_module_status ($$$$) {
my ($data, $module, $module_type) = @_; my ($data, $module, $module_type, $last_data_value) = @_;
my ($critical_min, $critical_max, $warning_min, $warning_max) = my ($critical_min, $critical_max, $warning_min, $warning_max) =
($module->{'min_critical'}, $module->{'max_critical'}, $module->{'min_warning'}, $module->{'max_warning'}); ($module->{'min_critical'}, $module->{'max_critical'}, $module->{'min_warning'}, $module->{'max_warning'});
my ($critical_str, $warning_str) = ($module->{'str_critical'}, $module->{'str_warning'}); my ($critical_str, $warning_str) = ($module->{'str_critical'}, $module->{'str_warning'});
@ -4811,6 +4812,42 @@ sub get_module_status ($$$) {
$critical_str = (defined ($critical_str) && valid_regex ($critical_str) == 1) ? safe_output($critical_str) : ''; $critical_str = (defined ($critical_str) && valid_regex ($critical_str) == 1) ? safe_output($critical_str) : '';
$warning_str = (defined ($warning_str) && valid_regex ($warning_str) == 1) ? safe_output($warning_str) : ''; $warning_str = (defined ($warning_str) && valid_regex ($warning_str) == 1) ? safe_output($warning_str) : '';
# Adjust percentage max/min values.
if ($module->{'percentage_critical'} == 1) {
if ($critical_max != 0 && $critical_min != 0) {
$critical_max = $last_data_value * (1 + $critical_max / 100.0);
$critical_min = $last_data_value * (1 - $critical_min / 100.0);
$module->{'critical_inverse'} = 1;
}
elsif ($critical_min != 0) {
$critical_max = $last_data_value * (1 - $critical_min / 100.0);
$critical_min = 0;
$module->{'critical_inverse'} = 0;
}
elsif ($critical_max != 0) {
$critical_min = $last_data_value * (1 + $critical_max / 100.0);
$critical_max = 0;
$module->{'critical_inverse'} = 0;
}
}
if ($module->{'percentage_warning'} == 1) {
if ($warning_max != 0 && $warning_min != 0) {
$warning_max = $last_data_value * (1 + $warning_max / 100.0);
$warning_min = $last_data_value * (1 - $warning_min / 100.0);
$module->{'warning_inverse'} = 1;
}
elsif ($warning_min != 0) {
$warning_max = $last_data_value * (1 - $warning_min / 100.0);
$warning_min = 0;
$module->{'warning_inverse'} = 0;
}
elsif ($warning_max != 0) {
$warning_min = $last_data_value * (1 + $warning_max / 100.0);
$warning_max = 0;
$module->{'warning_inverse'} = 0;
}
}
if (($module_type =~ m/_proc$/ || $module_type =~ /web_analysis/) && ($critical_min eq $critical_max)) { if (($module_type =~ m/_proc$/ || $module_type =~ /web_analysis/) && ($critical_min eq $critical_max)) {
($critical_min, $critical_max) = (0, 1); ($critical_min, $critical_max) = (0, 1);
} }

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.758.1"; my $pandora_version = "7.0NG.758.1";
my $pandora_build = "211202"; my $pandora_build = "211203";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.758.1 %define version 7.0NG.758.1
%define release 211202 %define release 211203
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.758.1" PI_VERSION="7.0NG.758.1"
PI_BUILD="211202" PI_BUILD="211203"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.758.1 Build 211202"; my $version = "7.0NG.758.1 Build 211203";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.758.1 Build 211202"; my $version = "7.0NG.758.1 Build 211203";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);