mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-11931-made-selector-de-modulo-donde-se-activa-made-monitoring-anomaly-detection-engine' into 'develop'
Added enable MADE option to modules and bulk op See merge request artica/pandorafms!6385
This commit is contained in:
commit
ba3d12eb0e
@ -160,6 +160,9 @@ UPDATE tagente_modulo SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
|||||||
UPDATE tpolicy_modules SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
UPDATE tpolicy_modules SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||||
UPDATE tnetwork_component SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
UPDATE tnetwork_component SET `tcp_send` = '2c' WHERE `tcp_send` = '2';
|
||||||
|
|
||||||
|
ALTER TABLE tagente_modulo ADD COLUMN `made_enabled` TINYINT UNSIGNED DEFAULT 0;
|
||||||
|
ALTER TABLE tpolicy_modules ADD COLUMN `made_enabled` TINYINT UNSIGNED DEFAULT 0;
|
||||||
|
|
||||||
ALTER TABLE talert_templates
|
ALTER TABLE talert_templates
|
||||||
ADD COLUMN `time_window` ENUM ('thirty_days','this_month','seven_days','this_week','one_day','today'),
|
ADD COLUMN `time_window` ENUM ('thirty_days','this_month','seven_days','this_week','one_day','today'),
|
||||||
ADD COLUMN `math_function` ENUM ('avg', 'min', 'max', 'sum'),
|
ADD COLUMN `math_function` ENUM ('avg', 'min', 'max', 'sum'),
|
||||||
|
@ -1326,6 +1326,12 @@ if ($update_module === true || $create_module === true) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$post_process = (string) get_parameter('post_process', 0.0);
|
$post_process = (string) get_parameter('post_process', 0.0);
|
||||||
|
if (modules_made_compatible($id_module_type) === true) {
|
||||||
|
$made_enabled = (bool) get_parameter_checkbox('made_enabled', 0);
|
||||||
|
} else {
|
||||||
|
$made_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
$prediction_module = (int) get_parameter('prediction_module');
|
$prediction_module = (int) get_parameter('prediction_module');
|
||||||
$max_timeout = (int) get_parameter('max_timeout');
|
$max_timeout = (int) get_parameter('max_timeout');
|
||||||
$max_retries = (int) get_parameter('max_retries');
|
$max_retries = (int) get_parameter('max_retries');
|
||||||
@ -1720,6 +1726,7 @@ if ($update_module) {
|
|||||||
'plugin_parameter' => $plugin_parameter,
|
'plugin_parameter' => $plugin_parameter,
|
||||||
'id_plugin' => $id_plugin,
|
'id_plugin' => $id_plugin,
|
||||||
'post_process' => $post_process,
|
'post_process' => $post_process,
|
||||||
|
'made_enabled' => $made_enabled,
|
||||||
'prediction_module' => $prediction_module,
|
'prediction_module' => $prediction_module,
|
||||||
'max_timeout' => $max_timeout,
|
'max_timeout' => $max_timeout,
|
||||||
'max_retries' => $max_retries,
|
'max_retries' => $max_retries,
|
||||||
@ -1918,6 +1925,7 @@ if ($create_module) {
|
|||||||
'plugin_parameter' => $plugin_parameter,
|
'plugin_parameter' => $plugin_parameter,
|
||||||
'id_plugin' => $id_plugin,
|
'id_plugin' => $id_plugin,
|
||||||
'post_process' => $post_process,
|
'post_process' => $post_process,
|
||||||
|
'made_enabled' => $made_enabled,
|
||||||
'prediction_module' => $prediction_module,
|
'prediction_module' => $prediction_module,
|
||||||
'max_timeout' => $max_timeout,
|
'max_timeout' => $max_timeout,
|
||||||
'max_retries' => $max_retries,
|
'max_retries' => $max_retries,
|
||||||
|
@ -294,6 +294,7 @@ if ($id_agent_module) {
|
|||||||
$plugin_parameter = $module['plugin_parameter'];
|
$plugin_parameter = $module['plugin_parameter'];
|
||||||
$id_plugin = $module['id_plugin'];
|
$id_plugin = $module['id_plugin'];
|
||||||
$post_process = $module['post_process'];
|
$post_process = $module['post_process'];
|
||||||
|
$made_enabled = $module['made_enabled'];
|
||||||
$prediction_module = $module['prediction_module'];
|
$prediction_module = $module['prediction_module'];
|
||||||
$custom_integer_1 = $module['custom_integer_1'];
|
$custom_integer_1 = $module['custom_integer_1'];
|
||||||
$custom_integer_2 = $module['custom_integer_2'];
|
$custom_integer_2 = $module['custom_integer_2'];
|
||||||
@ -408,6 +409,7 @@ if ($id_agent_module) {
|
|||||||
$id_module_group = 1;
|
$id_module_group = 1;
|
||||||
$id_module_type = 1;
|
$id_module_type = 1;
|
||||||
$post_process = '';
|
$post_process = '';
|
||||||
|
$made_enabled = false;
|
||||||
$max_timeout = 0;
|
$max_timeout = 0;
|
||||||
$max_retries = 0;
|
$max_retries = 0;
|
||||||
$min = '';
|
$min = '';
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common module editor.
|
* Common module editor.
|
||||||
*
|
*
|
||||||
@ -1376,6 +1377,24 @@ $table_advanced->data['process_unit'][1] = html_print_extended_select_for_post_p
|
|||||||
$disabledBecauseInPolicy
|
$disabledBecauseInPolicy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table_advanced->rowclass['caption_made_enabled'] = 'w50p';
|
||||||
|
$table_advanced->rowclass['made_enabled'] = 'w50p';
|
||||||
|
$table_advanced->data['caption_made_enabled'][0] = __('MADE enabled').ui_print_help_tip(
|
||||||
|
__('By activating this option, the module data will be processed by the MADE engine (if active), and events will be generated automatically by the IA engine'),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$table_advanced->data['made_enabled'][0] = html_print_checkbox_switch(
|
||||||
|
'made_enabled',
|
||||||
|
1,
|
||||||
|
(bool) $made_enabled,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'wp100 static'
|
||||||
|
);
|
||||||
|
|
||||||
$table_advanced->data['title_5'] = html_print_subtitle_table(__('Notifications and alerts'));
|
$table_advanced->data['title_5'] = html_print_subtitle_table(__('Notifications and alerts'));
|
||||||
|
|
||||||
$table_advanced->data['caption_export_target'][0] = __('Export target');
|
$table_advanced->data['caption_export_target'][0] = __('Export target');
|
||||||
@ -1676,8 +1695,9 @@ $(document).ready (function () {
|
|||||||
|
|
||||||
var disabledBecauseInPolicy = <?php echo '\''.((empty($disabledBecauseInPolicy) === true) ? '0' : '1').'\''; ?>;
|
var disabledBecauseInPolicy = <?php echo '\''.((empty($disabledBecauseInPolicy) === true) ? '0' : '1').'\''; ?>;
|
||||||
var idModuleType = '<?php echo $type_names_hash[$id_module_type]; ?>';
|
var idModuleType = '<?php echo $type_names_hash[$id_module_type]; ?>';
|
||||||
|
var moduleTypeId = '<?php echo $id_module_type; ?>';
|
||||||
if (idModuleType != '') {
|
if (idModuleType != '') {
|
||||||
setModuleType(idModuleType);
|
setModuleType(idModuleType, moduleTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#right").click(function() {
|
$("#right").click(function() {
|
||||||
@ -1754,8 +1774,7 @@ $(document).ready (function () {
|
|||||||
'_blank',
|
'_blank',
|
||||||
'width=800,height=600'
|
'width=800,height=600'
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
window.open(
|
window.open(
|
||||||
'https://pandorafms.com/manual/en/documentation/03_monitoring/02_operations#types_of_modules',
|
'https://pandorafms.com/manual/en/documentation/03_monitoring/02_operations#types_of_modules',
|
||||||
'_blank',
|
'_blank',
|
||||||
@ -1774,8 +1793,7 @@ $(document).ready (function () {
|
|||||||
'_blank',
|
'_blank',
|
||||||
'width=800,height=600'
|
'width=800,height=600'
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
window.open(
|
window.open(
|
||||||
'https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#icmp_monitoring',
|
'https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#icmp_monitoring',
|
||||||
'_blank',
|
'_blank',
|
||||||
@ -1796,8 +1814,7 @@ $(document).ready (function () {
|
|||||||
'_blank',
|
'_blank',
|
||||||
'width=800,height=600'
|
'width=800,height=600'
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
window.open(
|
window.open(
|
||||||
'https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitoring_through_network_modules_with_snmp',
|
'https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitoring_through_network_modules_with_snmp',
|
||||||
'_blank',
|
'_blank',
|
||||||
@ -1817,8 +1834,7 @@ $(document).ready (function () {
|
|||||||
'_blank',
|
'_blank',
|
||||||
'width=800,height=600'
|
'width=800,height=600'
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
window.open(
|
window.open(
|
||||||
'https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#tcp_monitoring',
|
'https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#tcp_monitoring',
|
||||||
'_blank',
|
'_blank',
|
||||||
@ -1837,8 +1853,7 @@ $(document).ready (function () {
|
|||||||
'_blank',
|
'_blank',
|
||||||
'width=800,height=600'
|
'width=800,height=600'
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
window.open(
|
window.open(
|
||||||
'https://pandorafms.com/manual/en/documentation/03_monitoring/06_web_monitoring#creating_web_modules',
|
'https://pandorafms.com/manual/en/documentation/03_monitoring/06_web_monitoring#creating_web_modules',
|
||||||
'_blank',
|
'_blank',
|
||||||
@ -1849,7 +1864,7 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setModuleType(type_name_selected);
|
setModuleType(type_name_selected, type_selected);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#checkbox-warning_inverse_string').change(function() {
|
$('#checkbox-warning_inverse_string').change(function() {
|
||||||
@ -1868,7 +1883,7 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function setModuleType(type_name_selected) {
|
function setModuleType(type_name_selected, type_selected) {
|
||||||
if (type_name_selected.match(/_string$/) == null) {
|
if (type_name_selected.match(/_string$/) == null) {
|
||||||
// Hide string fields.
|
// Hide string fields.
|
||||||
$('[id*=str_warning]').hide();
|
$('[id*=str_warning]').hide();
|
||||||
@ -1888,8 +1903,7 @@ $(document).ready (function () {
|
|||||||
$('#percentage_critical').show();
|
$('#percentage_critical').show();
|
||||||
// Show dinamic reference.
|
// Show dinamic reference.
|
||||||
$('#svg_dinamic').show();
|
$('#svg_dinamic').show();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Show string fields.
|
// Show string fields.
|
||||||
$('[id*=str_warning]').show();
|
$('[id*=str_warning]').show();
|
||||||
$('[id*=str_critical]').show();
|
$('[id*=str_critical]').show();
|
||||||
@ -1910,15 +1924,25 @@ $(document).ready (function () {
|
|||||||
$('#svg_dinamic').hide();
|
$('#svg_dinamic').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (type_name_selected.match(/async/) == null) {
|
if (type_name_selected.match(/async/) == null) {
|
||||||
$('#ff_timeout').hide();
|
$('#ff_timeout').hide();
|
||||||
$('#ff_timeout_disable').show();
|
$('#ff_timeout_disable').show();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$('#ff_timeout').show();
|
$('#ff_timeout').show();
|
||||||
$('#ff_timeout_disable').hide();
|
$('#ff_timeout_disable').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var madeCompatibleTypes = ["1", "4", "5", "8", "15", "16", "22", "30", "34"];
|
||||||
|
if (madeCompatibleTypes.includes(type_selected)) {
|
||||||
|
$('#advanced-made_enabled').show();
|
||||||
|
$('#advanced-caption_made_enabled').show();
|
||||||
|
} else {
|
||||||
|
$('#advanced-made_enabled').hide();
|
||||||
|
$('#advanced-caption_made_enabled').hide();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#id_module_type").trigger('change');
|
$("#id_module_type").trigger('change');
|
||||||
|
|
||||||
@ -1932,17 +1956,14 @@ $(document).ready (function () {
|
|||||||
//validate post_process. Change ',' by '.'
|
//validate post_process. Change ',' by '.'
|
||||||
$("#submit-updbutton").click(function() {
|
$("#submit-updbutton").click(function() {
|
||||||
validate_post_process();
|
validate_post_process();
|
||||||
});
|
}); $("#submit-crtbutton").click(function() {
|
||||||
$("#submit-crtbutton").click (function () {
|
|
||||||
validate_post_process();
|
validate_post_process();
|
||||||
});
|
});
|
||||||
|
|
||||||
//Dynamic_interval;
|
//Dynamic_interval;
|
||||||
|
disabled_status(disabledBecauseInPolicy); $('#dynamic_interval_select').change(function() {
|
||||||
disabled_status(disabledBecauseInPolicy);
|
disabled_status(disabledBecauseInPolicy);
|
||||||
$('#dynamic_interval_select').change (function() {
|
}); $('#dynamic_interval').change(function() {
|
||||||
disabled_status(disabledBecauseInPolicy);
|
|
||||||
});
|
|
||||||
$('#dynamic_interval').change (function() {
|
|
||||||
disabled_status(disabledBecauseInPolicy);
|
disabled_status(disabledBecauseInPolicy);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1952,26 +1973,22 @@ $(document).ready (function () {
|
|||||||
$('.hide_dinamic').hide();
|
$('.hide_dinamic').hide();
|
||||||
|
|
||||||
//paint graph stutus critical and warning:
|
//paint graph stutus critical and warning:
|
||||||
paint_graph_values();
|
paint_graph_values(); $('#text-min_warning').on('input', function() {
|
||||||
$('#text-min_warning').on ('input', function() {
|
|
||||||
paint_graph_values();
|
paint_graph_values();
|
||||||
if (isNaN($('#text-min_warning').val()) && !($('#text-min_warning').val() == "-")) {
|
if (isNaN($('#text-min_warning').val()) && !($('#text-min_warning').val() == "-")) {
|
||||||
$('#text-min_warning').val(0);
|
$('#text-min_warning').val(0);
|
||||||
}
|
}
|
||||||
});
|
}); $('#text-max_warning').on('input', function() {
|
||||||
$('#text-max_warning').on ('input', function() {
|
|
||||||
paint_graph_values();
|
paint_graph_values();
|
||||||
if (isNaN($('#text-max_warning').val()) && !($('#text-max_warning').val() == "-")) {
|
if (isNaN($('#text-max_warning').val()) && !($('#text-max_warning').val() == "-")) {
|
||||||
$('#text-max_warning').val(0);
|
$('#text-max_warning').val(0);
|
||||||
}
|
}
|
||||||
});
|
}); $('#text-min_critical').on('input', function() {
|
||||||
$('#text-min_critical').on ('input', function() {
|
|
||||||
paint_graph_values();
|
paint_graph_values();
|
||||||
if (isNaN($('#text-min_critical').val()) && !($('#text-min_critical').val() == "-")) {
|
if (isNaN($('#text-min_critical').val()) && !($('#text-min_critical').val() == "-")) {
|
||||||
$('#text-min_critical').val(0);
|
$('#text-min_critical').val(0);
|
||||||
}
|
}
|
||||||
});
|
}); $('#text-max_critical').on('input', function() {
|
||||||
$('#text-max_critical').on ('input', function() {
|
|
||||||
paint_graph_values();
|
paint_graph_values();
|
||||||
if (isNaN($('#text-max_critical').val()) && !($('#text-max_critical').val() == "-")) {
|
if (isNaN($('#text-max_critical').val()) && !($('#text-max_critical').val() == "-")) {
|
||||||
$('#text-max_critical').val(0);
|
$('#text-max_critical').val(0);
|
||||||
@ -2034,8 +2051,8 @@ $(document).ready (function () {
|
|||||||
function disabled_status(disabledBecauseInPolicy) {
|
function disabled_status(disabledBecauseInPolicy) {
|
||||||
var dynamic_interval_select_value = $('#dynamic_interval_select').val();
|
var dynamic_interval_select_value = $('#dynamic_interval_select').val();
|
||||||
var dynamic_interval_value = $('#dynamic_interval_select').val();
|
var dynamic_interval_value = $('#dynamic_interval_select').val();
|
||||||
if(typeof dynamic_interval_select_value != "undefined" && typeof dynamic_interval_value != "undefined"
|
if (typeof dynamic_interval_select_value != "undefined" && typeof dynamic_interval_value != "undefined" &&
|
||||||
&& dynamic_interval_select_value != 0 && dynamic_interval_value != 0){
|
dynamic_interval_select_value != 0 && dynamic_interval_value != 0) {
|
||||||
$('#text-min_warning').prop('readonly', true);
|
$('#text-min_warning').prop('readonly', true);
|
||||||
$('#text-min_warning').addClass('readonly');
|
$('#text-min_warning').addClass('readonly');
|
||||||
$('#text-max_warning').prop('readonly', true);
|
$('#text-max_warning').prop('readonly', true);
|
||||||
@ -2106,8 +2123,7 @@ function change_modules_autocomplete_input () {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
module_autocomplete.html(error_icon);
|
module_autocomplete.html(error_icon);
|
||||||
}
|
}
|
||||||
$('#text-autocomplete_module_name').addClass('w90p');
|
$('#text-autocomplete_module_name').addClass('w90p');
|
||||||
@ -2158,11 +2174,14 @@ function add_new_relation () {
|
|||||||
button.removeClass('working');
|
button.removeClass('working');
|
||||||
if (data === false) {
|
if (data === false) {
|
||||||
iconPlaceholder.html(error_icon);
|
iconPlaceholder.html(error_icon);
|
||||||
setTimeout( function() { iconPlaceholder.html(''); }, 2000);
|
setTimeout(function() {
|
||||||
}
|
iconPlaceholder.html('');
|
||||||
else {
|
}, 2000);
|
||||||
|
} else {
|
||||||
iconPlaceholder.html(suc_icon);
|
iconPlaceholder.html(suc_icon);
|
||||||
setTimeout( function() { iconPlaceholder.html(''); }, 2000);
|
setTimeout(function() {
|
||||||
|
iconPlaceholder.html('');
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
// Add the new row
|
// Add the new row
|
||||||
var relationsCount = parseInt($("#hidden-module_relations_count").val());
|
var relationsCount = parseInt($("#hidden-module_relations_count").val());
|
||||||
@ -2196,7 +2215,9 @@ function add_new_relation () {
|
|||||||
error: function(data) {
|
error: function(data) {
|
||||||
button.removeClass('working');
|
button.removeClass('working');
|
||||||
iconPlaceholder.html(error_icon);
|
iconPlaceholder.html(error_icon);
|
||||||
setTimeout( function() { iconPlaceholder.html(''); }, 2000);
|
setTimeout(function() {
|
||||||
|
iconPlaceholder.html('');
|
||||||
|
}, 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2286,22 +2307,34 @@ function validate_post_process() {
|
|||||||
//function paint graph.
|
//function paint graph.
|
||||||
function paint_graph_values() {
|
function paint_graph_values() {
|
||||||
var min_w = parseFloat($('#text-min_warning').val());
|
var min_w = parseFloat($('#text-min_warning').val());
|
||||||
if(min_w == '0.00' || isNaN(min_w)){ min_w = 0; }
|
if (min_w == '0.00' || isNaN(min_w)) {
|
||||||
|
min_w = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var max_w = parseFloat($('#text-max_warning').val());
|
var max_w = parseFloat($('#text-max_warning').val());
|
||||||
if(max_w == '0.00' || isNaN(max_w)){ max_w = 0; }
|
if (max_w == '0.00' || isNaN(max_w)) {
|
||||||
|
max_w = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var min_c = parseFloat($('#text-min_critical').val());
|
var min_c = parseFloat($('#text-min_critical').val());
|
||||||
if(min_c =='0.00' || isNaN(min_c)){ min_c = 0; }
|
if (min_c == '0.00' || isNaN(min_c)) {
|
||||||
|
min_c = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var max_c = parseFloat($('#text-max_critical').val());
|
var max_c = parseFloat($('#text-max_critical').val());
|
||||||
if(max_c =='0.00' || isNaN(max_c)){ max_c = 0; }
|
if (max_c == '0.00' || isNaN(max_c)) {
|
||||||
|
max_c = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var inverse_w = $('input:radio[value=warning_inverse]:checked').val();
|
var inverse_w = $('input:radio[value=warning_inverse]:checked').val();
|
||||||
if(!inverse_w){ inverse_w = 0; }
|
if (!inverse_w) {
|
||||||
|
inverse_w = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var inverse_c = $('input:radio[value=critical_inverse]:checked').val();
|
var inverse_c = $('input:radio[value=critical_inverse]:checked').val();
|
||||||
if(!inverse_c){ inverse_c = 0; }
|
if (!inverse_c) {
|
||||||
|
inverse_c = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//inicialiced error.
|
//inicialiced error.
|
||||||
var error_w = 0;
|
var error_w = 0;
|
||||||
|
@ -916,7 +916,24 @@ $table->data[17][0] = html_print_label_input_block(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[17][1] = html_print_label_input_block(
|
$table->data['made_enabled'][1] = html_print_label_input_block(
|
||||||
|
__('MADE enabled').ui_print_help_tip(
|
||||||
|
__('By activating this option, the module data will be processed by the MADE engine (if active), and events will be generated automatically by the IA engine'),
|
||||||
|
true
|
||||||
|
),
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'made_enabled',
|
||||||
|
1,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'wp100 static'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data[17][2] = html_print_label_input_block(
|
||||||
__('SNMP community'),
|
__('SNMP community'),
|
||||||
html_print_input_text(
|
html_print_input_text(
|
||||||
'snmp_community',
|
'snmp_community',
|
||||||
@ -1654,6 +1671,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").hide();
|
"tr#delete_table-40").hide();
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
@ -1729,6 +1747,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").show ();
|
"tr#delete_table-40").show ();
|
||||||
|
|
||||||
switch($('#module_type').val()) {
|
switch($('#module_type').val()) {
|
||||||
@ -1839,6 +1858,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").hide ();
|
"tr#delete_table-40").hide ();
|
||||||
$('input[type=checkbox]').attr('checked', false);
|
$('input[type=checkbox]').attr('checked', false);
|
||||||
$('input[type=checkbox]').attr('disabled', true);
|
$('input[type=checkbox]').attr('disabled', true);
|
||||||
@ -1878,6 +1898,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").show();
|
"tr#delete_table-40").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1909,6 +1930,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").hide();
|
"tr#delete_table-40").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1932,6 +1954,9 @@ $(document).ready (function () {
|
|||||||
else if (this.id == "checkbox-dynamic_two_tailed") {
|
else if (this.id == "checkbox-dynamic_two_tailed") {
|
||||||
return; //Do none
|
return; //Do none
|
||||||
}
|
}
|
||||||
|
else if (this.id == "checkbox-made_enabled") {
|
||||||
|
return; //Do none
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (this.id == "checkbox-force_group") {
|
if (this.id == "checkbox-force_group") {
|
||||||
$("#checkbox-recursion").prop("checked", false);
|
$("#checkbox-recursion").prop("checked", false);
|
||||||
@ -1996,6 +2021,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").hide();
|
"tr#delete_table-40").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2086,6 +2112,7 @@ $(document).ready (function () {
|
|||||||
"tr#delete_table-37, " +
|
"tr#delete_table-37, " +
|
||||||
"tr#delete_table-38, " +
|
"tr#delete_table-38, " +
|
||||||
"tr#delete_table-39, " +
|
"tr#delete_table-39, " +
|
||||||
|
"tr#delete_table-made_enabled, " +
|
||||||
"tr#delete_table-40").hide();
|
"tr#delete_table-40").hide();
|
||||||
|
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
@ -2315,6 +2342,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
|||||||
'module_interval',
|
'module_interval',
|
||||||
'disabled',
|
'disabled',
|
||||||
'post_process',
|
'post_process',
|
||||||
|
'made_enabled',
|
||||||
'unit_select',
|
'unit_select',
|
||||||
'snmp_community',
|
'snmp_community',
|
||||||
'snmp_oid',
|
'snmp_oid',
|
||||||
@ -2626,6 +2654,10 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
|||||||
$values['macros'] = json_encode($module_macros);
|
$values['macros'] = json_encode($module_macros);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (modules_made_compatible($module['id_tipo_modulo']) === false) {
|
||||||
|
$values['made_enabled'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$result = modules_update_agent_module(
|
$result = modules_update_agent_module(
|
||||||
$module['id_agente_modulo'],
|
$module['id_agente_modulo'],
|
||||||
$values,
|
$values,
|
||||||
|
@ -151,6 +151,10 @@ if (isset($_GET['server']) === true) {
|
|||||||
$title .= __('Netflow server').' ID: '.$id_server;
|
$title .= __('Netflow server').' ID: '.$id_server;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_MADE:
|
||||||
|
$title .= __('MADE server').' ID: '.$id_server;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$title = __('Update server').' ID: '.$id_server;
|
$title = __('Update server').' ID: '.$id_server;
|
||||||
break;
|
break;
|
||||||
|
BIN
pandora_console/images/Anomaly-detection.png
Normal file
BIN
pandora_console/images/Anomaly-detection.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 803 B |
BIN
pandora_console/images/Anomaly-detection@2x.png
Normal file
BIN
pandora_console/images/Anomaly-detection@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
14
pandora_console/images/Anomaly-detection@svg.svg
Normal file
14
pandora_console/images/Anomaly-detection@svg.svg
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>Anomaly detection@svg</title>
|
||||||
|
<g id="Anomaly-detection" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Dark-/-20-/-details">
|
||||||
|
<g id="Group">
|
||||||
|
<rect id="Rectangle" x="0" y="0" width="20" height="20"></rect>
|
||||||
|
<line x1="14" y1="14" x2="18" y2="18" id="Path-9" stroke="#3F3F3F" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></line>
|
||||||
|
<circle id="Oval" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" cx="8" cy="8" r="7"></circle>
|
||||||
|
</g>
|
||||||
|
<path d="M2,11 C2,11 3.33333333,11 6,11 C7.33333333,7 8,5 8,5 C8,5 8.66666667,7 10,11 L14,11" id="Path" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1013 B |
@ -483,6 +483,13 @@ if (check_login()) {
|
|||||||
'tagente_modulo',
|
'tagente_modulo',
|
||||||
['id_agente_modulo' => $module_id]
|
['id_agente_modulo' => $module_id]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$made_enabled = db_get_value_filter(
|
||||||
|
'made_enabled',
|
||||||
|
'tagente_modulo',
|
||||||
|
['id_agente_modulo' => $module_id]
|
||||||
|
);
|
||||||
|
|
||||||
$unit = db_get_value_filter(
|
$unit = db_get_value_filter(
|
||||||
'unit',
|
'unit',
|
||||||
'tagente_modulo',
|
'tagente_modulo',
|
||||||
|
@ -442,6 +442,7 @@ define('SERVER_TYPE_CORRELATION', 22);
|
|||||||
define('SERVER_TYPE_NCM', 23);
|
define('SERVER_TYPE_NCM', 23);
|
||||||
define('SERVER_TYPE_NETFLOW', 24);
|
define('SERVER_TYPE_NETFLOW', 24);
|
||||||
define('SERVER_TYPE_LOG', 25);
|
define('SERVER_TYPE_LOG', 25);
|
||||||
|
define('SERVER_TYPE_MADE', 26);
|
||||||
|
|
||||||
// REPORTS.
|
// REPORTS.
|
||||||
define('REPORT_TOP_N_MAX', 1);
|
define('REPORT_TOP_N_MAX', 1);
|
||||||
|
@ -4762,3 +4762,31 @@ function export_agents_module_csv($filters)
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if modules are compatible with MADE server.
|
||||||
|
*
|
||||||
|
* @param integer $id_tipo_modulo
|
||||||
|
* @retur boolean True if compatible, false otherwise.
|
||||||
|
*/
|
||||||
|
function modules_made_compatible($id_tipo_modulo)
|
||||||
|
{
|
||||||
|
$compatible_types = [
|
||||||
|
1,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
8,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
22,
|
||||||
|
30,
|
||||||
|
34,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (array_search($id_tipo_modulo, $compatible_types) === false) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -992,6 +992,19 @@ function servers_get_info($id_server=-1, $sql_limit=-1)
|
|||||||
$id_modulo = 0;
|
$id_modulo = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_MADE:
|
||||||
|
$server['img'] = html_print_image(
|
||||||
|
'images/Anomaly-detection@svg.svg',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('MADE server'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$server['type'] = 'made';
|
||||||
|
$id_modulo = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$server['img'] = '';
|
$server['img'] = '';
|
||||||
$server['type'] = 'unknown';
|
$server['type'] = 'unknown';
|
||||||
|
@ -277,6 +277,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
|
|||||||
`quiet_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
`quiet_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||||
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
`disabled_by_downtime` TINYINT NOT NULL DEFAULT 0,
|
||||||
`last_compact` TIMESTAMP NOT NULL DEFAULT 0,
|
`last_compact` TIMESTAMP NOT NULL DEFAULT 0,
|
||||||
|
`made_enabled` TINYINT 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`),
|
||||||
@ -2542,6 +2543,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_modules` (
|
|||||||
`percentage_warning` TINYINT UNSIGNED DEFAULT 0,
|
`percentage_warning` TINYINT UNSIGNED DEFAULT 0,
|
||||||
`percentage_critical` TINYINT UNSIGNED DEFAULT 0,
|
`percentage_critical` TINYINT UNSIGNED DEFAULT 0,
|
||||||
`warning_time` INT UNSIGNED DEFAULT 0,
|
`warning_time` INT UNSIGNED DEFAULT 0,
|
||||||
|
`made_enabled` TINYINT 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`)
|
||||||
|
@ -1228,48 +1228,48 @@ INSERT INTO `tpolicies` VALUES (4,'Basic AIX Local Monitoring','B
|
|||||||
INSERT INTO `tpolicies` VALUES (5,'Basic HP-UX Local Monitoring','Basic local checks to monitoring HP/UX systems.',2,0,0,0);
|
INSERT INTO `tpolicies` VALUES (5,'Basic HP-UX Local Monitoring','Basic local checks to monitoring HP/UX systems.',2,0,0,0);
|
||||||
INSERT INTO `tpolicies` VALUES (6,'Basic Remote Checks','Basic Remote Checks (ping, latency, ports).',9,0,0,0);
|
INSERT INTO `tpolicies` VALUES (6,'Basic Remote Checks','Basic Remote Checks (ping, latency, ports).',9,0,0,0);
|
||||||
|
|
||||||
INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum ReceivedBytes |Select -ExpandProperty Sum"
module_end



',4,'','Bytes per second (Received)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (1,1,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum ReceivedBytes |Select -ExpandProperty Sum"
module_end



',4,'','Bytes per second (Received)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (2,1,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum SentBytes |Select -ExpandProperty Sum"
module_end




',4,'','Bytes per second (Sent)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (2,1,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec powershell -c "Get-NetAdapterStatistics |Measure-Object -Sum SentBytes |Select -ExpandProperty Sum"
module_end




',4,'','Bytes per second (Sent)','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (3,1,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_min_warning 79.00
module_max_warning 90.00;module_min_critical 91.00
module_max_critical 00.00;
module_end





',1,'CPU usage (%)','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,79.00,90.00,'',91.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (3,1,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_min_warning 79.00
module_max_warning 90.00;module_min_critical 91.00
module_max_critical 00.00;
module_end





',1,'CPU usage (%)','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,79.00,90.00,'',91.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (4,1,'module_begin
module_name Total processes
module_type generic_data
module_exec tasklist | wc -l | gawk "{print $1}"
module_end


',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (4,1,'module_begin
module_name Total processes
module_type generic_data
module_exec tasklist | wc -l | gawk "{print $1}"
module_end


',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (5,1,'module_begin
module_name Uptime
module_type generic_data
module_exec powershell -c "((get-date) - (gcim Win32_OperatingSystem).LastBootUpTime | Select -ExpandProperty Ticks) / 100000"
module_end




',1,'','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (5,1,'module_begin
module_name Uptime
module_type generic_data
module_exec powershell -c "((get-date) - (gcim Win32_OperatingSystem).LastBootUpTime | Select -ExpandProperty Ticks) / 100000"
module_end




',1,'','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (6,1,'module_begin
module_name WMI Service
module_type generic_proc
module_service winmgmt
module_end

',2,'WMI Service enabled','WMI Service','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (6,1,'module_begin
module_name WMI Service
module_type generic_proc
module_service winmgmt
module_end

',2,'WMI Service enabled','WMI Service','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (7,2,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$2}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end

',4,'','Bytes per second (Received)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (7,2,'module_begin
module_name Bytes per second (Received)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$2}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end

',4,'','Bytes per second (Received)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (8,2,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$10}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end
',4,'','Bytes per second (Sent)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (8,2,'module_begin
module_name Bytes per second (Sent)
module_type generic_data_inc
module_exec awk '!/lo:/ {s+=$10}END{print s}' /proc/net/dev
module_min_warning 0
module_max_warning 0
module_min_critical 0
module_max_critical 0
module_end
',4,'','Bytes per second (Sent)','bytes/sec',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (9,2,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{ print $13 + $14 }'
module_unit %
module_end

',1,'Current use of CPU (System + User).','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (9,2,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{ print $13 + $14 }'
module_unit %
module_end

',1,'Current use of CPU (System + User).','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (10,2,'module_begin
module_name I/O Lock
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{print $16}'
module_description I/O Wait Disk
module_end


',1,'','I/O Lock','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (10,2,'module_begin
module_name I/O Lock
module_type generic_data
module_exec vmstat 1 1 | tail -1 | awk '{print $16}'
module_description I/O Wait Disk
module_end


',1,'','I/O Lock','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (11,2,'module_begin 
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg |awk '{print $2}'
module_end

',1,'Average process in CPU (Last 5 minutes).','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (11,2,'module_begin 
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg |awk '{print $2}'
module_end

',1,'Average process in CPU (Last 5 minutes).','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (12,2,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec echo > /dev/tcp/127.0.0.1/22 >/dev/null 2>&1 && echo 1 || echo 0
module_end





',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (12,2,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec echo > /dev/tcp/127.0.0.1/22 >/dev/null 2>&1 && echo 1 || echo 0
module_end





',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (13,2,'module_begin
module_name Total processes
module_type generic_data
module_exec ps ax | tail -n +2 | wc -l
module_description Total processes
module_end',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (13,2,'module_begin
module_name Total processes
module_type generic_data
module_exec ps ax | tail -n +2 | wc -l
module_description Total processes
module_end',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (14,2,'module_begin
module_name Uptime
module_type generic_data
module_exec awk '{print $1*100}' /proc/uptime
module_end
',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (14,2,'module_begin
module_name Uptime
module_type generic_data
module_exec awk '{print $1*100}' /proc/uptime
module_end
',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (15,3,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1| awk '{print (100-$NF)}'
module_unit %
module_end
',1,'CPU usage %','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (15,3,'module_begin
module_name CPU %
module_type generic_data
module_exec vmstat 1 1 | tail -1| awk '{print (100-$NF)}'
module_unit %
module_end
',1,'CPU usage %','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (16,3,'module_begin
module_name Disk / usage (%)
module_type generic_data
module_exec df -k / | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for root partition (/)','Disk / usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (16,3,'module_begin
module_name Disk / usage (%)
module_type generic_data
module_exec df -k / | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for root partition (/)','Disk / usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (17,3,'module_begin
module_name Disk /var usage (%)
module_type generic_data
module_exec df -k /var | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for var partition (/var)','Disk /var usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (17,3,'module_begin
module_name Disk /var usage (%)
module_type generic_data
module_exec df -k /var | tail -1 | tr -d "%" | awk '{print $5}'
module_end



',1,'Disk use percentage for var partition (/var)','Disk /var usage (%)','',0,0,1,'',0,'','','','',1,1,1,0,0,'','','',0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','','{\"going_unknown\":0}','W10=',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (18,3,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_end
',1,'Load average','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (18,3,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_end
',1,'Load average','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (19,3,'module_begin
module_name Memory Free %
module_type generic_data
module_freepercentmemory
module_end




',1,'Percentage Mem Free','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,8.00,15.00,'',0.00,7.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (19,3,'module_begin
module_name Memory Free %
module_type generic_data
module_freepercentmemory
module_end




',1,'Percentage Mem Free','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,8.00,15.00,'',0.00,7.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (20,3,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/22" >/dev/null 2>&1 && echo 1 || echo 0
module_end



',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (20,3,'module_begin
module_name Port 22 Open (SSH)
module_type generic_proc
module_exec timeout 1 bash -c "echo > /dev/tcp/127.0.0.1/22" >/dev/null 2>&1 && echo 1 || echo 0
module_end



',2,'Checks if port 22 (SSH) is listening.','Port 22 Open (SSH)','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (21,3,'module_begin
module_name Swap Used %
module_type generic_data
module_exec swap -l |tail -1 | awk '{print 100 - ($NF / $(NF-1) * 100)}'
module_unit %
module_end


',1,'Swap memory available in %','Swap Used %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (21,3,'module_begin
module_name Swap Used %
module_type generic_data
module_exec swap -l |tail -1 | awk '{print 100 - ($NF / $(NF-1) * 100)}'
module_unit %
module_end


',1,'Swap memory available in %','Swap Used %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (22,3,'module_begin
module_name Total processes
module_type generic_data
module_exec ps -A | wc -l | awk '{print $1}'
module_end',1,'Total processes','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (22,3,'module_begin
module_name Total processes
module_type generic_data
module_exec ps -A | wc -l | awk '{print $1}'
module_end',1,'Total processes','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (23,3,'module_beg
module_name Uptime
module_type generic_data
module_exec perl -e "print 100*(time - $(kstat -p unix:0:system_misc:boot_time |awk '{print $2}'))"
module_end






',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (23,3,'module_beg
module_name Uptime
module_type generic_data
module_exec perl -e "print 100*(time - $(kstat -p unix:0:system_misc:boot_time |awk '{print $2}'))"
module_end






',1,'Host Up time (Timeticks)','Uptime','_timeticks_',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (24,4,'module_begin
module_name CPU %
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print 100 - $5}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (24,4,'module_begin
module_name CPU %
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print 100 - $5}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU %','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (25,4,'module_begin
module_name CPU User
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print $2}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (25,4,'module_begin
module_name CPU User
module_type generic_data
module_exec sar 1 | tail -1 | awk '{print $2}'
module_description CPU usage in %
module_unit %
module_end',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (26,4,'module_begin 
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)*1}' 
module_description Average process in CPU (Last minute) 
module_end',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (26,4,'module_begin 
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)*1}' 
module_description Average process in CPU (Last minute) 
module_end',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (27,4,'module_begin
module_name Memory Free %
module_type generic_data
module_exec svmon -G|grep memory | awk '{print (1- $3/$2 )*100}'
module_description Percentage Mem Free
module_end
',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (27,4,'module_begin
module_name Memory Free %
module_type generic_data
module_exec svmon -G|grep memory | awk '{print (1- $3/$2 )*100}'
module_description Percentage Mem Free
module_end
',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (28,4,'module_begin
module_name Pagination use
module_type generic_data
module_exec  lsps -s | tail -1 | awk '{print $2+0}'
module_end',1,'','Pagination use','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (28,4,'module_begin
module_name Pagination use
module_type generic_data
module_exec  lsps -s | tail -1 | awk '{print $2+0}'
module_end',1,'','Pagination use','',0,0,1,'',0,'','','','',1,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (29,4,'module_begin
module_name Service sshd status
module_type generic_proc
module_exec lssrc -a | grep ssh | grep active
module_end',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (29,4,'module_begin
module_name Service sshd status
module_type generic_proc
module_exec lssrc -a | grep ssh | grep active
module_end',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (30,4,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed "s/us\.*$//g" | sed "s/,\.*$//g"
module_description Host Up time
module_end
',1,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (30,4,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed "s/us\.*$//g" | sed "s/,\.*$//g"
module_description Host Up time
module_end
',1,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (31,5,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_end
',1,'','CPU %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (31,5,'module_begin
module_name CPU %
module_type generic_data
module_cpuusage all
module_unit %
module_end
',1,'','CPU %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (32,5,'module_begin
module_name CPU User
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $(16) }'
module_description % of User CPU
module_unit %
module_end

',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (32,5,'module_begin
module_name CPU User
module_type generic_data
module_exec vmstat 1 2 | tail -1 | awk '{ print $(16) }'
module_description % of User CPU
module_unit %
module_end

',1,'','CPU User','%',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (33,5,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_description System load average
module_end
',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (33,5,'module_begin
module_name Load Average
module_type generic_data
module_exec uptime | awk '{print $(NF-2)}' | tr -d ','
module_description System load average
module_end
',1,'','Load Average','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (34,5,'module_begin
module_name Memory Free %
module_type generic_data
module_exec echo "" > /tmp/hpvm_toptest; top -d 1 -f /tmp/hpvm_toptest 2>/dev/null 1>/dev/null; cat /tmp/hpvm_toptest | grep -i Memory | head -1 | awk '{print $8/($2+$5) * 100}'
module_end


',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (34,5,'module_begin
module_name Memory Free %
module_type generic_data
module_exec echo "" > /tmp/hpvm_toptest; top -d 1 -f /tmp/hpvm_toptest 2>/dev/null 1>/dev/null; cat /tmp/hpvm_toptest | grep -i Memory | head -1 | awk '{print $8/($2+$5) * 100}'
module_end


',1,'','Memory Free %','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (35,5,'module_begin
module_name  Service sshd status
module_type generic_proc
module_exec ps -ef | grep  -v grep | grep "/opt/ssh/sbin/sshd" | wc -l
module_description SSH running
module_end

',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (35,5,'module_begin
module_name  Service sshd status
module_type generic_proc
module_exec ps -ef | grep  -v grep | grep "/opt/ssh/sbin/sshd" | wc -l
module_description SSH running
module_end

',2,'','Service sshd status','',0,0,1,'',0,'','','','',3,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (36,5,'module_begin
module_name Total processes
module_type generic_data
module_exec echo $(((`ps -e | wc -l`)-1)) | tr -d “\n”
module_description Total processes
module_end

',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (36,5,'module_begin
module_name Total processes
module_type generic_data
module_exec echo $(((`ps -e | wc -l`)-1)) | tr -d “\n”
module_description Total processes
module_end

',1,'','Total processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (37,5,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed s/us\.*$//g | sed s/,\.*$//g
module_description Host Up time
module_end
',3,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (37,5,'module_begin
module_name Uptime
module_type generic_data_string
module_exec uptime |sed s/us\.*$//g | sed s/,\.*$//g
module_description Host Up time
module_end
',3,'','Uptime','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (38,5,'module_begin
module_name Zombie processes
module_type generic_data
module_exec ps -­elf | awk '$2~/'Z'/{print $2}' | wc -l | tr -d "\n"
module_description Zombie processes
module_end
',1,'','Zombie processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (38,5,'module_begin
module_name Zombie processes
module_type generic_data
module_exec ps -­elf | awk '$2~/'Z'/{print $2}' | wc -l | tr -d "\n"
module_description Zombie processes
module_end
',1,'','Zombie processes','',0,0,1,'',0,'','','','',4,1,1,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (39,6,'',6,'','Host Alive','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (39,6,'',6,'','Host Alive','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (40,6,'',7,'','Host Latency','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,80.00,149.00,'',150.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (40,6,'',7,'','Host Latency','',0,0,300,'',0,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,80.00,149.00,'',150.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (41,6,'',2,'Checks if port 161 is open and reachable for Pandora FMS server.','SNMP Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target IP;;_address_--_field2_;Port;;161',3,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"_address_\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Port\",\"help\":\"\",\"value\":\"161\"}}','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (41,6,'',2,'Checks if port 161 is open and reachable for Pandora FMS server.','SNMP Available','',0,0,300,'',0,'','','','',1,1,4,0,0,'','','_field1_;Target IP;;_address_--_field2_;Port;;161',3,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"_address_\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Port\",\"help\":\"\",\"value\":\"161\"}}','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
INSERT INTO `tpolicy_modules` VALUES (42,6,'',9,'Checks if port 22 is open and reachable for Pandora FMS server.','SSH Reachable','',0,0,300,'',22,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
INSERT INTO `tpolicy_modules` VALUES (42,6,'',9,'Checks if port 22 is open and reachable for Pandora FMS server.','SSH Reachable','',0,0,300,'',22,'','','','',2,1,2,0,0,NULL,NULL,NULL,0,0.000000000000000,0,0,0,'',1,0.00,0.00,'',0.00,0.00,'',0,NULL,NULL,NULL,0,0,0,'','','',0,0,0,0,0,'* * * * *',NULL,'{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
||||||
|
|
||||||
INSERT INTO `tpolicy_plugins` VALUES (1,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"',0);
|
INSERT INTO `tpolicy_plugins` VALUES (1,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"',0);
|
||||||
INSERT INTO `tpolicy_plugins` VALUES (2,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"',0);
|
INSERT INTO `tpolicy_plugins` VALUES (2,1,'cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"',0);
|
||||||
|
@ -783,3 +783,33 @@ netflowserver_threads 1
|
|||||||
# Enable (1) or disable (0) the verification of SSL certificates (set to 0 when using self-signed certificates).
|
# Enable (1) or disable (0) the verification of SSL certificates (set to 0 when using self-signed certificates).
|
||||||
ssl_verify 0
|
ssl_verify 0
|
||||||
|
|
||||||
|
# Enable (1) or disable (0) the Monitoring Anomaly Detection Engine (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver 0
|
||||||
|
|
||||||
|
# Directory where models will be stored (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_path /var/spool/pandora/data_in/models
|
||||||
|
|
||||||
|
# Number of server threads for MADE (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_threads 2
|
||||||
|
|
||||||
|
# Model backend: 'prophet' or 'iforest' (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
# 'prophet' is better suited for temporal series and supports forecasting.
|
||||||
|
# 'iforest' is faster and more efficient (cpu, memory...).
|
||||||
|
madeserver_backend prophet
|
||||||
|
|
||||||
|
# MADE will query the Pandora FMS database every madeserver_interval seconds
|
||||||
|
# to look for new data (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_interval 60
|
||||||
|
|
||||||
|
# Minimum number of data required to train a model (e.g., '7d' for seven days) (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_min_train 7d
|
||||||
|
|
||||||
|
# Maximum number of data kept to train models (e.g., '90d' for 90 days) (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_max_history 90d
|
||||||
|
|
||||||
|
# Model automatic retraining period (e.g., '7d' for seven days) (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_autofit 7d
|
||||||
|
|
||||||
|
# Model sensitivity. A lower value triggers less anomalies (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
madeserver_sensitivity 0.1
|
||||||
|
|
||||||
|
@ -583,6 +583,8 @@ sub pandora_load_config {
|
|||||||
|
|
||||||
$pa_config->{"ssl_verify"} = 0; # 7.0 774
|
$pa_config->{"ssl_verify"} = 0; # 7.0 774
|
||||||
|
|
||||||
|
$pa_config->{"madeserver"} = 0; # 774.
|
||||||
|
|
||||||
# Check for UID0
|
# Check for UID0
|
||||||
if ($pa_config->{"quiet"} != 0){
|
if ($pa_config->{"quiet"} != 0){
|
||||||
if ($> == 0){
|
if ($> == 0){
|
||||||
@ -1400,6 +1402,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^ssl_verify\s+([0-1])/i) {
|
elsif ($parametro =~ m/^ssl_verify\s+([0-1])/i) {
|
||||||
$pa_config->{'ssl_verify'} = clean_blank($1);
|
$pa_config->{'ssl_verify'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^madeserver\s+([0-1])/i){
|
||||||
|
$pa_config->{'madeserver'}= clean_blank($1);
|
||||||
|
}
|
||||||
} # end of loop for parameter #
|
} # end of loop for parameter #
|
||||||
|
|
||||||
# The DB host was overridden by pandora_ha.
|
# The DB host was overridden by pandora_ha.
|
||||||
|
@ -325,6 +325,7 @@ our @ServerTypes = qw (
|
|||||||
ncmserver
|
ncmserver
|
||||||
netflowserver
|
netflowserver
|
||||||
logserver
|
logserver
|
||||||
|
madeserver
|
||||||
);
|
);
|
||||||
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');
|
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@ our @EXPORT = qw(
|
|||||||
NCMSERVER
|
NCMSERVER
|
||||||
NETFLOWSERVER
|
NETFLOWSERVER
|
||||||
LOGSERVER
|
LOGSERVER
|
||||||
|
MADESERVER
|
||||||
METACONSOLE_LICENSE
|
METACONSOLE_LICENSE
|
||||||
OFFLINE_LICENSE
|
OFFLINE_LICENSE
|
||||||
DISCOVERY_HOSTDEVICES
|
DISCOVERY_HOSTDEVICES
|
||||||
@ -209,6 +210,7 @@ use constant CORRELATIONSERVER => 22; # Deprecated.
|
|||||||
use constant NCMSERVER => 23;
|
use constant NCMSERVER => 23;
|
||||||
use constant NETFLOWSERVER => 24;
|
use constant NETFLOWSERVER => 24;
|
||||||
use constant LOGSERVER => 25;
|
use constant LOGSERVER => 25;
|
||||||
|
use constant MADESERVER => 26;
|
||||||
|
|
||||||
# Module status
|
# Module status
|
||||||
use constant MODULE_NORMAL => 0;
|
use constant MODULE_NORMAL => 0;
|
||||||
@ -2976,6 +2978,7 @@ sub get_server_name {
|
|||||||
return "NCMSERVER" if ($server_type eq NCMSERVER);
|
return "NCMSERVER" if ($server_type eq NCMSERVER);
|
||||||
return "NETFLOWSERVER" if ($server_type eq NETFLOWSERVER);
|
return "NETFLOWSERVER" if ($server_type eq NETFLOWSERVER);
|
||||||
return "LOGSERVER" if ($server_type eq LOGSERVER);
|
return "LOGSERVER" if ($server_type eq LOGSERVER);
|
||||||
|
return "MADESERVER" if ($server_type eq MADESERVER);
|
||||||
|
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,7 @@ sub ha_load_pandora_conf($) {
|
|||||||
$conf->{'pandora_service_cmd'} = 'service pandora_server' unless defined($conf->{'pandora_service_cmd'});
|
$conf->{'pandora_service_cmd'} = 'service pandora_server' unless defined($conf->{'pandora_service_cmd'});
|
||||||
$conf->{'tentacle_service_cmd'} = 'service tentacle_serverd' unless defined ($conf->{'tentacle_service_cmd'});
|
$conf->{'tentacle_service_cmd'} = 'service tentacle_serverd' unless defined ($conf->{'tentacle_service_cmd'});
|
||||||
$conf->{'tentacle_service_watchdog'} = 1 unless defined ($conf->{'tentacle_service_watchdog'});
|
$conf->{'tentacle_service_watchdog'} = 1 unless defined ($conf->{'tentacle_service_watchdog'});
|
||||||
|
$conf->{'made_service_cmd'} = 'service pandora_made' unless defined($conf->{'made_service_cmd'});
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -257,6 +258,31 @@ sub ha_keep_pandora_running($$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Keep MADE running
|
||||||
|
##############################################################################
|
||||||
|
sub ha_keep_made_running($$) {
|
||||||
|
my ($conf, $dbh) = @_;
|
||||||
|
|
||||||
|
# Is MADE enabled?
|
||||||
|
return unless (defined($conf->{'madeserver'}) && $conf->{'madeserver'} == 1);
|
||||||
|
|
||||||
|
# Is MADE installed?
|
||||||
|
`$conf->{'made_service_cmd'} status 2>/dev/null`;
|
||||||
|
if (($? >> 8) == 4) {
|
||||||
|
log_message($conf, 'LOG', "Pandora FMS MADE is not installed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Try to get the PID of the service.
|
||||||
|
my $pid = `systemctl show --property MainPID pandora_made | cut -d= -f2`;
|
||||||
|
chomp($pid);
|
||||||
|
if ($pid eq "0") {
|
||||||
|
log_message($conf, 'LOG', 'MADE service not running.');
|
||||||
|
`$conf->{'made_service_cmd'} start 2>/dev/null`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Keep the Tentacle server running
|
# Keep the Tentacle server running
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -535,6 +561,9 @@ sub ha_main_pacemaker($) {
|
|||||||
# Keep Tentacle running
|
# Keep Tentacle running
|
||||||
ha_keep_tentacle_running($conf, $dbh);
|
ha_keep_tentacle_running($conf, $dbh);
|
||||||
|
|
||||||
|
# Keep MADE running
|
||||||
|
ha_keep_made_running($conf, $dbh);
|
||||||
|
|
||||||
# Are we the master?
|
# Are we the master?
|
||||||
pandora_set_master($conf, $dbh);
|
pandora_set_master($conf, $dbh);
|
||||||
if (!pandora_is_master($conf)) {
|
if (!pandora_is_master($conf)) {
|
||||||
@ -627,6 +656,9 @@ sub ha_main_pandora($) {
|
|||||||
# Keep Tentacle running
|
# Keep Tentacle running
|
||||||
ha_keep_tentacle_running($conf, $dbh);
|
ha_keep_tentacle_running($conf, $dbh);
|
||||||
|
|
||||||
|
# Keep MADE running
|
||||||
|
ha_keep_made_running($conf, $dbh);
|
||||||
|
|
||||||
# Are we the master?
|
# Are we the master?
|
||||||
pandora_set_master($conf, $dbh);
|
pandora_set_master($conf, $dbh);
|
||||||
if (!pandora_is_master($conf)) {
|
if (!pandora_is_master($conf)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user