Merge remote-tracking branch 'origin/develop' into ent-12607-faltan-botones-de-desacoplar-y-minimizar-en-consola-sonora-command-center

This commit is contained in:
daniel 2023-12-14 16:32:33 +01:00
commit 9e3c17bf2c
80 changed files with 2596 additions and 336 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.774-231213
Version: 7.0NG.774-231214
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231213
%define release 231214
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231213
%define release 231214
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231213
%define release 231214
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231213
%define release 231214
Summary: Pandora FMS Linux agent, binary version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231213
%define release 231214
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.774"
PI_BUILD="231213"
PI_BUILD="231214"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{231213}
{231214}
ViewReadme
{Yes}

View File

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

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.774(Build 231213))"
VALUE "ProductVersion", "(7.0NG.774(Build 231214))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.774-231213
Version: 7.0NG.774-231214
Architecture: all
Priority: optional
Section: admin

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
START TRANSACTION;
DELETE FROM `twelcome_tip` WHERE `title` = 'Automatic agent provision system';
INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Automatic agent provision system','The agent self-provisioning system allows an agent recently entered into the system to automatically apply changes to their configuration (such as moving them from group, assigning them certain values in custom fields) and of course applying certain monitoring policies. It is one of the most powerful functionalities, aimed at managing very large system parks.','https://pandorafms.com/manual/start?id=en/documentation/02_installation/05_configuration_agents#conf',1);
COMMIT;

View File

@ -1237,11 +1237,24 @@ if ($new_agent === false) {
$actionButtons .= html_print_input_hidden('id_agente', $id_agente);
if (is_management_allowed() === true) {
$clusters = agents_get_agent_belongs_cluster($id_agente);
$cluster_belongs = '';
if (empty($clusters) === false) {
$clusters = array_reduce(
$clusters,
function ($carry, $item) {
$carry[] = $item['name'];
return $carry;
}
);
$cluster_belongs = implode(', ', $clusters);
}
$actionButtons .= html_print_button(
__('Delete agent'),
'deleteAgent',
false,
'deleteAgentDialog('.$id_agente.')',
'deleteAgentDialog('.$id_agente.', "'.$cluster_belongs.'")',
[
'icon' => 'delete',
'mode' => 'secondary dialog_opener',
@ -1289,10 +1302,18 @@ ui_require_jquery_file('bgiframe');
}
}
function deleteAgentDialog($idAgente) {
function deleteAgentDialog($idAgente, cluster) {
var msg_cluster = '';
if(cluster) {
msg_cluster = "<?php echo __('This agent belongs to the clusters'); ?>";
msg_cluster += ': ';
msg_cluster += cluster;
msg_cluster += '. ';
}
confirmDialog({
title: "<?php echo __('Delete agent'); ?>",
message: "<?php echo __('This action is not reversible. Are you sure'); ?>",
message: msg_cluster + "<?php echo __('This action is not reversible. Are you sure'); ?>",
onAccept: function() {
window.location.assign('index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente='+$idAgente);
}

View File

@ -2258,6 +2258,28 @@ if ($update_module || $create_module
|| ($module_in_policy && !$module_linked)
) {
if ($success_action > 0) {
if (empty($old_configuration_data) === true
&& empty($configuration_data) === true && $disabled === '0'
&& ($enable_module || $disable_module)
) {
$modulo_nombre = io_safe_output(
db_get_value(
'nombre',
'tagente_modulo',
'id_agente_modulo',
(empty($disable_module) === false) ? $disable_module : $enable_module
)
);
$old_configuration_data = config_agents_get_module_from_conf(
$id_agente,
$modulo_nombre
);
$configuration_data = $old_configuration_data;
$disabled = (empty($disable_module) === false) ? true : false;
}
enterprise_hook(
'config_agents_write_module_in_conf',
[
@ -2406,7 +2428,6 @@ if ($disable_module) {
$modulo_nombre = io_safe_output($modulo_nombre['nombre']);
if ($result === NOERR) {
enterprise_hook('config_agents_disable_module_conf', [$id_agente, $disable_module]);
db_pandora_audit(
AUDIT_LOG_MODULE_MANAGEMENT,
'Disable #'.$disable_module.' | '.$modulo_nombre.' | '.$agent['alias']

View File

@ -958,12 +958,33 @@ if ($agents !== false) {
);
if ($check_aw === true && is_management_allowed() === true) {
if ($agent['id_os'] != CLUSTER_OS_ID) {
$onClickActionDeleteAgent = 'if (!confirm(\' '.__('Are you sure?').'\')) return false;';
} else {
$onClickActionDeleteAgent = 'if (!confirm(\' '.__('WARNING! - You are going to delete a cluster agent. Are you sure?').'\')) return false;';
$clusters = agents_get_agent_belongs_cluster($agent['id_agente']);
$cluster_belongs = '';
if (empty($clusters) === false) {
$clusters = array_reduce(
$clusters,
function ($carry, $item) {
$carry[] = $item['name'];
return $carry;
}
);
$cluster_belongs = implode(', ', $clusters);
}
$msg = '';
if ($agent['id_os'] == CLUSTER_OS_ID) {
$msg .= __('You are going to delete a cluster agent');
$msg .= '. ';
} else if (empty($cluster_belongs) === false) {
$msg .= __('This agent belongs to the clusters');
$msg .= ': ';
$msg .= $cluster_belongs;
$msg .= '. ';
}
$msg .= __('Are you sure?');
$onClickActionDeleteAgent = 'if (!confirm(\' '.$msg.'\')) return false;';
$agentActionButtons[] = html_print_menu_button(
[
'href' => ui_get_full_url(

View File

@ -154,7 +154,7 @@ if ($is_management_allowed === true && $update_group === true) {
$subcheck = db_get_value('name', 'tmodule_group', 'id_mg', $id_group);
if ($name) {
if (!$check || $subcheck == $name) {
if ($check === false || strcasecmp($subcheck, $name) === 0) {
$result = db_process_sql_update(
'tmodule_group',
['name' => $name],

View File

@ -117,6 +117,8 @@ $exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING;
$exception_condition_value = 10;
$modulegroup = 0;
$period = SECONDS_1DAY;
$period_time_service_level = '28800';
$show_agents = false;
$search = '';
$full_text = 0;
$log_number = 1000;
@ -882,6 +884,28 @@ switch ($action) {
$idAgentModule = $module;
break;
case 'service_level':
$description = $item['description'];
$es = json_decode($item['external_source'], true);
$period_time_service_level = $es['period_time_service_level'];
$show_agents = $es['show_agents'];
// Decode agents and modules.
$id_agents = json_decode(
io_safe_output(base64_decode($es['id_agents'])),
true
);
$module = json_decode(
io_safe_output(base64_decode($es['module'])),
true
);
$recursion = $item['recursion'];
$group = $item['id_group'];
$modulegroup = $item['id_module_group'];
$idAgentModule = $module;
break;
case 'end_of_life':
$es = json_decode($item['external_source'], true);
@ -1038,7 +1062,13 @@ switch ($action) {
break;
case 'ncm':
$idAgent = $item['id_agent'];
$id_agent_ncm = json_decode($item['ncm_agents']);
$ncm_group = $item['id_group'];
break;
case 'ncm_backups':
$id_agent_ncm = json_decode($item['ncm_agents']);
$ncm_group = $item['id_group'];
break;
case 'top_n_agents_sh':
@ -1146,6 +1176,7 @@ switch ($action) {
case 'sumatory':
case 'database_serialized':
case 'last_value':
case 'service_level':
case 'monitor_report':
case 'min_value':
case 'max_value':
@ -1656,6 +1687,53 @@ if (is_metaconsole() === true) {
</td>
</tr>
<tr id="row_period_service_level" class="datos">
<td class="bolder">
<?php
echo __('Time lapse');
ui_print_help_tip(
__('This is the range, or period of time over which the report renders the information for this report type. For example, a week means data from a week ago from now. ')
);
?>
</td>
<td >
<?php
$fields_time_service_level = [
'604800' => __('1 week'),
'172800' => __('48 hours'),
'86400' => __('24 hours'),
'43200' => __('12 hours'),
'28800' => __('8 hours'),
];
html_print_select(
$fields_time_service_level,
'period_time_service_level',
$period_time_service_level,
);
?>
</td>
</tr>
<tr id="row_show_agents" class="datos">
<td class="bolder" class="datos">
<?php
echo __('Show agents');
?>
</td>
<td >
<?php
html_print_checkbox_switch(
'show_agents',
'1',
$show_agents,
false,
false,
);
?>
</td>
</tr>
<tr id="row_period_range" class="datos">
<td class="bolder">
<?php
@ -2007,6 +2085,71 @@ if (is_metaconsole() === true) {
?>
</td>
</tr>
<tr id="row_ncm_group" class="datos">
<td class="bolder"><?php echo __('Group NCM'); ?></td>
<td >
<?php
echo '<div class="w250px inline padding-right-2-imp">';
$url = ui_get_full_url('ajax.php');
html_print_input_hidden('url_ajax', $url, false, false, false, 'url_ajax');
if (check_acl($config['id_user'], 0, 'RW')) {
html_print_select_groups(
$config['id_user'],
'RW',
true,
'ncm_group',
$ncm_group,
'filterNcmAgentChange()',
);
} else if (check_acl($config['id_user'], 0, 'RM')) {
html_print_select_groups(
$config['id_user'],
'RM',
true,
'ncm_group',
$ncm_group,
'filterNcmAgentChange()',
);
}
echo '</div>';
?>
</td>
</tr>
<tr id="row_ncm_agent">
<td class="bolder"><?php echo __('Agent NCM'); ?></td>
<td >
<?php
echo '<div class="w250px inline padding-right-2-imp">';
$all_agents = agents_get_agents_selected($ncm_group);
html_print_select(
$all_agents,
'agent_ncm[]',
$id_agent_ncm,
'',
__('Any'),
0,
false,
true,
true,
'',
false,
'width: 100%;',
false,
false,
false,
'',
false,
false,
false,
false,
true,
true,
);
echo '</div>';
?>
</td>
</tr>
<tr id="row_source" class="datos">
<td class="bolder"><?php echo __('Source'); ?></td>
<td >
@ -2263,7 +2406,7 @@ if (is_metaconsole() === true) {
$modulegroup,
$id_agents,
!$selection_a_m,
false
true
);
}
@ -5862,8 +6005,13 @@ $(document).ready (function () {
switch (type){
case 'agent_module':
case 'agent_module_status':
case 'service_level':
case 'alert_report_actions':
var agents_multiple = $('#id_agents2').val();
if (agents_multiple.length == 0) {
dialog_message('#message_no_agent');
return false;
}
var modules_multiple = $('#module').val();
$('#hidden-id_agents2-multiple-text').val(JSON.stringify(agents_multiple));
$('#hidden-module-multiple-text').val(JSON.stringify(modules_multiple));
@ -5889,6 +6037,7 @@ $(document).ready (function () {
case 'agent_configuration':
case 'module_histogram_graph':
case 'increment':
case 'service_level':
if ($("#hidden-id_agent").val() == 0) {
dialog_message('#message_no_agent');
return false;
@ -6049,8 +6198,13 @@ $(document).ready (function () {
switch (type){
case 'agent_module':
case 'agent_module_status':
case 'service_level':
case 'alert_report_actions':
var agents_multiple = $('#id_agents2').val();
if (agents_multiple.length == 0) {
dialog_message('#message_no_agent');
return false;
}
var modules_multiple = $('#module').val();
$('#hidden-id_agents2-multiple-text').val(JSON.stringify(agents_multiple));
$('#hidden-module-multiple-text').val(JSON.stringify(modules_multiple));
@ -6076,6 +6230,7 @@ $(document).ready (function () {
case 'agent_configuration':
case 'module_histogram_graph':
case 'increment':
case 'service_level':
if ($("#hidden-id_agent").val() == 0) {
dialog_message('#message_no_agent');
return false;
@ -7071,6 +7226,9 @@ function chooseType() {
$("#row_agent").hide();
$("#row_module").hide();
$("#row_search").hide();
$("#row_period").hide();
$("#row_period_service_level").hide();
$("#row_show_agents").hide();
$("#row_log_number").hide();
$("#row_period1").hide();
$("#row_period2").hide();
@ -7218,6 +7376,10 @@ function chooseType() {
$('#agent_autocomplete_events').show();
// NCM fields.
$("#row_ncm_group").hide();
$("#row_ncm_agent").hide();
switch (type) {
case 'event_report_group':
$("#row_description").show();
@ -7767,6 +7929,22 @@ function chooseType() {
}
$("#row_historical_db_check").hide();
break;
case 'service_level':
$("#row_period_service_level").show();
$("#row_show_agents").show();
$("#row_description").show();
$("#row_group").show();
$("#select_agent_modules").show();
$("#agents_modules_row").show();
$("#modules_row").show();
$("#row_historical_db_check").hide();
loadGeneralAgents();
$("#combo_group").change(function() {
loadGeneralAgents($(this).val());
});
$("#row_module_group").show();
break;
case 'agent_module':
$("#row_module_group").show();
@ -8065,7 +8243,13 @@ function chooseType() {
break;
case 'ncm':
$("#row_agent").show();
$("#row_ncm_group").show();
$("#row_ncm_agent").show();
break;
case 'ncm_backups':
$("#row_ncm_group").show();
$("#row_ncm_agent").show();
break;
case 'top_n_agents_sh':
@ -8448,4 +8632,43 @@ $(document).ready(function () {
});
});
// Ncm agent filter by group.
function filterNcmAgentChange() {
var idGroup = $("#ncm_group").val();
const url_ajax = $("#url_ajax").val();
$.ajax({
url: url_ajax,
type: "POST",
dataType: "json",
async: false,
data: {
page: "operation/agentes/ver_agente",
get_ncm_agents: 1,
id_group: idGroup,
privilege: "AW",
keys_prefix: "_"
},
success: function(data) {
$("#agent_ncm").empty();
var optionAny = $("<option></option>")
.attr("value",0)
.html("Any");
// Add any option.
$("#agent_ncm").append(optionAny);
data.map(item => {
var option = $("<option></option>")
.attr("value", item.id_agent)
.html(item.alias);
// Add agents options.
$("#agent_ncm").append(option);
});
},
error: function(err) {
console.error(err);
}
});
}
</script>

View File

@ -1730,10 +1730,20 @@ switch ($action) {
$good_format = true;
break;
case 'service_level':
$es['period_time_service_level'] = get_parameter('period_time_service_level', '28800');
$es['show_agents'] = get_parameter('show_agents', false);
case 'agent_module':
case 'agent_module_status':
$agents_to_report_text = get_parameter('id_agents2-multiple-text', '');
if ($agents_to_report_text === '' || $agents_to_report_text === 'null') {
$agents_to_report_text = io_safe_input(json_encode(get_parameter('id_agents2', '')));
}
$modules_to_report_text = get_parameter('module-multiple-text', '');
if ($modules_to_report_text === '' || $modules_to_report_text === 'null') {
$modules_to_report_text = io_safe_input(json_encode(get_parameter('module', '')));
}
// Decode json check modules.
$agents_to_report = json_decode(
@ -1745,11 +1755,16 @@ switch ($action) {
true
);
$es['module'] = get_same_modules_all(
$agents_to_report,
$modules_to_report
);
if ((bool) is_metaconsole() === true) {
$es['module'] = $modules_to_report;
}
// Encode json modules and agents.
$es['module'] = base64_encode(json_encode($es['module']));
$es['id_agents'] = base64_encode(json_encode($agents_to_report));
@ -2046,6 +2061,20 @@ switch ($action) {
$good_format = true;
break;
case 'ncm_backups':
$agents_ncm = get_parameter('agent_ncm');
$values['ncm_agents'] = json_encode($agents_ncm);
$values['id_group'] = get_parameter('ncm_group');
$good_format = true;
break;
case 'ncm':
$agents_ncm = get_parameter('agent_ncm');
$values['ncm_agents'] = json_encode($agents_ncm);
$values['id_group'] = get_parameter('ncm_group');
$good_format = true;
break;
case 'vuls_severity_graph':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
@ -2116,7 +2145,10 @@ switch ($action) {
break;
}
$values['id_agent'] = get_parameter('id_agent');
if (isset($values['id_agent']) === false) {
$values['id_agent'] = get_parameter('id_agent');
}
$values['id_gs'] = get_parameter('id_custom_graph');
$values['id_agent_module'] = '';
@ -2232,7 +2264,10 @@ switch ($action) {
$values['id_module_group'] = get_parameter(
'combo_modulegroup'
);
$values['id_group'] = get_parameter('combo_group');
if (isset($values['id_group']) === false) {
$values['id_group'] = get_parameter('combo_group');
}
if ($values['server_name'] == '') {
$values['server_name'] = get_parameter(
@ -2780,10 +2815,20 @@ switch ($action) {
$good_format = true;
break;
case 'service_level':
$es['period_time_service_level'] = get_parameter('period_time_service_level', '28800');
$es['show_agents'] = get_parameter('show_agents', false);
case 'agent_module':
case 'agent_module_status':
$agents_to_report_text = get_parameter('id_agents2-multiple-text');
$agents_to_report_text = get_parameter('id_agents2-multiple-text', '');
if ($agents_to_report_text === '' || $agents_to_report_text === 'null') {
$agents_to_report_text = io_safe_input(json_encode(get_parameter('id_agents2', '')));
}
$modules_to_report_text = get_parameter('module-multiple-text', '');
if ($modules_to_report_text === '' || $modules_to_report_text === 'null') {
$modules_to_report_text = io_safe_input(json_encode(get_parameter('module', '')));
}
// Decode json check modules.
$agents_to_report = json_decode(
@ -2800,11 +2845,14 @@ switch ($action) {
$modules_to_report
);
if ((bool) is_metaconsole() === true) {
$es['module'] = $modules_to_report;
}
// Encode json modules and agents.
$es['module'] = base64_encode(json_encode($es['module']));
$es['id_agents'] = base64_encode(json_encode($agents_to_report));
$es['show_type'] = get_parameter('show_type', 0);
$values['external_source'] = json_encode($es);
$good_format = true;
break;
@ -3029,6 +3077,21 @@ switch ($action) {
$good_format = true;
break;
case 'ncm_backups':
$agents_ncm = get_parameter('agent_ncm');
$values['ncm_agents'] = json_encode($agents_ncm);
$values['id_group'] = get_parameter('ncm_group');
$good_format = true;
break;
case 'ncm':
$agents_ncm = get_parameter('agent_ncm');
$values['ncm_agents'] = json_encode($agents_ncm);
$values['id_agent'] = get_parameter('agent_ncm');
$values['id_group'] = get_parameter('ncm_group');
$good_format = true;
break;
case 'vuls_severity_graph':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
@ -3105,7 +3168,10 @@ switch ($action) {
);
}
$values['id_agent'] = get_parameter('id_agent');
if (isset($values['id_agent']) === false) {
$values['id_agent'] = get_parameter('id_agent');
}
$values['id_gs'] = get_parameter('id_custom_graph');
if (($values['type'] == 'alert_report_agent')
|| ($values['type'] == 'event_report_agent')
@ -3219,7 +3285,9 @@ switch ($action) {
$values['id_module_group'] = get_parameter(
'combo_modulegroup'
);
$values['id_group'] = get_parameter('combo_group');
if (isset($values['id_group']) === false) {
$values['id_group'] = get_parameter('combo_group');
}
if ((($values['type'] == 'custom_graph')

View File

@ -896,6 +896,35 @@ echo '<legend>'.__('Mail configuration').'</legend>';
echo '</fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('NCM Configuration').'</legend>';
$table_ncm_config = new stdClass();
$table_ncm_config->width = '100%';
$table_ncm_config->class = 'databox filter-table-adv';
$table_ncm_config->size = [];
$table_ncm_config->size[0] = '50%';
$table_ncm_config->data = [];
$table_ncm_config->data[0][] = html_print_label_input_block(
__('FTP server IP').ui_print_help_tip(__('This value will be used by TFTP_SERVER_IP macro in NCM scripts.'), true),
html_print_input_text(
'tftp_server_ip',
$config['tftp_server_ip'],
'',
false,
255,
true,
false,
false,
'',
'w50p'
)
);
html_print_table($table_ncm_config);
echo '</fieldset>';
html_print_action_buttons(
html_print_submit_button(

View File

@ -1422,6 +1422,14 @@ class DiscoveryTaskList extends HTML
$table->rowid = [];
$table->data = [];
$countErrors = 1;
$tableErrors = new StdClasS();
$tableErrors->class = 'databox data';
$tableErrors->width = '75%';
$tableErrors->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;';
$tableErrors->rowid = [];
$tableErrors->data = [];
if ($task['review_mode'] == DISCOVERY_RESULTS) {
$agents_review = db_get_all_rows_filter(
'tdiscovery_tmp_agents',
@ -1476,11 +1484,11 @@ class DiscoveryTaskList extends HTML
$countSummary = 1;
if (is_array($task['stats']) === true && count(array_filter(array_keys($task['stats']), 'is_numeric')) === count($task['stats'])) {
foreach ($task['stats'] as $key => $summary) {
$table->data[$i][0] = '<b>'.__('Summary').' '.$countSummary.'</b>';
$table->data[$i][1] = '';
$countSummary++;
$i++;
if (is_array($summary) === true) {
$table->data[$i][0] = '<b>'.__('Summary').' '.$countSummary.'</b>';
$table->data[$i][1] = '';
$countSummary++;
$i++;
if (empty($summary['summary']) === true && empty($summary['info']) === true) {
$table->data[$i][0] = json_encode($summary, JSON_PRETTY_PRINT);
$table->data[$i][1] = '';
@ -1517,8 +1525,12 @@ class DiscoveryTaskList extends HTML
$i++;
}
} else {
$table->data[$i][0] = $summary;
$table->data[$i][1] = '';
$tableErrors->data[$i][0] = '<b>'.__('Error %s', $countErrors).'</b>';
$tableErrors->data[$i][1] = '';
$i++;
$tableErrors->data[$i][0] = $summary;
$tableErrors->data[$i][1] = '';
$countErrors++;
$i++;
}
}
@ -1560,12 +1572,26 @@ class DiscoveryTaskList extends HTML
$table->data[$i++][1] .= '</span>';
}
} else {
$table->data[$i][0] = $task['stats']['summary'];
$tableErrors->data[$i][0] = '<b>'.__('Error %s', $countErrors).'</b>';
$tableErrors->data[$i][1] = '';
$i++;
$tableErrors->data[$i][0] = $task['stats']['summary'];
$tableErrors->data[$i][1] = '';
$countErrors++;
$i++;
}
}
$output = '<div class="subtitle"><span>'.__('Summary').'</span></div>';
$output .= html_print_table($table, true).'</div>';
if (is_array($table->data) === true && count($table->data) > 0) {
$output .= html_print_table($table, true);
}
if (is_array($tableErrors->data) === true && count($tableErrors->data) > 0) {
$output .= html_print_table($tableErrors, true);
}
$output .= '</div>';
}
return $output;

View File

@ -0,0 +1,7 @@
<?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>donut</title>
<g id="donut" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M10,1 C14.9705627,1 19,5.02943725 19,10 C19,14.9705627 14.9705627,19 10,19 C5.02943725,19 1,14.9705627 1,10 C1,5.02943725 5.02943725,1 10,1 Z M10,6 C7.790861,6 6,7.790861 6,10 C6,12.209139 7.790861,14 10,14 C12.209139,14 14,12.209139 14,10 C14,7.790861 12.209139,6 10,6 Z" id="Oval" fill="#484848" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 649 B

View File

@ -251,7 +251,7 @@ if ($change_custom_fields_macros_report === true) {
}
if ($get_agents === true) {
$agents_id = str_replace('&quot;', '', $agents_id);
$agents_id = str_replace('&quot;', '"', $agents_id);
try {
$agents_id = json_decode($agents_id, true);

View File

@ -189,7 +189,8 @@ if (is_ajax() === true) {
$serverID,
$childrenMethod,
$access,
$metaID
$metaID,
$filter['groupID']
);
break;

View File

@ -549,8 +549,12 @@ class Heatmap
global $config;
$filter_group = '';
if (empty($this->filter) === false && current($this->filter) != -1) {
if (empty($this->filter) === false && current($this->filter) != -1
&& implode(',', $this->filter) !== ''
) {
$filter_group = 'AND am.id_module_group IN ('.implode(',', $this->filter).')';
} else {
return false;
}
$filter_name = '';

View File

@ -761,7 +761,7 @@ class TipsWindow
);
$table->data[1][1] = html_print_label_input_block(
__('Url'),
html_print_input_text('url', '', '', 35, 100, true)
html_print_input_text('url', '', '', 35, 255, true)
);
$table->data[2][0] = html_print_label_input_block(
__('Text'),
@ -928,7 +928,7 @@ class TipsWindow
);
$table->data[1][1] = html_print_label_input_block(
__('Url'),
html_print_input_text('url', $tip['url'], '', 35, 100, true)
html_print_input_text('url', $tip['url'], '', 35, 255, true)
);
$table->data[2][0] = html_print_label_input_block(
__('Text'),

View File

@ -32,6 +32,8 @@ class Tree
protected $rootType = null;
protected $idGroup = null;
protected $id = -1;
protected $rootID = -1;
@ -87,13 +89,15 @@ class Tree
$serverID=false,
$childrenMethod='on_demand',
$access='AR',
$id_meta_server=0
$id_meta_server=0,
$id_group=0
) {
$this->type = $type;
$this->rootType = !empty($rootType) ? $rootType : $type;
$this->id = $id;
$this->rootID = !empty($rootID) ? $rootID : $id;
$this->serverID = $serverID;
$this->idGroup = $id_group;
if (is_metaconsole() && $id_meta_server == 0) {
$this->serverName = metaconsole_get_server_by_id($serverID);
}

View File

@ -88,7 +88,8 @@ class TreeService extends Tree
$serverID=false,
$childrenMethod='on_demand',
$access='AR',
$id_server_meta=0
$id_server_meta=0,
$id_group=0
) {
global $config;
@ -105,7 +106,8 @@ class TreeService extends Tree
$serverID,
$childrenMethod,
$access,
$id_server_meta
$id_server_meta,
$id_group
);
$this->L1fieldName = 'id_group';
@ -268,6 +270,13 @@ class TreeService extends Tree
$groups_acl = 'AND ts.id_group IN ('.implode(',', $this->userGroupsArray).')';
}
// Filter group.
if ((int) $this->idGroup !== 0) {
$filter_group = 'AND ts.id_group = '.$this->idGroup;
} else {
$filter_group = '';
}
$exclude_children = 'ts.id NOT IN (
SELECT DISTINCT id_service_child
FROM tservice_element
@ -300,11 +309,13 @@ class TreeService extends Tree
%s
%s
%s
%s
GROUP BY ts.id',
$exclude_children,
$is_favourite,
$service_search,
$groups_acl
$groups_acl,
$filter_group
);
$stats = db_get_all_rows_sql($sql);

View File

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

View File

@ -3643,7 +3643,7 @@ function select_modules_for_agent_group(
if (!$selection && $agents != null) {
$number_agents = count($id_agents);
$selection_filter = "HAVING COUNT(id_agente_modulo) = $number_agents";
$selection_filter = "GROUP BY nombre HAVING COUNT(id_agente_modulo) = $number_agents";
}
if (tags_has_user_acl_tags(false)) {
@ -3664,7 +3664,7 @@ function select_modules_for_agent_group(
$sql = "SELECT * FROM
(
SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.nombre
SELECT (tagente_modulo.id_agente_modulo), tagente_modulo.nombre, tagente.alias
FROM tagente_modulo
$sql_tags_inner
INNER JOIN tagente
@ -3679,7 +3679,7 @@ function select_modules_for_agent_group(
$filter_not_string_modules
$sql_conditions_tags
) x
GROUP BY nombre
$selection_filter";
$modules = db_get_all_rows_sql($sql);
@ -4976,13 +4976,38 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
}
/**
* agent belongs to the clusters.
*
* @param integer $idAgent
*
* @return array Names clusters.
*/
function agents_get_agent_belongs_cluster(int $idAgent): array
{
$sql = sprintf(
'SELECT tcluster.name
FROM tcluster
INNER JOIN tcluster_agent
ON tcluster.id = tcluster_agent.id_cluster
WHERE tcluster_agent.id_agent = %d',
$idAgent
);
$result = db_get_all_rows_sql($sql);
if ($result === false) {
$result = [];
}
return $result;
}
/**
* Return an array with a list of status agents
*
* @return array.
*/
function agents_status_list()
{
$status_list = [];

View File

@ -431,6 +431,10 @@ function config_update_config()
if (config_update_value('inventory_changes_blacklist', implode(',', $inventory_changes_blacklist), true) === false) {
$error_update[] = __('Inventory changes blacklist');
}
if (config_update_value('tftp_server_ip', (string) get_parameter('tftp_server_ip'), true) === false) {
$error_update[] = __('Ftp server ip');
}
break;
case 'enterprise':

View File

@ -5039,7 +5039,11 @@ function events_page_general($event)
$data[1] = $user_owner;
}
$table_general->cellclass[3][1] = 'general_owner';
if (is_metaconsole() === true && $event['server_name'] !== '') {
$table_general->cellclass[4][1] = 'general_owner';
} else {
$table_general->cellclass[3][1] = 'general_owner';
}
$table_general->data[] = $data;
@ -5099,38 +5103,21 @@ function events_page_general($event)
$table_general->cellclass[count($table_general->data)][1] = 'general_acknowleded';
$data = [];
if (empty($event['server_id']) === false && (int) $event['server_id'] > 0
&& is_metaconsole() === true
) {
$node_connect = new Node($event['server_id']);
$node_connect->connect();
}
$data[0] = __('Acknowledged by');
$data[1] = events_page_general_acknowledged($event['id_evento']);
if ($event['estado'] == 1 || $event['estado'] == 2) {
if (empty($event['id_usuario']) === true) {
$user_ack = __('Autovalidated');
} else {
$user_ack = db_get_value(
'fullname',
'tusuario',
'id_user',
$event['id_usuario']
);
if (empty($user_ack) === true) {
$user_ack = $event['id_usuario'];
}
}
$data[1] = $user_ack.'&nbsp;(&nbsp;';
if ($event['ack_utimestamp_raw'] !== false
&& $event['ack_utimestamp_raw'] !== 'false'
&& empty($event['ack_utimestamp_raw']) === false
) {
$data[1] .= date(
$config['date_format'],
$event['ack_utimestamp_raw']
);
}
$data[1] .= '&nbsp;)&nbsp;';
} else {
$data[1] = '<i>'.__('N/A').'</i>';
if (empty($event['server_id']) === false && (int) $event['server_id'] > 0
&& is_metaconsole() === true
) {
$node_connect->disconnect();
}
$table_general->cellclass[7][1] = 'general_status';
@ -5237,15 +5224,19 @@ function events_page_general_acknowledged($event_id)
$Acknowledged = '';
$event = db_get_row('tevento', 'id_evento', $event_id);
if ($event !== false && ($event['estado'] == 1 || $event['estado'] == 2)) {
$user_ack = db_get_value(
'fullname',
'tusuario',
'id_user',
$config['id_user']
);
if (empty($event['id_usuario']) === true) {
$user_ack = __('Autovalidated');
} else {
$user_ack = db_get_value(
'fullname',
'tusuario',
'id_user',
$config['id_user']
);
if (empty($user_ack) === true) {
$user_ack = $config['id_user'];
if (empty($user_ack) === true) {
$user_ack = $config['id_user'];
}
}
$Acknowledged = $user_ack.'&nbsp;(&nbsp;';
@ -5260,7 +5251,7 @@ function events_page_general_acknowledged($event_id)
$Acknowledged .= '&nbsp;)&nbsp;';
} else {
$Acknowledged = 'N/A';
$Acknowledged = '<i>'.__('N/A').'</i>';
}
return $Acknowledged;
@ -5846,7 +5837,7 @@ function events_get_field_value_by_event_id(
}
function events_get_instructions($event)
function events_get_instructions($event, $max_text_length=300)
{
if (is_array($event) === false) {
return '';
@ -5894,17 +5885,17 @@ function events_get_instructions($event)
return '';
}
$max_text_length = 300;
$over_text = io_safe_output($value);
if (strlen($over_text) > ($max_text_length + 3)) {
$over_text = substr($over_text, 0, $max_text_length).'...';
} else {
return $value;
}
$output = '<div id="hidden_event_instructions_'.$event['id_evento'].'"';
$output .= ' class="event_instruction">';
$output .= $value;
$output .= '</div>';
$output .= '<center>';
$output .= '<span id="value_event_'.$event['id_evento'].'" class="nowrap">';
$output .= '<span id="value_event_text_'.$event['id_evento'].'"></span>';
$output .= '<a href="javascript:show_instructions('.$event['id_evento'].')">';
@ -5913,7 +5904,6 @@ function events_get_instructions($event)
true,
['title' => $over_text]
).'</a></span>';
$output .= '</center>';
return $output;
}
@ -6472,7 +6462,12 @@ function event_print_graph(
$color[] = '#82b92f';
}
} else {
$interval_length = (int) ($period / $num_intervals);
if ($num_intervals > 0) {
$interval_length = (int) ($period / $num_intervals);
} else {
$interval_length = 0;
}
$intervals = [];
$intervals[0] = $start_utimestamp;
for ($i = 0; $i < $num_intervals; $i++) {

View File

@ -581,6 +581,9 @@ function io_output_password($password, $wrappedBy='')
$output = ($plaintext === ENTERPRISE_NOT_HOOK) ? $password : $plaintext;
// If password already decrypt return same password.
$output = (empty($plaintext) === true) ? $password : $plaintext;
return sprintf(
'%s%s%s',
$wrappedBy,

View File

@ -984,7 +984,8 @@ if (is_ajax()) {
<th style="width: 60%; text-align: left; border: 0px;">
<h1>'.$product_name.'</h1>
<p><span>'.__('Version').' '.$pandora_version.$lts_name.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
<p><span>'.__('Current package').'</span> '.$config['current_package'].'</p>
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
<p><span>Build</span>'.$build_version.'</p>';
if (enterprise_installed() === true) {
$dialog .= '<p><span>'.__('Support expires').'</span>'.$license_expiry_date.'</p>';

View File

@ -3801,7 +3801,7 @@ function get_modules_agents(
$return = array_reduce(
$modules[$tserver],
function ($carry, $item) use ($tserver, $nodes) {
function ($carry, $item) use ($tserver, $nodes, $selection) {
$t = [];
foreach ($item as $k => $v) {
$t[$k] = $v;
@ -3809,9 +3809,15 @@ function get_modules_agents(
$t['id_node'] = $tserver;
if ($nodes[$tserver] !== null) {
$t['nombre'] = io_safe_output(
$nodes[$tserver]->server_name().' &raquo; '.$t['nombre']
);
if (isset($t['alias']) === true && (bool) $selection === true) {
$t['nombre'] = io_safe_output(
$nodes[$tserver]->server_name().' &raquo; '.$t['alias'].' &raquo; '.$t['nombre']
);
} else {
$t['nombre'] = io_safe_output(
$nodes[$tserver]->server_name().' &raquo; '.$t['nombre']
);
}
}
$carry[] = $t;
@ -3845,9 +3851,23 @@ function get_modules_agents(
$selection,
false,
$useName,
false,
true,
$notStringModules
);
$modules = array_reduce(
$modules,
function ($carry, $item) use ($id_agents, $selection) {
if (count($id_agents) > 1 && (bool) $selection === true) {
$carry[$item['id_agente_modulo']] = $item['alias'].' &raquo; '.$item['nombre'];
} else {
$carry[$item['id_agente_modulo']] = $item['nombre'];
}
return $carry;
},
[]
);
}
return $modules;

View File

@ -804,6 +804,13 @@ function reporting_make_reporting_data(
);
break;
case 'service_level':
$report['contents'][] = reporting_service_level_detail(
$report,
$content
);
break;
case 'end_of_life':
$report['contents'][] = reporting_end_of_life(
$report,
@ -966,7 +973,15 @@ function reporting_make_reporting_data(
break;
case 'ncm':
$report['contents'][] = reporting_ncm_config(
$report['contents'][] = reporting_ncm_list(
$report,
$content,
$pdf
);
break;
case 'ncm_backups':
$report['contents'][] = reporting_ncm_backups(
$report,
$content,
$pdf
@ -3707,6 +3722,60 @@ function reporting_agent_module_status($report, $content)
}
/**
* Service level detail
*
* @param array $report Info Report.
* @param array $content Info content.
*
* @return array
*/
function reporting_service_level_detail($report, $content)
{
global $config;
$return['type'] = 'service_level';
$module_data = [];
$interval_range = [];
$service_level_data = [];
$current_timestamp = time();
$return['title'] = io_safe_output($content['name']);
$return['landscape'] = $content['landscape'];
$return['pagebreak'] = $content['pagebreak'];
$return['description'] = io_safe_output($content['description']);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
$es = json_decode($content['external_source'], true);
$return['date'] = [];
$return['date']['date'] = false;
$return['date']['period'] = $es['period_time_service_level'];
$return['show_agents'] = $es['show_agents'];
$modules = json_decode(base64_decode($es['module']), true);
$agents = json_decode(base64_decode($es['id_agents']), true);
$interval_range['start'] = ($current_timestamp - $es['period_time_service_level']);
$interval_range['end'] = $current_timestamp;
foreach ($modules as $module) {
$service_level_data = service_level_module_data($interval_range['start'], $interval_range['end'], $module);
$module_data[$module] = [];
$module_data[$module]['mtrs'] = ($service_level_data['mtrs'] !== false) ? human_milliseconds_to_string(($service_level_data['mtrs'] * 100), 'short') : '-';
$module_data[$module]['mtbf'] = ($service_level_data['mtbf'] !== false) ? human_milliseconds_to_string(($service_level_data['mtbf'] * 100), 'short') : '-';
$module_data[$module]['availability'] = ($service_level_data['availability'] !== false) ? $service_level_data['availability'] : '100';
$module_data[$module]['warning_events'] = ($service_level_data['warning_events'] !== false) ? $service_level_data['warning_events'] : '0';
$module_data[$module]['critical_events'] = ($service_level_data['critical_events'] !== false) ? $service_level_data['critical_events'] : '0';
$module_data[$module]['last_status_change'] = ($service_level_data['last_status_change'] !== false) ? $service_level_data['last_status_change'] : '';
$module_data[$module]['module_name'] = ($service_level_data['module_name'] !== false) ? $service_level_data['module_name'] : '';
$module_data[$module]['agent_alias'] = ($service_level_data['agent_alias'] !== false) ? $service_level_data['agent_alias'] : '';
}
$return['data'] = $module_data;
return reporting_check_structure_content($return);
}
/**
* OS Version End of Life
*

View File

@ -260,7 +260,6 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust
}
$table->colspan['description_row']['description'] = 3;
switch ($item['type']) {
case 'availability':
default:
@ -403,6 +402,10 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust
reporting_html_agent_module_status($table, $item);
break;
case 'service_level':
reporting_html_service_level($table, $item);
break;
case 'end_of_life':
reporting_html_end_of_life($table, $item);
break;
@ -477,7 +480,11 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust
break;
case 'ncm':
reporting_html_ncm_config($table, $item);
reporting_html_ncm_list($table, $item);
break;
case 'ncm_backups':
reporting_html_ncm_backups($table, $item);
break;
case 'top_n_agents_sh':
@ -3080,6 +3087,85 @@ function reporting_html_agent_module_status($table, $item, $pdf=0)
}
function reporting_html_service_level($table, $item, $pdf=0)
{
global $config;
$return_pdf = '';
if (empty($item['data']) === true) {
if ($pdf !== 0) {
$return_pdf .= __('No items');
} else {
$table->colspan['group_report']['cell'] = 3;
$table->cellstyle['group_report']['cell'] = 'text-align: center;';
$table->data['group_report']['cell'] = __('No items');
}
} else {
$table_info = new stdClass();
$table_info->width = '99%';
if ($item['show_agents'] === '1') {
$show_agents = 'on';
} else {
$show_agents = 'off';
}
if ($show_agents === 'on') {
$table_info->head[0] = __('Agent / Module');
} else {
$table_info->head[0] = __('Module');
}
$table_info->head[1] = __('% Av.');
$table_info->head[2] = __('MTBF');
$table_info->head[3] = __('MTRS');
$table_info->head[4] = __('Crit. Events').ui_print_help_tip(__('Counted only critical events generated automatic by the module'), true);
$table_info->head[5] = __('Warn. Events').ui_print_help_tip(__('Counted only warning events generated automatic by the module'), true);
$table_info->head[6] = __('Last change');
$table_info->data = [];
$table_info->cellstyle = [];
$row = 0;
foreach ($item['data'] as $agentmodule_id => $module_data) {
if ($show_agents === 'on') {
$table_info->data[$row][0] = $module_data['agent_alias'].' / '.$module_data['module_name'];
$table_info->cellstyle[$row][0] = 'text-align:left; padding-left: 30px;';
} else {
$table_info->data[$row][0] = $module_data['module_name'];
$table_info->cellstyle[$row][0] = 'text-align:left; padding-left: 30px;';
}
$table_info->data[$row][1] = $module_data['availability'].'%';
$table_info->data[$row][2] = $module_data['mtbf'];
$table_info->data[$row][3] = $module_data['mtrs'];
$table_info->data[$row][4] = $module_data['critical_events'];
$table_info->data[$row][5] = $module_data['warning_events'];
if ($module_data['last_status_change'] !== '') {
$table_info->data[$row][6] = date(TIME_FORMAT, $module_data['last_status_change']);
}
// $table_info->data[$row][6] = date(TIME_FORMAT, $module_data['last_status_change']);
$row++;
}
if ($pdf !== 0) {
$table_info->title = $item['title'];
$table_info->titleclass = 'title_table_pdf';
$table_info->titlestyle = 'text-align:left;';
$return_pdf .= html_print_table($table_info, true);
} else {
$table->colspan['data']['cell'] = 3;
$table->cellstyle['data']['cell'] = 'text-align: center;';
$table->data['data']['cell'] = html_print_table($table_info, true);
}
}
if ($pdf !== 0) {
return $return_pdf;
}
}
/**
* Html report end of life.
*
@ -7665,40 +7751,146 @@ function reporting_html_permissions($table, $item, $pdf=0)
/**
* HTML content for ncm configuration diff report.
* HTML content for ncm devices list.
*
* @param array $item Content generated by reporting_ncm_config.
* @param array $item Content generated by reporting_ncm_list.
*
* @return string HTML code.
*/
function reporting_html_ncm_config($table, $item, $pdf=0)
function reporting_html_ncm_list($table, $item, $pdf=0)
{
$key = uniqid();
// Create table diff.
$table_ncm = new stdClass();
$table_ncm->width = '100%';
$table_ncm->class = 'info_table';
$table_ncm->styleTable = 'table-layout: fixed;';
$table_ncm->titleclass = 'title_table_pdf';
$table_ncm->align = [];
$table_ncm->align['name'] = 'left';
$table_ncm->align['ip'] = 'left';
$table_ncm->align['vendor'] = 'left';
$table_ncm->align['model'] = 'left';
$table_ncm->align['firmware'] = 'left';
$table_ncm->align['last_backup_date'] = 'left';
$table_ncm->headstyle['name'] = 'text-align: left';
$table_ncm->headstyle['ip'] = 'text-align: left';
$table_ncm->headstyle['vendor'] = 'text-align: left';
$table_ncm->headstyle['model'] = 'text-align: left';
$table_ncm->headstyle['firmware'] = 'text-align: left';
$table_ncm->headstyle['last_backup_date'] = 'text-align: left';
$table_ncm->head = [];
$table_ncm->head['name'] = __('Name');
$table_ncm->head['ip'] = __('Ip');
$table_ncm->head['vendor'] = __('Vendor');
$table_ncm->head['model'] = __('Model');
$table_ncm->head['firmware'] = __('Firmware');
$table_ncm->head['last_backup_date'] = __('Last backup date');
$table_ncm->data = [];
foreach ($item['data'] as $key => $row) {
$title = $row['last_error'];
if (empty($title) === true) {
$title = null;
}
$table_ncm->data[] = [
$row['alias'],
$row['direccion'],
$row['vendor'],
$row['model'],
$row['firmware'],
$row['last_backup_date'],
];
}
if ($pdf === 0) {
ui_require_javascript_file('diff2html-ui.min');
ui_require_css_file('diff2html.min');
$script = "$(document).ready(function() {
const configuration = {
drawFileList: false,
collapsed: true,
matching: 'lines',
outputFormat: 'side-by-side',
};
const diff2htmlUi = new Diff2HtmlUI(
document.getElementById('".$key."'),
atob('".base64_encode($item['data'])."'),
configuration
);
diff2htmlUi.draw();
});";
$content = '<div class="w100p" id="'.$key.'"></div class="w100p">';
$content .= '<script>'.$script.'</script>';
$table->data[1] = $content;
$table->colspan[1][0] = 2;
$table->colspan['data']['cell'] = 3;
$table->cellstyle['data']['cell'] = 'text-align: left;';
$table->data['data']['cell'] = html_print_table(
$table_ncm,
true
);
} else {
$content = '<div style="text-align:left;margin-left: 14px;">';
$content .= str_replace("\n", '<br>', $item['data']);
$content .= '</div>';
return $content;
$table_ncm->titleclass = 'title_table_pdf';
$table_ncm->titlestyle = 'text-align:left;';
return html_print_table(
$table_ncm,
true
);
}
}
/**
* HTML content for ncm backup report.
*
* @param array $item Content generated by reporting_ncm_backups.
*
* @return string HTML code.
*/
function reporting_html_ncm_backups($table, $item, $pdf=0)
{
ui_require_css_file('diff2html.min');
ui_require_css_file('highlight.min');
ui_require_css_file('highlight/vs.min');
ui_require_javascript_file('diff2html-ui.min');
ui_require_javascript_file('highlight.min');
ui_require_javascript_file('highlightjs-line-numbers.min');
ui_require_javascript_file('languages/plaintext.min');
ui_require_javascript_file('jquery', ENTERPRISE_DIR.'/include/javascript/');
ui_require_javascript_file('functions_ncm', ENTERPRISE_DIR.'/include/javascript/');
// Create table diff.
foreach ($item['data'] as $ncm_agent_key => $ncm_agent) {
$table_ncm = new stdClass();
if ($pdf === 1) {
$table_ncm->width = '100%';
}
$table_ncm->class = 'info_table';
$table_ncm->styleTable = 'table-layout: fixed;';
$table_ncm->headstyle[0] = 'width: 250px';
$table_ncm->head = [];
$table_ncm->head[0] = __('Date');
$table_ncm->head[1] = __('Diff');
$table_ncm->id = 'ncm_backups';
$table_ncm->name = 'ncm_backups';
$table_ncm->title = $ncm_agent['caption'];
$row = [];
foreach ($ncm_agent['data'] as $ncm_agent_data) {
if ($pdf === 1) {
$row[] = [
$ncm_agent_data['updated_at'],
($ncm_agent_data['diffstr'] === '') ? $ncm_agent_data['diff'] : str_replace("\n", '<br>', $ncm_agent_data['diffstr']),
];
} else {
$row[] = [
$ncm_agent_data['updated_at'],
$ncm_agent_data['diff'],
];
}
$table_ncm->data = $row;
}
$table->colspan[$ncm_agent_key]['cell'] = 3;
$table->cellstyle[$ncm_agent_key]['cell'] = 'text-align: left;';
$table->data[$ncm_agent_key]['cell'] = html_print_table(
$table_ncm,
true
);
}
if ($pdf === 1) {
$table->width = '100%';
return html_print_table(
$table,
true
);
}
}

View File

@ -777,6 +777,10 @@ function reports_get_report_types($template=false, $not_editor=false)
'optgroup' => __('Modules'),
'name' => __('Last value'),
];
$types['service_level'] = [
'optgroup' => __('Modules'),
'name' => __('Service Level Detailed'),
];
$types['general'] = [
'optgroup' => __('Grouped'),
@ -963,9 +967,14 @@ function reports_get_report_types($template=false, $not_editor=false)
];
}
$types['ncm_backups'] = [
'optgroup' => __('NCM'),
'name' => __('NCM configuration changes'),
];
$types['ncm'] = [
'optgroup' => __('NCM'),
'name' => __('Network configuration changes'),
'name' => __('NCM devices list'),
];
if (enterprise_installed() === true) {

View File

@ -7170,31 +7170,16 @@ function ui_print_comments($comment, $truncate_limit=255)
}
// Only show the last comment. If commment its too long,the comment will short with ...
// If $config['prominent_time'] is timestamp the date show Month, day, hour and minutes.
// Forced time commentary to use copact date for optimize space in table.
// Else show comments hours ago
if ($comment['action'] != 'Added comment') {
$comment['comment'] = $comment['action'];
}
$comment['comment'] = io_safe_output($comment['comment']);
$short_comment = substr($comment['comment'], 0, 20);
if ($config['prominent_time'] == 'timestamp') {
$comentario = '<i>'.date($config['date_format'], $comment['utimestamp']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i>'.date($config['date_format'], $comment['utimestamp']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
}
} else {
$rest_time = (time() - $comment['utimestamp']);
$time_last = (($rest_time / 60) / 60);
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).'&nbsp; Hours &nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).'&nbsp; Hours &nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
}
}
$comentario = io_safe_output($comentario);
$comentario = $comment['comment'];
if (strlen($comentario) >= $truncate_limit) {
$comentario = ui_print_truncate_text(
@ -7209,6 +7194,12 @@ function ui_print_comments($comment, $truncate_limit=255)
);
}
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
}
return $comentario;
}

View File

@ -1055,7 +1055,7 @@ function processServiceTree(settings) {
parameters["filter"]["statusAgent"] = "";
parameters["filter"]["searchModule"] = "";
parameters["filter"]["statusModule"] = "";
parameters["filter"]["groupID"] = "";
parameters["filter"]["groupID"] = settings.id_group;
parameters["filter"]["tagID"] = "";
parameters["filter"]["searchHirearchy"] = 1;
parameters["filter"]["show_not_init_agents"] = 1;

View File

@ -1599,14 +1599,41 @@ $(document).ajaxSend(function(event, jqXHR, ajaxOptions) {
title: "Minimize"
}).insertBefore(closeButton);
// Add the minimize icon to the minimize button
$("<span>", {
class: "ui-button-icon ui-icon",
style:
"background-color: rgb(51, 51, 51); -webkit-mask: url('images/arrow-down-white.png') no-repeat / contain !important;"
}).appendTo(minimizeButton);
$("<span>", {
class: "ui-button-icon-space"
})
.html(" ")
.appendTo(minimizeButton);
// Add the disengage button before the minimize button
var disengageButton = $("<button>", {
class:
"ui-corner-all ui-widget ui-button-icon-only ui-dialog-titlebar-disengage disengage-buttom-image",
type: "button",
title: "Disengage"
title: "Disengage",
style: "float: right; position:relative;"
}).insertBefore(minimizeButton);
// Add the disengage icon to the disengage button
$("<span>", {
class: "ui-button-icon ui-icon",
style:
"background-color: rgb(51, 51, 51); -webkit-mask: url('images/dashboard.menu.png') no-repeat center / contain !important;"
}).appendTo(disengageButton);
$("<span>", {
class: "ui-button-icon-space"
})
.html(" ")
.appendTo(disengageButton);
minimizeButton.click(function(e) {
if ($("#minimize_arrow_event_sound").hasClass("arrow_menu_up")) {
$("#minimize_arrow_event_sound").removeClass("arrow_menu_up");

View File

@ -104,11 +104,8 @@ function load_modal(settings) {
width = settings.onshow.width;
}
if (settings.modal.overlay == undefined) {
settings.modal.overlay = {
opacity: 0.5,
background: "black"
};
if (settings.modal.overlay === true) {
$("body").append("<div id='modal_overlay'class='ui-widget-overlay'></div>");
}
if (settings.beforeClose == undefined) {
@ -496,7 +493,6 @@ function load_modal(settings) {
settings.onshow.maxHeight != undefined
? settings.onshow.maxHeight
: "auto",
overlay: settings.modal.overlay,
position: {
my: "top+20%",
at: "top",
@ -518,6 +514,7 @@ function load_modal(settings) {
if (settings.cleanup != undefined) {
settings.cleanup();
}
$("#modal_overlay").remove();
},
beforeClose: settings.beforeClose()
});
@ -583,7 +580,6 @@ function confirmDialog(settings, idDialog = uniqId()) {
$(this).dialog("close");
$(this).remove();
}
if (typeof settings.onDeny == "function") settings.onDeny();
}
},
{

View File

@ -213,6 +213,10 @@ class Cluster extends Entity
public function getCounters() :array
{
$id_agent_modules = $this->getIdsModulesInvolved();
if (empty($id_agent_modules) === true) {
return [];
}
$sql = sprintf(
'SELECT SUM( IF(estado = 1, 1, 0) ) AS critical,
SUM( IF(estado = 2, 1, 0) ) AS warning,

View File

@ -676,6 +676,7 @@ class Widget
$values = [];
$values['title'] = \get_parameter('title', '');
$values['background'] = \get_parameter('background', '#ffffff');
$values['id_group'] = \get_parameter('id_group', '');
if ((bool) \is_metaconsole() === true) {
if ($this->shouldSelectNode() === true) {
$values['node'] = \get_parameter('node', null);

View File

@ -320,6 +320,10 @@ class HeatmapWidget extends Widget
$module_groups[$module_group['id_mg']] = $module_group['name'];
}
if (empty($values['module_groups'][0]) === true) {
$values['module_groups'][0] = 0;
}
$inputs[] = [
'label' => __('Module group'),
'style' => ($values['type'] === '2') ? '' : 'display:none',
@ -332,7 +336,7 @@ class HeatmapWidget extends Widget
'return' => true,
'multiple' => true,
'nothing' => __('Not assigned'),
'nothing_value' => 0,
'nothing_value' => '0',
],
];

View File

@ -218,6 +218,10 @@ class ServiceViewWidget extends Widget
$values['type'] = $decoder['type'];
}
if (isset($decoder['id_group']) === true) {
$values['id_group'] = $decoder['id_group'];
}
return $values;
}
@ -239,6 +243,13 @@ class ServiceViewWidget extends Widget
$values['type'] = 'tree';
}
// Groups.
$return_all_group = false;
if (users_can_manage_group_all('AR') === true) {
$return_all_group = true;
}
// Type services view.
$fields = [
'tree' => __('Tree'),
@ -256,6 +267,20 @@ class ServiceViewWidget extends Widget
],
];
$inputs[] = [
'label' => __('Group'),
'arguments' => [
'name' => 'id_group',
'id' => 'id_group',
'input_class' => 'flex-row',
'type' => 'select_groups',
'returnAllGroup' => $return_all_group,
'selected' => $values['id_group'],
'return' => true,
'class' => 'w50p',
],
];
return $inputs;
}
@ -335,6 +360,7 @@ class ServiceViewWidget extends Widget
$settings['cellId'] = $this->cellId;
$settings['baseURL'] = \ui_get_full_url('/', false, false, false);
$settings['ajaxURL'] = \ui_get_full_url('ajax.php', false, false, false);
$settings['id_group'] = (empty($values['type']) === false) ? $values['id_group'] : 0;
// Show the modal window of an module.
$output .= '<div id="module_details_window" class="">';

View File

@ -117,6 +117,8 @@ class NewsBoard extends Element
$output .= '</div>';
return $output;
} else {
return '';
}
}

View File

@ -0,0 +1,85 @@
/**
*
* Name: Default theme
* Pandora Stylesheet
*
* @category Stylesheet
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2023 Pandora FMS
* Please see https://pandorafms.com for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
.dt-buttons {
float: left;
}
.dt-button.buttons-csv.buttons-html5 {
box-shadow: none;
}
.dataTables_filter > label {
color: #000;
}
.top {
background-color: #fff !important;
color: #000 !important;
border-radius: 5px !important;
border: 1px solid #e5e9ed !important;
}
.bottom {
background-color: #fff !important;
color: #000 !important;
border-radius: 5px !important;
border: 1px solid #e5e9ed !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
color: #000 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
color: #fff !important;
background: #14524f !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
background-color: #f6f7fb !important;
color: #000 !important;
border: 1px solid #cacaca;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
background: #e2e2e2 !important;
color: #000 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
border: 1px solid #cacaca !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.previous {
border: 1px solid #cacaca !important;
}

View File

@ -148,7 +148,7 @@ h1 {
cursor: pointer;
}
#modal-add-widget {
min-height: 566px !important;
min-height: 625px !important;
}
#modal-add-widget .container-list-widgets {
display: flex;

View File

@ -108,6 +108,35 @@ td > input[id^="checkbox-multi"] {
height: 2.5em;
}
.info_table.events tr > td span:not(.invisible) {
display: block;
overflow: hidden;
text-overflow: ellipsis;
max-height: 6em;
line-height: 2em;
}
.info_table.events tr > td span:not(.invisible) {
display: block;
overflow: hidden;
text-overflow: ellipsis;
max-height: 6em;
line-height: 1.5em;
}
th.column-estado {
padding: 0px 0px 0px 12px !important;
max-width: fit-content;
}
.content-status {
margin: 0 auto;
max-width: fit-content;
}
table#table_events > tbody > tr > td.column-estado {
padding: 0px !important;
text-align: center;
}
.sorting_desc {
background: url(../../images/sort_down_green.png) no-repeat;
background-position-x: left;

View File

@ -48,8 +48,9 @@
.ui-dialog .ui-dialog-titlebar-minimize {
position: relative;
height: 20px;
width: 20px;
margin-right: 1px;
bottom: 30%;
top: 0px;
background-color: #fff !important;
}
.ui-dialog .ui-dialog-titlebar-minimize:hover {
@ -57,10 +58,15 @@
}
.ui-dialog .ui-dialog-titlebar-disengage {
position: relative;
height: 20px;
width: 20px;
margin-right: 5px;
position: absolute !important;
right: 50px;
top: -3px;
width: 40px;
margin: 0px 0 0 0;
padding: 1px;
height: 40px;
bottom: 30%;
background-color: #fff !important;
}
.ui-dialog .ui-dialog-titlebar-disengage:hover {
@ -359,3 +365,9 @@ input[type="submit"].ui-button-dialog {
.ui_tpicker_time {
margin-left: 10px !important;
}
.ui-widget-overlay {
background: #aaa !important;
opacity: 0.3 !important;
z-index: 1114;
}

View File

@ -1,10 +1,3 @@
span.select2.select2-container.select2-container--default {
max-width: 175px !important;
width: 175px !important;
}
.edit_discovery_input b {
display: flex;
flex-direction: row;
align-items: center;
.select2-selection__rendered {
max-width: 600px;
}

View File

@ -12606,9 +12606,10 @@ form.cfv_status_agent input:checked + label:before {
float: left;
margin-left: 10px;
padding-right: 10px;
max-height: 890px;
max-height: 760px;
overflow: auto;
background-color: #f9f9f9;
margin-bottom: 20px;
}
.agents_custom_fields {
@ -12617,15 +12618,6 @@ form.cfv_status_agent input:checked + label:before {
margin-bottom: 15px;
padding: 25px 5px;
}
div.agents_custom_fields #datatables_wrapper div.top,
div.agents_custom_fields #datatables_wrapper div.bottom {
background-color: #414141;
color: #ffffff;
border: none;
padding: 5px;
height: 38px;
width: 99%;
}
/*Horizontal tree*/
@ -12656,16 +12648,6 @@ div.agents_custom_fields #datatables_wrapper div.bottom {
margin-top: 15px;
}
.custom_fields_view {
width: 30%;
float: left;
margin-left: 10px;
padding-right: 10px;
max-height: 890px;
overflow: auto;
background-color: #f9f9f9;
}
.agents_custom_fields {
width: 100%;
@ -12878,6 +12860,14 @@ tr.shown td.details-control {
top: -92px;
}
#ncm_backups > caption > h4 {
color: black;
}
.tags_selected_container > span.select2 {
background-color: white !important;
}
.span_as_label {
font-size: 13px;
line-height: 16px;

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.774';
$build = '231213';
$build = '231214';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -28,6 +28,7 @@
use PandoraFMS\Enterprise\Metaconsole\Node;
use PandoraFMS\ITSM\ITSM;
use PandoraFMS\Enterprise\NetworkManager;
global $config;
@ -74,6 +75,7 @@ if (is_ajax()) {
$get_node_agent = (bool) get_parameter('get_node_agent', false);
$get_agent_inventory_modules = (bool) get_parameter('get_agent_inventory_modules', false);
$get_agent_inventory_dates = (bool) get_parameter('get_agent_inventory_dates', false);
$get_ncm_agents = (bool) get_parameter('get_ncm_agents', false);
$refresh_contact = get_parameter('refresh_contact', 0);
@ -215,6 +217,30 @@ if (is_ajax()) {
return;
}
// Get ncm Agent.
if ($get_ncm_agents === true) {
$fields = [
'`tncm_agent`.id_agent',
'`tagente`.alias',
];
$id_group = (int) get_parameter('id_group');
$filter['filter_id_group'] = $id_group;
// Retrieve data.
$ncm_data = NetworkManager::agents(
// Fields.
$fields,
// Filter.
$filter,
);
echo json_encode($ncm_data);
return;
}
if ($get_modules_group_json === true) {
$id_group = (int) get_parameter('id_module_group', 0);
$id_agents = get_parameter('id_agents', null);

View File

@ -67,12 +67,12 @@ $info_user = get_user_info($config['id_user']);
$group = get_parameter('group', 0);
$id_custom_fields = get_parameter('id_custom_fields', 0);
$id_custom_fields_data = get_parameter('id_custom_fields_data', -1);
$id_status = get_parameter('id_status', AGENT_MODULE_STATUS_NOT_NORMAL);
$id_status = get_parameter('id_status', -1);
$module_search = get_parameter('module_search', '');
$search = get_parameter('uptbutton', '');
$id_filter = get_parameter('id_name', 0);
$recursion = get_parameter('recursion', 0);
$module_status = get_parameter('module_status', AGENT_MODULE_STATUS_NOT_NORMAL);
$module_status = get_parameter('module_status', -1);
// =====================================================================
// Custom filter search
@ -304,21 +304,12 @@ $table->data[2][5] = html_print_submit_button(
);
if (check_acl($config['id_user'], 0, 'PM')) {
// Pass the parameters to the page that generates the csv file (arrays)
// Pass the parameters to the page that generates the csv file (arrays).
$decode_id_status = base64_encode(json_encode($id_status));
$decode_module_status = base64_encode(json_encode($module_status));
$decode_filters = base64_encode(json_encode($filters));
$table->data[3][5] = '<div style="display: inline;">';
/*
$table->data[3][5] .= html_print_button(
__('Export to CSV'),
'csv_export',
false,
"blockResubmit($(this)); location.href='monitoring/custom_fields_csv.php?filters=$decode_filters&id_custom_field=$id_custom_fields&id_status=$decode_id_status&module_status=$decode_module_status'",
'class="sub next"',
true
);*/
$table->data[3][5] .= '</div>';
}
@ -367,12 +358,13 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
$id_custom_field_array = $filters['id_custom_fields_data'];
}
foreach ($id_custom_field_array as $value) {
/*
$table_agent = html_get_predefined_table();
$table_agent->style = [];
$table_agent->class = 'tactical_view';*/
$id_field = db_get_value_filter(
'id_field',
'tagent_custom_fields',
['name' => $id_custom_fields]
);
foreach ($id_custom_field_array as $value) {
$table_agent = new StdClass();
$table_agent->width = '100%';
$table_agent->class = 'tactical_view';
@ -388,7 +380,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
true,
['title' => __('Agents critical')]
);
$agent_data[1] = "<a style='color: ".COL_CRITICAL.";' href='#'>";
$agent_data[1] = "<a style='color: ".COL_CRITICAL.";' href='index.php?sec=view&sec2=operation/agentes/estado_agente&status=".AGENT_STATUS_CRITICAL.'&ag_custom_fields['.$id_field.']='.$value."'>";
$agent_data[1] .= "<b><span class='font_12pt bolder red_color '>";
$agent_data[1] .= format_numeric(
$data['counters_name'][$value]['a_critical']
@ -401,7 +393,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
true,
['title' => __('Agents warning')]
);
$agent_data[3] = "<a style='color: ".COL_WARNING.";' href='#'>";
$agent_data[3] = "<a style='color: ".COL_WARNING.";' href='index.php?sec=view&sec2=operation/agentes/estado_agente&status=".AGENT_STATUS_WARNING.'&ag_custom_fields['.$id_field.']='.$value."'>";
$agent_data[3] .= "<b><span class='font_12pt bolder yellow_color'>";
$agent_data[3] .= format_numeric(
$data['counters_name'][$value]['a_warning']
@ -414,7 +406,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
true,
['title' => __('Agents ok')]
);
$agent_data[5] = "<a style='color: ".COL_NORMAL.";' href='#'>";
$agent_data[5] = "<a style='color: ".COL_NORMAL.";' href='index.php?sec=view&sec2=operation/agentes/estado_agente&status=".AGENT_STATUS_NORMAL.'&ag_custom_fields['.$id_field.']='.$value."'>";
$agent_data[5] .= "<b><span class='font_12pt bolder pandora_green_text'>";
$agent_data[5] .= format_numeric(
$data['counters_name'][$value]['a_normal']
@ -427,7 +419,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
true,
['title' => __('Agents unknown')]
);
$agent_data[7] = "<a style='color: ".COL_UNKNOWN.";' href='#'>";
$agent_data[7] = "<a style='color: ".COL_UNKNOWN.";' href='index.php?sec=view&sec2=operation/agentes/estado_agente&status=".AGENT_STATUS_UNKNOWN.'&ag_custom_fields['.$id_field.']='.$value."'>";
$agent_data[7] .= "<b><span class='font_12pt bolder grey_color'>";
$agent_data[7] .= format_numeric(
$data['counters_name'][$value]['a_unknown']
@ -440,7 +432,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
true,
['title' => __('Agents not init')]
);
$agent_data[9] = "<a style='color: ".COL_NOTINIT.";' href='#'>";
$agent_data[9] = "<a style='color: ".COL_NOTINIT.";' href='index.php?sec=view&sec2=operation/agentes/estado_agente&status=".AGENT_STATUS_NOT_INIT.'&ag_custom_fields['.$id_field.']='.$value."'>";
$agent_data[9] .= "<b><span class='font_12pt bolder blue_color'>";
$agent_data[9] .= format_numeric(
$data['counters_name'][$value]['a_not_init']
@ -455,12 +447,6 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
$m_unknown = ($data['counters_name'][$value]['m_unknown'] <= 0) ? '0' : $data['counters_name'][$value]['m_unknown'];
$m_not_init = ($data['counters_name'][$value]['m_not_init'] <= 0) ? '0' : $data['counters_name'][$value]['m_not_init'];
// Modules by status table.
/*
$table_mbs = html_get_predefined_table();
$table_mbs->class = 'tactical_view';
$table_mbs->style = [];*/
$table_mbs = new StdClass();
$table_mbs->width = '100%';
$table_mbs->class = 'tactical_view';
@ -478,7 +464,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
false,
true
);
$tdata[1] = '<a style="color: '.COL_CRITICAL.';" class="font_12pt bolder" href="#">'.$m_critical.'</a>';
$tdata[1] = '<a style="color: '.COL_CRITICAL.';" class="font_12pt bolder" href="index.php?sec=view&sec2=operation/agentes/status_monitor&status='.AGENT_STATUS_CRITICAL.'&ag_custom_fields['.$id_field.']='.$value.'">'.$m_critical.'</a>';
$tdata[2] = html_print_image(
'images/module_warning.png',
@ -489,7 +475,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
false,
true
);
$tdata[3] = '<a style="color: '.COL_WARNING_DARK.';" class="font_12pt bolder" href="#">'.$m_warning.'</a>';
$tdata[3] = '<a style="color: '.COL_WARNING_DARK.';" class="font_12pt bolder" href="index.php?sec=view&sec2=operation/agentes/status_monitor&status='.AGENT_STATUS_WARNING.'&ag_custom_fields['.$id_field.']='.$value.'">'.$m_warning.'</a>';
$tdata[4] = html_print_image(
'images/module_ok.png',
@ -500,7 +486,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
false,
true
);
$tdata[5] = '<a style="color: '.COL_NORMAL.';" class="font_12pt bolder" href="#">'.$m_normal.'</a>';
$tdata[5] = '<a style="color: '.COL_NORMAL.';" class="font_12pt bolder" href="index.php?sec=view&sec2=operation/agentes/status_monitor&status='.AGENT_STATUS_NORMAL.'&ag_custom_fields['.$id_field.']='.$value.'">'.$m_normal.'</a>';
$tdata[6] = html_print_image(
'images/module_unknown.png',
@ -511,7 +497,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
false,
true
);
$tdata[7] = '<a style="color: '.COL_UNKNOWN.';" class="font_12pt bolder" href="#">'.$m_unknown.'</a>';
$tdata[7] = '<a style="color: '.COL_UNKNOWN.';" class="font_12pt bolder" href="index.php?sec=view&sec2=operation/agentes/status_monitor&status='.AGENT_STATUS_UNKNOWN.'&ag_custom_fields['.$id_field.']='.$value.'">'.$m_unknown.'</a>';
$tdata[8] = html_print_image(
'images/module_notinit.png',
@ -523,7 +509,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
true
);
$tdata[9] = '<a style="color: '.COL_NOTINIT.';" class="font_12pt bolder" href="#">'.$m_not_init.'</a>';
$tdata[9] = '<a style="color: '.COL_NOTINIT.';" class="font_12pt bolder" href="index.php?sec=view&sec2=operation/agentes/status_monitor&status='.AGENT_STATUS_NOT_INIT.'&ag_custom_fields['.$id_field.']='.$value.'">'.$m_not_init.'</a>';
$table_mbs->data[] = $tdata;
@ -714,7 +700,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
echo '</div>';
echo "<div class='agents_custom_fields '>";
echo "<table id='datatables' class='display w100pi'>";
echo "<table id='datatables' class='info_table w100pi'>";
echo '<thead>';
echo '<tr>';
echo '<th></th>';
@ -755,6 +741,7 @@ if (isset($id_custom_fields_data) && is_array($id_custom_fields_data)) {
echo '<div id="filter_cf" class="invisible"></div>';
ui_require_css_file('datatables.min', 'include/styles/js/');
ui_require_css_file('custom_field', 'include/styles/');
ui_require_javascript_file_enterprise('functions_csv');
ui_require_javascript_file('datatables.min');
ui_require_javascript_file('buttons.dataTables.min');
@ -904,7 +891,6 @@ function dialog_filter_cf(title, type_form){
}
function table_datatables(filters, indexed_descriptions, processing){
console.log(indexed_descriptions);
array_data = JSON.parse(filters);
table = $('#datatables').DataTable({
processing: true,
@ -913,7 +899,6 @@ function table_datatables(filters, indexed_descriptions, processing){
searching: true,
pageLength: Number(array_data.block_size),
lengthMenu: [ 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 75, 100],
//buttons: [{ extend: 'csvHtml5', text: 'Save as csvHtml5' }],
responsive: false,
ajax: {
type: "POST",
@ -933,21 +918,16 @@ function table_datatables(filters, indexed_descriptions, processing){
'paging': true,
'ordering': true,
'scrollX': true,
'scroller': true
'scroller': true,
},
},
language: {
processing: processing,
lengthMenu: "Show _MENU_ items per page",
zeroRecords: "Nothing found. Please change your search term",
//info: "Page _PAGE_ of _PAGES_",
infoEmpty: "No results",
infoFiltered: "",
search: "Search:",
/*paginate:{
next: "Next",
previous: "Next"
}*/
},
sDom: '<"top"lfp>rt<"bottom"ip><"clear">',
columns: [

View File

@ -547,6 +547,45 @@ if (is_ajax() === true) {
);
}
if (empty($tmp->tags) === false) {
$tmp->tags = ui_print_truncate_text(
$tmp->tags,
30,
false,
true,
false,
'&hellip;',
true,
true,
);
}
if (empty($tmp->event_custom_id) === false) {
$tmp->event_custom_id = ui_print_truncate_text(
$tmp->event_custom_id,
30,
false,
true,
false,
'&hellip;',
true,
true,
);
}
if (empty($tmp->module_custom_id) === false) {
$tmp->module_custom_id = ui_print_truncate_text(
$tmp->module_custom_id,
30,
false,
true,
false,
'&hellip;',
true,
true,
);
}
if (empty($tmp->comments) === false) {
$tmp->comments = ui_print_comments($tmp->comments, 20);
}
@ -650,19 +689,7 @@ if (is_ajax() === true) {
$tmp->data = ui_print_truncate_text($tmp->data, 10);
}
$tmp->instructions = events_get_instructions($item);
if (strlen($tmp->instructions) >= 20) {
$tmp->instructions = ui_print_truncate_text(
$tmp->instructions,
20,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$tmp->instructions = events_get_instructions($item, 15);
$tmp->user_comment = ui_print_comments(
event_get_last_comment(
@ -899,14 +926,14 @@ if (is_ajax() === true) {
true,
[
'title' => __('Unknown'),
'class' => 'forced-title',
'class' => 'forced-title main_menu_icon',
]
);
$state = 0;
break;
}
$draw_state = '<div class="mrgn_lft_17px">';
$draw_state = '<div class="content-status">';
$draw_state .= '<span class="invisible">';
$draw_state .= $state;
$draw_state .= '</span>';
@ -1199,10 +1226,10 @@ if (is_ajax() === true) {
}
$tmp->custom_data = $custom_data_str;
if (strlen($tmp->custom_data) >= 20) {
if (strlen($tmp->custom_data) >= 50) {
$tmp->custom_data = ui_print_truncate_text(
$tmp->custom_data,
20,
50,
false,
true,
false,
@ -1232,15 +1259,18 @@ if (is_ajax() === true) {
);
}
$data = array_values(
array_filter(
$data,
function ($item) {
return (bool) (array) $item;
}
)
);
$count = count($data);
if (isset($data) === true) {
$data = array_values(
array_filter(
$data,
function ($item) {
return (bool) (array) $item;
}
)
);
$count = count($data);
}
// RecordsTotal && recordsfiltered resultados totales.
echo json_encode(
[
@ -2585,7 +2615,7 @@ try {
if ($evento_id !== false) {
$fields[$evento_id] = [
'text' => 'evento',
'class' => 'mw250px',
'class' => 'mw180px',
];
}
@ -2594,23 +2624,24 @@ try {
$fields[$comment_id] = ['text' => 'user_comment'];
}
foreach ($fields as $key => $field) {
if (is_array($field) === false) {
$fields[$key] = [
'text' => $field,
'class' => 'mw100px',
];
}
$estado = array_search('estado', $fields);
if ($estado !== false) {
$fields[$estado] = [
'text' => $fields[$estado],
'class' => 'column-estado',
];
}
// Always add options column.
$fields = array_merge(
$fields,
[
[
'text' => 'options',
'class' => 'table_action_buttons mw120px',
'class' => 'table_action_buttons mw100px',
],
[
'text' => 'm',

View File

@ -675,7 +675,9 @@ $params['return'] = true;
$params['show_helptip'] = true;
$params['input_name'] = 'agent';
$params['value'] = $inventory_agent;
$params['javascript_is_function_select'] = true;
$params['selectbox_id'] = 'module_inventory_general_view';
// $params['javascript_is_function_select'] = true;
// $params['javascript_function_action_after_select'] = 'this.form.submit';
$params['use_hidden_input_idagent'] = true;
$params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';

View File

@ -335,6 +335,7 @@ $table2->data[0][3] = $html_menu_export;
$searchForm = '<form method="post" action="'.$url.'&pure='.$config['pure'].'" class="mrgn_right_0px">';
$searchForm .= html_print_table($table2, true);
$searchForm .= html_print_input_hidden('id_report', $id_report, true);
$Actionbuttons = '';
if ((bool) is_metaconsole() === true) {
$Actionbuttons .= html_print_submit_button(

View File

@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.774
%define release 231213
%define release 231214
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.774
%define release 231213
%define release 231214
# User and Group under which Apache is running
%define httpd_name httpd

View File

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

View File

@ -1638,6 +1638,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
`cat_security_hardening` INT NOT NULL DEFAULT 0,
`ignore_skipped` INT NOT NULL DEFAULT 0,
`status_of_check` TINYTEXT,
`ncm_agents` MEDIUMTEXT,
`check_unknowns_graph` tinyint DEFAULT '0',
PRIMARY KEY(`id_rc`),
FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`)
@ -4187,6 +4188,29 @@ CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ----------------------------------------------------------------------
-- Table `tncm_agent_data_template`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_agent_data_template` (
`id` SERIAL,
`name` TEXT,
`vendors` TEXT,
`models` TEXT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ----------------------------------------------------------------------
-- Table `tncm_agent_data_template_scripts`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_agent_data_template_scripts` (
`id` SERIAL,
`id_agent_data_template` BIGINT UNSIGNED NOT NULL,
`id_script` BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_agent_data_template`) REFERENCES `tncm_agent_data_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ----------------------------------------------------------------------
-- Table `tncm_agent`
-- ----------------------------------------------------------------------
@ -4202,10 +4226,13 @@ CREATE TABLE IF NOT EXISTS `tncm_agent` (
`updated_at` BIGINT NOT NULL DEFAULT 0,
`config_backup_id` BIGINT UNSIGNED DEFAULT NULL,
`id_template` BIGINT UNSIGNED,
`id_agent_data_template` BIGINT UNSIGNED,
`execute_type` INT UNSIGNED NOT NULL DEFAULT 0,
`execute` INT UNSIGNED NOT NULL DEFAULT 0,
`cron_interval` VARCHAR(100) DEFAULT '',
`agent_data_cron_interval` VARCHAR(100) DEFAULT '',
`event_on_change` INT UNSIGNED DEFAULT null,
`agent_data_event_on_change` INT UNSIGNED DEFAULT null,
`last_error` TEXT,
PRIMARY KEY (`id_agent`),
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
@ -4222,6 +4249,7 @@ CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
`id` SERIAL,
`id_agent` INT UNSIGNED NOT NULL,
`script_type` INT UNSIGNED NOT NULL,
`id_agent_data` INT NOT NULL DEFAULT 0,
`data` LONGBLOB,
`status` INT NOT NULL DEFAULT 5,
`updated_at` BIGINT NOT NULL DEFAULT 0,
@ -4235,8 +4263,10 @@ CREATE TABLE IF NOT EXISTS `tncm_queue` (
`id` SERIAL,
`id_agent` INT UNSIGNED NOT NULL,
`id_script` BIGINT UNSIGNED NOT NULL,
`id_agent_data` bigint unsigned,
`utimestamp` INT UNSIGNED NOT NULL,
`scheduled` INT UNSIGNED DEFAULT NULL,
`snippet` TEXT NULL,
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;

View File

@ -375,11 +375,11 @@ INSERT INTO `tusuario_perfil` (`id_up`, `id_usuario`, `id_perfil`, `id_grupo`, `
--
INSERT INTO `tperfil` VALUES
(1,'Operator&#x20;&#40;Read&#41;',1,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0),
(2,'Operator&#x20;&#40;Write&#41;',1,0,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0),
(3,'Chief&#x20;Operator',1,0,0,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0),
(4,'Group&#x20;coordinator',1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0),
(5,'Pandora&#x20;Administrator',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
(1,'Operator&#x20;&#40;Read&#41;',1,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0),
(2,'Operator&#x20;&#40;Write&#41;',1,0,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0),
(3,'Chief&#x20;Operator',1,0,0,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0),
(4,'Group&#x20;coordinator',1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0),
(5,'Pandora&#x20;Administrator',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
--
-- Dumping data for table `tnews`
@ -394,7 +394,7 @@ INSERT INTO tmodule VALUES (5,'Prediction&#x20;module');
INSERT INTO tmodule VALUES (6,'WMI&#x20;module');
INSERT INTO tmodule VALUES (7, 'Web&#x20;module');
INSERT INTO tmodule VALUES (8, 'Wux&#x20;module');
INSERT INTO tmodule VALUES (9, 'Wizard&#x20;module');
INSERT INTO tmodule VALUES (9, 'Wizard&#x20;module');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (1,'OS&#x20;Total&#x20;process','Total&#x20;process&#x20;in&#x20;Operating&#x20;System&#x20;&#40;UNIX&#x20;MIB&#41;',13,15,0,0,300,0,'','','public','HOST-RESOURCES-MIB::hrSystemProcesses.0 ',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
@ -738,11 +738,11 @@ INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `t
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (513,'MSDTC&#x20;TransactionsPersec','Transactions&#x20;performed&#x20;per&#x20;second.',22,1,0,0,300,0,'','','','select&#x20;TransactionsPersec&#x20;from&#x20;Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator',3,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (514,'c2900InfoPeakBuffersUsed','ftp://ftp.cisco.com/pub/mibs/oid/CISCO-C2900-MIB.oid',23,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.87.1.1.2.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (515,'c2900InfoTotalBufferDepth','ftp://ftp.cisco.com/pub/mibs/oid/CISCO-C2900-MIB.oid',23,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.87.1.1.3.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (516,'c2900BandwidthUsageCurrent ','ftp://ftp.cisco.com/pub/mibs/oid/CISCO-C2900-MIB.oid',23,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.87.1.5.1.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (516,'c2900BandwidthUsageCurrent ','ftp://ftp.cisco.com/pub/mibs/oid/CISCO-C2900-MIB.oid',23,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.87.1.5.1.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (517,'Latest&#x20;Message&#x20;&#x20;','Get&#x20;the&#x20;last&#x20;message&#x20;sent&#x20;in&#x20;Syslog',2,17,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.41.1.2.3.1.5.12',1,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (518,'Latest&#x20;Message&#x20;date','',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.41.1.2.3.1.6.12',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (519,'CPU&#x20;avgBusy1min ','',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.2.1.57.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (520,'CPU&#x20;avgBusy5min ','',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.2.1.58.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (519,'CPU&#x20;avgBusy1min ','',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.2.1.57.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (520,'CPU&#x20;avgBusy5min ','',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.2.1.58.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (521,'Software&#x20;Image&#x20;running&#x20;','',2,17,0,0,1800,0,'','','public','1.3.6.1.4.1.9.2.1.73.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (522,'nvRAMUsed','',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.3.6.8.0',2,2,0,'','','0',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (523,'Printers&#x20;BytesPrintedPersec','Number&#x20;of&#x20;bytes&#x20;per&#x20;second&#x20;printed&#x20;on&#x20;a&#x20;print&#x20;queue.',24,1,0,0,300,0,'','','','select&#x20;BytesPrintedPersec&#x20;from&#x20;Win32_PerfRawData_Spooler_PrintQueue&#x20;where&#x20;NAME&#x20;=&#x20;&#039;_total&#039;',5,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
@ -754,7 +754,7 @@ INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `t
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (529,'Printers&#x20;OutofPaperErrors','Total&#x20;number&#x20;of&#x20;out-of-paper&#x20;errors&#x20;in&#x20;a&#x20;print&#x20;queue&#x20;after&#x20;the&#x20;last&#x20;restart.',24,1,0,0,300,0,'','','','select&#x20;OutofPaperErrors&#x20;from&#x20;Win32_PerfRawData_Spooler_PrintQueue&#x20;where&#x20;NAME&#x20;=&#x20;&#039;_total&#039;',5,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (530,'Printers&#x20;TotalJobsPrinted','Total&#x20;number&#x20;of&#x20;jobs&#x20;printed&#x20;on&#x20;a&#x20;print&#x20;queue&#x20;after&#x20;the&#x20;last&#x20;restart.',24,1,0,0,300,0,'','','','select&#x20;TotalJobsPrinted&#x20;from&#x20;Win32_PerfRawData_Spooler_PrintQueue&#x20;where&#x20;NAME&#x20;=&#x20;&#039;_total&#039;',5,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (531,'Printers&#x20;TotalPagesPrinted','Total&#x20;number&#x20;of&#x20;pages&#x20;printed&#x20;through&#x20;GDI&#x20;on&#x20;a&#x20;print&#x20;queue&#x20;after&#x20;the&#x20;last&#x20;restart.',24,1,0,0,300,0,'','','','select&#x20;TotalPagesPrinted&#x20;from&#x20;Win32_PerfRawData_Spooler_PrintQueue&#x20;where&#x20;NAME&#x20;=&#x20;&#039;_total&#039;',5,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (532,'Printers&#x20;Availability','Availability&#x20;and&#x20;status&#x20;of&#x20;the&#x20;device\r\n\r\nValue Meaning\r\n\r\n10x1&#x20;Other\r\n\r\n20x2&#x20;Unknown\r\n\r\n30x3&#x20;Running&#x20;or&#x20;Full&#x20;Power\r\n\r\n40x4&#x20;Warning\r\n\r\n50x5&#x20;In&#x20;Test\r\n\r\n60x6&#x20;Not&#x20;Applicable\r',24,3,0,0,300,0,'','','','select&#x20;Availability&#x20;from&#x20;Win32_Printer',5,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (532,'Printers&#x20;Availability','Availability&#x20;and&#x20;status&#x20;of&#x20;the&#x20;device\r\n\r\nValue Meaning\r\n\r\n10x1&#x20;Other\r\n\r\n20x2&#x20;Unknown\r\n\r\n30x3&#x20;Running&#x20;or&#x20;Full&#x20;Power\r\n\r\n40x4&#x20;Warning\r\n\r\n50x5&#x20;In&#x20;Test\r\n\r\n60x6&#x20;Not&#x20;Applicable\r',24,3,0,0,300,0,'','','','select&#x20;Availability&#x20;from&#x20;Win32_Printer',5,6,0,'','','10',0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (533,'Serv_IISAdmin','IIS&#x20;Administration&#x20;Server&#x20;service&#x20;status.',26,2,0,0,300,0,'','','Running','Select&#x20;State&#x20;from&#x20;Win32_Service&#x20;WHERE&#x20;name&#x20;=&#x20;&#039;IISAdmin&#039;',3,6,0,'Administrador','6683','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (534,'Serv_MSSQL_server','Displays&#x20;if&#x20;&#x20;MS&#x20;SQL&#x20;SERVER&#x20;is&#x20;running',27,2,0,0,0,0,'','','Running','select&#x20;state&#x20;from&#x20;Win32_Service&#x20;where&#x20;name&#x20;=&#x20;&quot;MSSQLSERVER&quot;',7,6,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (535,'SQLServer_DataFilesSizeKB','Sql&#x20;database&#x20;size&#x20;in&#x20;kb&#x0d;&#x0a;',27,1,0,0,0,0,'','','','select&#x20;state&#x20;from&#x20;Win32_Service&#x20;where&#x20;name&#x20;=&#x20;&quot;MSSQLSERVER&quot;',7,6,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
@ -1302,8 +1302,8 @@ INSERT INTO `tcontainer` SET `name` = 'Default graph container';
-- Dumping data for table `tlog_graph_models`
--
INSERT INTO tlog_graph_models VALUES (1, 'Apache&#x20;log&#x20;model',
'^.*?&#92;s+.*&quot;.*?&#92;s&#40;&#92;/.*?&#41;&#92;?.*1.1&quot;&#92;s+&#40;.*?&#41;&#92;s+&#40;.*?&#41;&#92;s+',
'pagina,&#x20;html_err_code,&#x20;_tiempo_', 1);
'^.*?&#92;s+.*&quot;.*?&#92;s&#40;&#92;/.*?&#41;&#92;?.*1.1&quot;&#92;s+&#40;.*?&#41;&#92;s+&#40;.*?&#41;&#92;s+',
'pagina,&#x20;html_err_code,&#x20;_tiempo_', 1);
INSERT INTO tlog_graph_models VALUES (2, 'Apache&#x20;accesses&#x20;per&#x20;client&#x20;and&#x20;status',
'&#40;.*?&#41;&#92;&#x20;-.*1.1&quot;&#92;&#x20;&#40;&#92;d+&#41;&#92;&#x20;&#92;d+',
@ -1359,13 +1359,13 @@ UPDATE `tnotification_source` SET `enabled`=1 WHERE `description` = 'System&#x20
INSERT INTO `tpen`
VALUES
(9,'cisco','Cisco&#x20;System'),
(11,'hp','Hewlett&#x20;Packard'),
(2021,'general_snmp','U.C.&#x20;Davis,&#x20;ECE&#x20;Dept.&#x20;Tom'),
(2636,'juniper','Juniper&#x20;Networks'),
(3375,'f5','F5&#x20;Labs'),
(8072,'general_snmp','Net&#x20;SNMP'),
(12356,'fortinet','Fortinet')
(9,'cisco','Cisco&#x20;System'),
(11,'hp','Hewlett&#x20;Packard'),
(2021,'general_snmp','U.C.&#x20;Davis,&#x20;ECE&#x20;Dept.&#x20;Tom'),
(2636,'juniper','Juniper&#x20;Networks'),
(3375,'f5','F5&#x20;Labs'),
(8072,'general_snmp','Net&#x20;SNMP'),
(12356,'fortinet','Fortinet')
;
--
@ -2512,7 +2512,7 @@ INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mi
INSERT INTO `tncm_vendor` (`id`, `name`) VALUES
(1,'Cisco'),
(2, 'D-Link Systems, Inc.'),
(2, 'D-Link Systems, Inc.'),
(3, 'MikroTik'),
(4, 'Alcatel-Lucent Enterprise'),
(5, 'Ubiquiti Networks, Inc.'),
@ -2524,21 +2524,157 @@ INSERT INTO `tncm_vendor` (`id`, `name`) VALUES
(11, 'Netlink'),
(12, 'Ascom'),
(13, 'Synology Inc.'),
(14, 'Fujitsu Network Communications, Inc.');
(14, 'Fujitsu Network Communications, Inc.'),
(15, 'Juniper'),
(16, 'Palo&#x20;Alto'),
(17, 'A10'),
(18, 'Aruba');
INSERT INTO `tncm_model` VALUES (1,1,'7200');
INSERT INTO `tncm_model` VALUES
(1,1,'7200'),
(2,1,'Cisco-Generic'),
(3,15,'Juniper-Generic'),
(4,16,'Palo&#x20;Alto-Generic'),
(5,17,'A10-Generic'),
(6,4,'Alcatel-Generic'),
(7,18,'Aruba-Generic'),
(8,3,'Mikrotik-Generic');
INSERT INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
INSERT INTO `tncm_template` VALUES
(1,'cisco-base','[\"1\"]','[\"1\"]'),
(2,'Cisco-Generic','[\"1\"]','[\"2\"]'),
(3,'Juniper-Generic','[\"15\"]','[\"3\"]'),
(4,'Palo&#x20;Alto-Generic','[\"16\"]','[\"4\"]'),
(5,'A10-Generic','[\"17\"]','[\"5\"]'),
(6,'Alcatel-Generic','[\"4\"]','[\"6\"]'),
(7,'Aruba-Generic','[\"18\"]','[\"7\"]'),
(8,'Mikrotik-Generic','[\"3\"]','[\"8\"]');
INSERT INTO `tncm_script` VALUES
(1,0,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;exit'),
(2,1,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;running-config&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(6,4,'copy&#x20;tftp&#x20;flash&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_TFTP_SERVER_IP_&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_SOURCE_FILE_NAME_&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_DESTINATION_FILE_NAME_&#x0d;&#x0a;show&#x20;flash&#x0d;&#x0a;reload&#x0d;&#x0a;expect:confirm&#x0d;&#x0a;y&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;boot&#x20;system&#x20;_DESTINATION_FILE_NAME_');
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(6,4,'copy&#x20;tftp&#x20;flash&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_TFTP_SERVER_IP_&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_SOURCE_FILE_NAME_&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;firmware.bin&#x0d;&#x0a;show&#x20;flash&#x0d;&#x0a;reload&#x0d;&#x0a;expect:confirm&#x0d;&#x0a;y&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;boot&#x20;system&#x20;firmware.bin'),
(7,0,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;exit&#92;n'),
(8,1,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;term&#x20;length&#x20;0&#92;n&#x0d;&#x0a;capture:show&#x20;running-config&#92;n&#x0d;&#x0a;exit&#92;n'),
(9,2,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;term&#x20;length&#x20;0&#92;n&#x0d;&#x0a;config&#x20;terminal&#92;n&#x0d;&#x0a;_applyconfigbackup_&#92;n&#x0d;&#x0a;exit&#92;n'),
(10,3,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;term&#x20;length&#x20;0&#92;n&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#92;n&#x0d;&#x0a;exit&#92;n'),
(11,4,'copy&#x20;tftp&#x20;flash&#92;n&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_TFTP_SERVER_IP_&#92;n&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;_SOURCE_FILE_NAME_&#92;n&#x0d;&#x0a;expect:&#92;]&#92;?&#x0d;&#x0a;firmware.bin&#92;n&#x0d;&#x0a;show&#x20;flash&#92;n&#x0d;&#x0a;reload&#92;n&#x0d;&#x0a;expect:confirm&#x0d;&#x0a;y&#92;n&#x0d;&#x0a;config&#x20;terminal&#92;n&#x0d;&#x0a;boot&#x20;system&#x20;firmware.bin&#92;n'),
(12,5,''),
(13,7,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;term&#x20;length&#x20;0&#92;n&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#92;n&#x0d;&#x0a;exit&#92;n'),
(14,0,'expect:root@%&#x0d;&#x0a;cli&#92;n&#x0d;&#x0a;exit&#92;n'),
(15,1,'expect:root@%&#x0d;&#x0a;cli&#92;n&#x0d;&#x0a;expect:root&gt;&#x0d;&#x0a;capture:show&#x20;configuration&#x20;|&#x20;no-more&#92;n&#x0d;&#x0a;capture:&#92;n&#x0d;&#x0a;quit&#92;n&#x0d;&#x0a;expect:root@%&#x0d;&#x0a;exit&#92;n'),
(16,2,'expect:root@%&#x0d;&#x0a;cli&#92;n&#x0d;&#x0a;expect:root&gt;&#x0d;&#x0a;configure&#92;n&#x0d;&#x0a;load&#x20;override&#x20;terminal&#92;n&#x0d;&#x0a;_applyconfigbackup_&#92;n&#x0d;&#x0a;commit&#92;n&#x0d;&#x0a;exit&#92;n'),
(17,3,'expect:root@%&#x0d;&#x0a;cli&#92;n&#x0d;&#x0a;expect:root&gt;&#x0d;&#x0a;capture:show&#x20;version|match&#x20;Junos:&#92;n&#x0d;&#x0a;capture:&#x20;&#92;n&#x0d;&#x0a;quit&#92;n&#x0d;&#x0a;expect:root@%&#x0d;&#x0a;exit&#92;n'),
(18,4,'expect:root@%&#x0d;&#x0a;cli&#92;n&#x0d;&#x0a;expect:root&gt;&#x0d;&#x0a;save&#x20;software&#x20;from&#x20;tftp&#x20;_TFTP_SERVER_IP_&#x20;_FIRMWARE_NAME_&#x20;to&#x20;flash&#92;n&#x0d;&#x0a;reset&#92;n&#x0d;&#x0a;exit&#92;n'),
(19,5,''),
(20,7,'expect:root@%&#x0d;&#x0a;cli&#92;n&#x0d;&#x0a;expect:root&gt;&#x0d;&#x0a;capture:show&#x20;version|match&#x20;Junos:&#92;n&#x0d;&#x0a;capture:&#x20;&#92;n&#x0d;&#x0a;quit&#92;n&#x0d;&#x0a;expect:root@%&#x0d;&#x0a;exit&#92;n'),
(21,0,'sleep:1&#x0d;&#x0a;exit&#92;n'),
(22,1,'set&#x20;cli&#x20;pager&#x20;off&#x20;&#92;n&#x0d;&#x0a;capture:show&#x20;config&#x20;running&#92;n&#x0d;&#x0a;exit&#92;n'),
(23,2,'set&#x20;cli&#x20;terminal&#x20;width&#x20;500&#92;n&#x0d;&#x0a;set&#x20;cli&#x20;scripting-mode&#x20;on&#92;n&#x0d;&#x0a;configure&#92;n&#x0d;&#x0a;_applyconfigbackup_&#92;n&#x0d;&#x0a;commit&#92;n'),
(24,3,'set&#x20;cli&#x20;pager&#x20;off&#x20;&#92;n&#x0d;&#x0a;capture:show&#x20;system&#x20;info&#x20;|&#x20;match&#x20;app-version:&#92;n&#x0d;&#x0a;sleep:1&#x20;&#x0d;&#x0a;expect:app-version:&#92;s*&#x0d;&#x0a;exit&#x20;&#92;n'),
(25,4,'tftp&#x20;import&#x20;software&#x20;from&#x20;_TFTP_SERVER_IP_&#x20;file&#x20;_FIRMWARE_NAME_&#92;n&#x0d;&#x0a;request&#x20;system&#x20;software&#x20;install&#x20;version&#92;n&#x0d;&#x0a;reboot&#92;n&#x0d;&#x0a;exit&#92;n'),
(26,5,''),
(27,7,'set&#x20;cli&#x20;pager&#x20;off&#x20;&#92;n&#x0d;&#x0a;capture:show&#x20;system&#x20;info&#x20;|&#x20;match&#x20;app-version:&#92;n&#x0d;&#x0a;sleep:1&#x20;&#x0d;&#x0a;expect:app-version:&#92;s*&#x0d;&#x0a;exit&#x20;&#92;n'),
(28,0,'sleep:1&#x0d;&#x0a;enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n'),
(29,1,'sleep:1&#x0d;&#x0a;enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;running-config&#92;n&#x0d;&#x0a;exit&#92;n'),
(30,2,'sleep:1&#x0d;&#x0a;enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;configure&#92;n&#x0d;&#x0a;_applyconfigbackup_&#92;n&#x0d;&#x0a;exit&#92;n'),
(31,3,'sleep:1&#x0d;&#x0a;enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;exit&#92;n'),
(32,4,'sleep:1&#x0d;&#x0a;enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;configure&#92;n&#x0d;&#x0a;expect:&#40;config&#41;&#x0d;&#x0a;restore&#x20;_TFTP_SERVER_IP_/_FIRMWARE_NAME_&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;expect:skip&#x20;port&#x20;map&#x0d;&#x0a;yes&#92;n&#x0d;&#x0a;expect:&#x20;see&#x20;the&#x20;diff&#x0d;&#x0a;yes&#92;n&#x0d;&#x0a;sleep:1&#x0d;&#x0a;expect:Proceed&#x20;with&#x20;reboot&#x0d;&#x0a;yes&#92;n&#x0d;&#x0a;expect:eof'),
(33,5,''),
(34,7,'sleep:1&#x0d;&#x0a;enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;exit&#92;n'),
(35,0,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;exit&#92;n'),
(36,1,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:admin&#x20;display-config&#92;n&#x0d;&#x0a;logout&#92;n'),
(37,2,''),
(38,3,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;logout&#92;n'),
(39,4,''),
(40,5,''),
(41,7,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;logout&#92;n'),
(42,0,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;exit&#92;n'),
(43,1,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;running-config&#92;n&#x0d;&#x0a;exit&#92;n'),
(44,2,'configure&#x20;terminal&#92;n&#x0d;&#x0a;load&#x20;replace&#x20;/var/tmp/file.conf&#92;n&#x0d;&#x0a;end&#92;n&#x0d;&#x0a;write&#x20;memory&#92;n&#x0d;&#x0a;exit&#92;n'),
(45,3,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;exit&#92;n'),
(46,4,'copy&#x20;tftp&#x20;flash&#x20;_TFTP_SERVER_IP_&#x20;firmware.bin.swi&#x20;secondary&#92;n&#x0d;&#x0a;boot&#x20;system&#x20;flash&#x20;secondary&#92;n&#x0d;&#x0a;copy&#x20;tftp&#x20;flash&#x20;&#x20;_TFTP_SERVER_IP_&#x20;firmware.bin&#x20;primary&#92;n&#x0d;&#x0a;boot&#x20;system&#x20;flash&#x20;primary&#92;n'),
(47,5,''),
(48,7,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;exit&#92;n'),
(49,0,'sleep:1&#x0d;&#x0a;exit&#92;n&#92;r'),
(50,1,'sleep:1&#x0d;&#x0a;capture:system&#x20;resource&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'),
(51,2,'sleep:1&#x0d;&#x0a;system&#x20;backup&#x20;load&#x20;name=_nameBackup_&#x20;password=_passwordBackup_&#92;n&#92;r&#x0d;&#x0a;expect:Restore&#x0d;&#x0a;yes&#92;n&#92;r&#x0d;&#x0a;exit&#92;n&#92;r'),
(52,3,'sleep:1&#x0d;&#x0a;capture:/system&#x20;package&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'),
(53,4,'sleep:1&#x0d;&#x0a;/system&#x20;routerboard&#x20;upgrade&#92;n&#92;r&#x0d;&#x0a;expect:Do&#x0d;&#x0a;yes&#92;n&#92;r&#x0d;&#x0a;exit&#92;n&#92;r'),
(54,5,''),
(55,7,'sleep:1&#x0d;&#x0a;capture:/system&#x20;package&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'),
(56,6,'snippet');
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6);
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES
(1,1),
(1,2),
(1,3),
(1,4),
(1,5),
(1,6),
(2,7),
(2,8),
(2,9),
(2,10),
(2,11),
(2,12),
(3,14),
(3,15),
(3,16),
(3,17),
(3,18),
(3,19),
(4,21),
(4,22),
(4,23),
(4,24),
(4,25),
(4,26),
(5,28),
(5,29),
(5,30),
(5,31),
(5,32),
(5,33),
(6,35),
(6,36),
(6,37),
(6,38),
(6,39),
(6,40),
(7,42),
(7,43),
(7,44),
(7,45),
(7,46),
(7,47),
(8,49),
(8,50),
(8,51),
(8,52),
(8,53),
(8,54);
INSERT INTO `tncm_agent_data_template` VALUES
(1,'Cisco-Generic','[\"1\"]','[\"2\"]'),
(2,'Juniper-Generic','[\"15\"]','[\"3\"]'),
(3,'Palo&#x20;Alto-Generic','[\"16\"]','[\"4\"]'),
(4,'A10-Generic','[\"17\"]','[\"5\"]'),
(5,'Alcatel-Generic','[\"4\"]','[\"6\"]'),
(6,'Aruba-Generic','[\"18\"]','[\"7\"]'),
(7,'Mikrotik-Generic','[\"3\"]','[\"8\"]');
INSERT INTO `tncm_agent_data_template_scripts`(`id_agent_data_template`, `id_script`) VALUES
(1,13),
(2,20),
(3,27),
(4,34),
(5,41),
(6,48),
(7,55);
INSERT INTO `talert_calendar` VALUES (1, 'Default', 0, 'Default calendar');

View File

@ -1829,13 +1829,6 @@ class Client
}
} else {
// Manually uploaded package.
if (is_numeric($package['version']) !== true) {
$this->lastError = 'Version does not match required format (numeric)';
$this->notify(10, $this->lastError, false);
$this->unlock();
return false;
}
$classic_open_packages = false;
$nextUpdate = [ 'version' => $package['version'] ];
$file_path = $package['file_path'];

View File

@ -487,7 +487,6 @@ function updateOfflineProgress(url, auth) {
* Cancel update.
*/
function cancelUpdate(reason = "") {
console.error(reason);
var taskStatusLogContainer = $("#result li");
taskStatusLogContainer.addClass("error");
taskStatusLogContainer.find("p").text(texts.rejectedUpdate + " " + reason);

View File

@ -151,7 +151,11 @@ $agentCountModules = html_print_div(
true
);
$alive_animation = agents_get_starmap(0, 180, 30, $module_involved_ids);
$alive_animation = '';
if (empty($module_involved_ids) === false) {
$alive_animation = agents_get_starmap(0, 180, 30, $module_involved_ids);
}
$output = '<div id="agent_details_first_row" class="w100p cluster-agent-data">';
$output .= '<div class="flex">';

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.774-231213
Version: 7.0NG.774-231214
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -39,7 +39,7 @@ def _print_debug(
####
# Internal use only: Get AES cipher
#########################################################################################
def _get_cipher(
def _get_cipher_AES(
password: str = _PASSWORD
) -> AES:
'''
@ -78,7 +78,7 @@ def encrypt_AES(
Returns:
str: The encrypted string in base64 encoding.
'''
cipher = _get_cipher(password)
cipher = _get_cipher_AES(password)
try:
msg_padded = pad(str_to_encrypt.encode(), AES.block_size, style='pkcs7')
@ -106,11 +106,91 @@ def decrypt_AES(
Returns:
str: The decrypted string.
'''
cipher = _get_cipher(password)
cipher = _get_cipher_AES(password)
try:
decrypted_str = unpad(cipher.decrypt(base64.b64decode(str_to_decrypt)), AES.block_size, style='pkcs7').decode().strip()
except:
decrypted_str = ''
return decrypted_str
####
# Internal use only: Get Rijndael cipher
#########################################################################################
def _get_cipher_Rijndael(
password: str = _PASSWORD
) -> AES:
'''
Internal use only: Get Rijndael cipher for encryption and decryption.
Args:
password (str): The password used to derive the encryption key.
Returns:
AES: An AES cipher instance for encryption and decryption.
'''
key = b''
msg = password.encode('utf-8')
hash_obj = hmac.new(key, msg, hashlib.sha256)
hash_result = hash_obj.digest()
hash_base64 = base64.b64encode(hash_result)[:16].decode()
return AES.new(hash_base64.encode(), AES.MODE_ECB)
####
# Return encrypted string
#########################################################################################
def encrypt_Rijndael(
str_to_encrypt: str = "",
password: str = _PASSWORD
) -> str:
'''
Encrypt a string using Rijndael encryption.
Args:
str_to_encrypt (str): The string to be encrypted.
password (str): The password used to derive the encryption key.
Returns:
str: The encrypted string in base64 encoding.
'''
cipher = _get_cipher_Rijndael(password)
try:
padded_data = str_to_encrypt.encode()
missing = 16 - (len(padded_data) % 16)
padded_data += bytes([0] * missing) if missing != 16 else b''
b64str = base64.b64encode(cipher.encrypt(padded_data)).decode()
except:
b64str = ''
return b64str
####
# Return decrypted string
#########################################################################################
def decrypt_Rijndael(
str_to_decrypt: str = "",
password: str = _PASSWORD
) -> str:
'''
Decrypt an encrypted string using Rijndael decryption.
Args:
str_to_decrypt (str): The encrypted string to be decrypted.
password (str): The password used to derive the encryption key.
Returns:
str: The decrypted string.
'''
cipher = _get_cipher_Rijndael(password)
try:
decrypted_data = cipher.decrypt(base64.b64decode(str_to_decrypt))
decrypted_str = decrypted_data.rstrip(b'\x00').decode()
except:
decrypted_str = ''
return decrypted_str

View File

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

View File

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

View File

@ -7,7 +7,7 @@
%define debug_package %{nil}
%define name pandorafms_server
%define version 7.0NG.774
%define release 231213
%define release 231214
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.774
%define release 231213
%define release 231214
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

@ -38,7 +38,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.774 Build 231213";
my $version = "7.0NG.774 Build 231214";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.774 Build 231213";
my $version = "7.0NG.774 Build 231214";
# save program name for logging
my $progname = basename($0);
@ -4509,7 +4509,9 @@ sub cli_create_event() {
# exist_check($id_agent,'agent',$agent_name);
if($id_agent == -1){
if($force_create_agent == 1){
pandora_create_agent ($conf, '', $agent_name, '', $id_group, '', '', 'Created by cli_create_event', '', $dbh);
my $target_os = pandora_get_os($dbh, 'other');
my $target_server = $conf{'servername'};
pandora_create_agent ($conf, $target_server, $agent_name, '', $id_group, '', $target_os, 'Created by cli_create_event', '300', $dbh);
print_log "[INFO] Adding agent '$agent_name' \n\n";
$id_agent = get_agent_id($dbh,$agent_name);
}