#11763 Fix merge conflict

This commit is contained in:
Jonathan 2023-11-30 07:57:25 +01:00
commit e8272c0006
58 changed files with 1415 additions and 265 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{231128} {231130}
ViewReadme ViewReadme
{Yes} {Yes}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,11 @@
START TRANSACTION; START TRANSACTION;
-- Telegram and vonage default alerts
UPDATE talert_actions
SET field2='[PANDORA] Alert FIRED on _agent_ / _module_ / _timestamp_ / _data_'
WHERE id=9;
UPDATE talert_actions
SET field2='[PANDORA] Alert FIRED on _agent_ / _module_ / _timestamp_ / _data_'
WHERE id=11;
-- Delete table tagent_access -- Delete table tagent_access
DROP TABLE tagent_access; DROP TABLE tagent_access;
@ -7,5 +13,17 @@ ALTER TABLE treport_content ADD check_unknowns_graph tinyint DEFAULT 0 NULL;
ALTER TABLE `tevent_filter` ALTER TABLE `tevent_filter`
ADD COLUMN `regex` TEXT NULL AFTER `private_filter_user`; ADD COLUMN `regex` TEXT NULL AFTER `private_filter_user`;
-- Update macros for plugin oracle
UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.oracle';
SET @id_app := (SELECT `id_app` FROM `tdiscovery_apps` WHERE `short_name` = 'pandorafms.oracle');
UPDATE `tdiscovery_apps_tasks_macros` SET `value` = 'agents_group_id=__taskGroupID__ interval=__taskInterval__ user=_dbuser_ password=_dbpass_ thick_mode=_thickMode_ client_path=_clientPath_ threads=_threads_ modules_prefix=_prefixModuleName_ execute_custom_queries=_executeCustomQueries_ analyze_connections=_checkConnections_ engine_uptime=_checkUptime_ query_stats=_queryStats_ cache_stats=_checkCache_ fragmentation_ratio=_checkFragmentation_ check_tablescpaces=_checkTablespaces_' WHERE `macro` = '_tempfileConf_' AND `id_task` IN (SELECT `id_rt` FROM `trecon_task` WHERE `id_app` = @id_app);
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_thickMode_', 'custom', 0, 0 FROM `trecon_task` WHERE `id_app` = @id_app;
INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_clientPath_', 'custom', '', 0 FROM `trecon_task` WHERE `id_app` = @id_app;
UPDATE `trecon_task` SET `setup_complete` = 1 WHERE `id_app` = @id_app;
COMMIT; COMMIT;

View File

@ -922,22 +922,25 @@ $tableAdvancedAgent->data['safe_operation'][] = html_print_label_input_block(
) )
); );
$tableAdvancedAgent->data['vul_scan_enabled'][] = html_print_label_input_block( if (enterprise_installed() === true) {
__('Vulnerability scanning'), $tableAdvancedAgent->data['vul_scan_enabled'][] = html_print_label_input_block(
html_print_select( __('Vulnerability scanning'),
[ html_print_select(
0 => __('Disabled'), [
1 => __('Enabled'), 0 => __('Disabled'),
2 => __('Use global settings'), 1 => __('Enabled'),
], 2 => __('Use global settings'),
'vul_scan_enabled', ],
$vul_scan_enabled, 'vul_scan_enabled',
'', $vul_scan_enabled,
'', '',
0, '',
true 0,
) true
); )
);
}
ui_toggle( ui_toggle(
html_print_table($tableAdvancedAgent, true), html_print_table($tableAdvancedAgent, true),

View File

@ -2003,23 +2003,14 @@ ui_require_jquery_file('json');
var type_names = jQuery.parseJSON(Base64.decode($('#hidden-type_names').val())); var type_names = jQuery.parseJSON(Base64.decode($('#hidden-type_names').val()));
var type_name_selected = type_names[type_selected]; var type_name_selected = type_names[type_selected];
if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true || type_name_selected == 'generic_data_string') { if (($('#radius-percentage_warning').prop('checked') === true && $('#radius-percentage_critical').prop('checked') === true) || type_name_selected == 'generic_data_string') {
paint_graph_values();
$("#svg_dinamic").hide(); $("#svg_dinamic").hide();
} else { } else {
paint_graph_values(); paint_graph_values();
$("#svg_dinamic").show(); $("#svg_dinamic").show();
} }
if ($('#radius-percentage_warning').prop('checked') === true) {
$('#radius-warning_inverse').hide();
$('#label-radius-warning_inverse').hide();
}
if ($('#radius-warning_inverse').prop('checked') === true) {
$('#radius-percentage_warning').hide();
$('#label-radius-percentage_warning').hide();
}
if ($('#radius-normal_warning').prop('checked') === true) { if ($('#radius-normal_warning').prop('checked') === true) {
$('#radius-warning_inverse').show(); $('#radius-warning_inverse').show();
$('#label-radius-warning_inverse').show(); $('#label-radius-warning_inverse').show();
@ -2027,17 +2018,6 @@ ui_require_jquery_file('json');
$('#label-radius-percentage_warning').show(); $('#label-radius-percentage_warning').show();
} }
if ($('#radius-percentage_critical').prop('checked') === true) {
$('#radius-critical_inverse').hide();
$('#label-radius-critical_inverse').hide();
}
if ($('#radius-critical_inverse').prop('checked') === true) {
$('#radius-percentage_critical').hide();
$('#label-radius-percentage_critical').hide();
}
if ($('#radius-normal_critical').prop('checked') === true) { if ($('#radius-normal_critical').prop('checked') === true) {
$('#radius-critical_inverse').show(); $('#radius-critical_inverse').show();
$('#label-radius-critical_inverse').show(); $('#label-radius-critical_inverse').show();
@ -2354,30 +2334,48 @@ ui_require_jquery_file('json');
var message_error_percentage = '<?php echo __('Please introduce a positive percentage value'); ?>'; var message_error_percentage = '<?php echo __('Please introduce a positive percentage value'); ?>';
//if haven't error //if haven't error
if (max_w == 0 || max_w > min_w) { if (max_w == 0 || max_w > min_w || $('#radius-percentage_warning').is(':checked') === true) {
if (max_c == 0 || max_c > min_c) { if (max_c == 0 || max_c > min_c || $('#radius-percentage_critical').is(':checked') === true) {
paint_graph_status( error_c = 0;
min_w, max_w, min_c, max_c, inverse_w, error_w = 0;
inverse_c, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical
);
} else { } else {
error_c = 1; error_c = 1;
paint_graph_status( min_w = 0;
0, 0, 0, 0, 0, 0, error_w, error_c, max_w = 0;
legend_normal, legend_warning, legend_critical, min_c = 0;
message_error_warning, message_error_critical max_c = 0;
); inverse_w = 0;
inverse_c = 0;
} }
} else { } else {
if (max_c !== 0 && max_c < min_c && $('#radius-percentage_critical').is(':checked') === false) {
error_c = 2;
}
error_w = 1; error_w = 1;
paint_graph_status( min_w = 0;
0, 0, 0, 0, 0, 0, error_w, error_c, max_w = 0;
legend_normal, legend_warning, legend_critical, min_c = 0;
message_error_warning, message_error_critical max_c = 0;
); inverse_w = 0;
inverse_c = 0;
} }
if ($('#radius-percentage_warning').is(':checked') === true){
min_w = 0;
max_w = 0;
}
if ($('#radius-percentage_critical').is(':checked') === true){
min_c = 0;
max_c = 0;
}
paint_graph_status(
min_w, max_w, min_c, max_c, inverse_w,
inverse_c, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical
);
} }
/* ]]> */ /* ]]> */

View File

@ -84,6 +84,9 @@ if (is_ajax() === true) {
} }
$group = db_get_row('tgrupo', 'id_grupo', $id_group); $group = db_get_row('tgrupo', 'id_grupo', $id_group);
if (str_contains($group['icon'], '.png') === true) {
$group['folder'] = 'groups_small/';
}
echo json_encode($group); echo json_encode($group);
return; return;

View File

@ -1086,6 +1086,50 @@ switch ($action) {
$period = $item['period']; $period = $item['period'];
break; break;
case 'vuls_severity_graph':
$group = $item['id_group'];
break;
case 'vuls_attack_complexity':
$group = $item['id_group'];
break;
case 'vuls_by_packages':
$group = $item['id_group'];
break;
case 'vuls_by_agent':
$group = $item['id_group'];
$es = json_decode($item['external_source'], true);
$selected_agent_custom_field_filter = $es['agent_custom_field_filter'];
$security_hardening_score = $es['security_hardening_score'];
$vulnerabilities_status = $es['vulnerabilities_status'];
$secmon_status = $es['secmon_status'];
break;
case 'vuls_info_agent':
$idAgent = $item['id_agent'];
$es = json_decode($item['external_source'], true);
$vul_package = $es['vul_package'];
$vul_severity = $es['vul_severity'];
$vul_ac = $es['vul_ac'];
$vul_pr = $es['vul_pr'];
$vul_ui = $es['vul_ui'];
$vul_av = (empty($es['vul_av']) === true) ? 'all' : $es['vul_av'];
break;
case 'top_n_agents_vuls':
$group = $item['id_group'];
$recursion = $item['recursion'];
$top_n_value = (empty($item['top_n_value']) === true) ? 10 : $item['top_n_value'];
break;
case 'top_n_vuls_count':
$group = $item['id_group'];
$recursion = $item['recursion'];
$top_n_value = (empty($item['top_n_value']) === true) ? 10 : $item['top_n_value'];
break;
default: default:
// It's not possible. // It's not possible.
break; break;
@ -3965,6 +4009,217 @@ if (is_metaconsole() === true) {
?> ?>
</td> </td>
</tr> </tr>
<tr id="row_secmon_status" class="datos">
<td class="bolder">
<?php
echo __('Secmon status');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'critical' => __('Critical'),
'warning' => __('Warning'),
],
'secmon_status',
$secmon_status,
);
?>
</td>
</tr>
<tr id="row_security_hardening_score" class="datos">
<td class="bolder">
<?php
echo __('Security hardening score');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'90' => __('< 90%'),
'80' => __('< 80%'),
'70' => __('< 70%'),
'60' => __('< 60%'),
'50' => __('< 50%'),
'40' => __('< 40%'),
'30' => __('< 30%'),
'20' => __('< 20%'),
'10' => __('< 10%'),
],
'security_hardening_score',
(empty($security_hardening_score) === false) ? $security_hardening_score : 'all',
'',
'',
0,
false,
false,
false
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_status" class="datos">
<td class="bolder">
<?php
echo __('Vulnerabilities status');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'crit' => __('Critical'),
'warn' => __('Warning'),
],
'vulnerabilities_status',
$vulnerabilities_status,
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_packages" class="datos">
<td class="bolder">
<?php
echo __('Package').ui_print_help_tip(__('Select a agent for load his packages.'), true);
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
],
'vul_package',
$vul_package,
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_severity" class="datos">
<td class="bolder">
<?php
echo __('Severity');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'high' => __('High'),
'low' => __('Low'),
'none' => __('None'),
],
'vul_severity',
$vul_severity,
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_ac" class="datos">
<td class="bolder">
<?php
echo __('Attack Complexity');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'H' => __('High'),
'L' => __('Low'),
],
'vul_ac',
$vul_ac,
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_pr" class="datos">
<td class="bolder">
<?php
echo __('Privileges Required');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'H' => __('High'),
'L' => __('Low'),
'N' => __('None'),
],
'vul_pr',
$vul_pr,
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_ui" class="datos">
<td class="bolder">
<?php
echo __('User Interaction');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'R' => __('Required'),
'N' => __('None'),
],
'vul_ui',
$vul_ui,
);
?>
</td>
</tr>
<tr id="row_vulnerabilities_av" class="datos">
<td class="bolder">
<?php
echo __('Attack vector');
?>
</td>
<td>
<?php
html_print_select(
[
'all' => __('All'),
'A' => __('Adjacent Network'),
'L' => __('Local'),
'N' => __('Network'),
'P' => __('Physical'),
],
'vul_av',
(empty($vul_av) === true) ? 'all' : $vul_av,
'',
'',
0,
false,
false,
false
);
?>
</td>
</tr>
<?php endif; ?> <?php endif; ?>
<tr id="row_status_check" class="datos"> <tr id="row_status_check" class="datos">
@ -5692,6 +5947,27 @@ $(document).ready (function () {
return false; return false;
} }
break; break;
case 'vuls_info_agent':
if ($("#hidden-id_agent").val() == 0) {
dialog_message('#message_no_agent');
return false;
}
break;
case 'top_n_agents_vuls':
if ($("#text-max_items").val() == '') {
dialog_message('#message_no_max_item');
return false;
}
break;
case 'top_n_vuls_count':
if ($("#text-max_items").val() == '') {
dialog_message('#message_no_max_item');
return false;
}
break;
default: default:
break; break;
} }
@ -5846,7 +6122,24 @@ $(document).ready (function () {
return false; return false;
} }
break; break;
case 'vuls_info_agent':
if ($("#hidden-id_agent").val() == 0) {
dialog_message('#message_no_agent');
return false;
}
break;
case 'top_n_agents_vuls':
if ($("#text-max_items").val() == '') {
dialog_message('#message_no_max_item');
return false;
}
break;
case 'top_n_vuls_count':
if ($("#text-max_items").val() == '') {
dialog_message('#message_no_max_item');
return false;
}
break;
default: default:
break; break;
} }
@ -6903,6 +7196,15 @@ function chooseType() {
$("#row_cat_security_hardening").hide(); $("#row_cat_security_hardening").hide();
$("#row_ignore_skipped").hide(); $("#row_ignore_skipped").hide();
$("#row_status_check").hide(); $("#row_status_check").hide();
$("#row_secmon_status").hide();
$("#row_security_hardening_score").hide();
$("#row_vulnerabilities_status").hide();
$("#row_vulnerabilities_packages").hide();
$("#row_vulnerabilities_severity").hide();
$("#row_vulnerabilities_ac").hide();
$("#row_vulnerabilities_pr").hide();
$("#row_vulnerabilities_ui").hide();
$("#row_vulnerabilities_av").hide();
// SLA list default state. // SLA list default state.
$("#sla_list").hide(); $("#sla_list").hide();
@ -7803,6 +8105,50 @@ function chooseType() {
$("#row_group").show(); $("#row_group").show();
$('#row_period').show(); $('#row_period').show();
break; break;
case 'vuls_severity_graph':
$("#row_group").show();
break;
case 'vuls_attack_complexity':
$("#row_group").show();
break;
case 'vuls_by_packages':
$("#row_group").show();
break;
case 'vuls_by_agent':
$("#row_group").show();
$("#row_custom_field_filter").show();
$("#row_secmon_status").show();
$("#row_security_hardening_score").show();
$("#row_vulnerabilities_status").show();
break;
case 'vuls_info_agent':
$("#row_agent").show();
$("#row_vulnerabilities_packages").show();
$("#row_vulnerabilities_severity").show();
$("#row_vulnerabilities_ac").show();
$("#row_vulnerabilities_pr").show();
$("#row_vulnerabilities_ui").show();
$("#row_vulnerabilities_av").show();
updatePackages();
$('#row_agent input[type=text]').change(function(e) {
updatePackages();
});
break;
case 'top_n_agents_vuls':
$("#row_group").show();
$("#row_max_items").show();
break;
case 'top_n_vuls_count':
$("#row_group").show();
$("#row_max_items").show();
break;
} }
switch (type) { switch (type) {
@ -8045,6 +8391,46 @@ function control_period_range() {
}, 800); }, 800);
} }
} }
function updateSelect(element, fields, selected) {
if (typeof fields === "object") {
$(element).find("select").empty();
$(element).find(".select2-container .select2-selection__rendered").empty();
Object.keys(fields).forEach(function(key) {
if (key === selected) {
$(element).find(".select2-container .select2-selection__rendered").append(`${fields[key]}`);
$(element).find("select").append(`<option value="${key}" selected>${fields[key]}</option>`);
} else {
$(element).find("select").append(`<option value="${key}">${fields[key]}</option>`);
}
});
}
}
function updatePackages() {
let id_agent = $('#hidden-id_agent').val();
let server_id = $('#hidden-server_id').val();
$.ajax({
method: "POST",
url: "<?php echo ui_get_full_url('ajax.php'); ?>",
data: {
page: "<?php echo ENTERPRISE_DIR.'/include/ajax/vulnerabilities.ajax'; ?>",
action: "updatePackages",
id_agent: id_agent,
server_id: server_id,
},
success: function(data) {
const json = JSON.parse(data);
if (json.success) {
updateSelect("#row_vulnerabilities_packages", json.data, '<?php echo $vul_package; ?>');
}
}
});
}
$(document).ready(function () { $(document).ready(function () {
$('[id^=period], #combo_graph_options, #combo_sla_sort_options').next().css('z-index', 0); $('[id^=period], #combo_graph_options, #combo_sla_sort_options').next().css('z-index', 0);

View File

@ -2046,6 +2046,56 @@ switch ($action) {
$good_format = true; $good_format = true;
break; break;
case 'vuls_severity_graph':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
break;
case 'vuls_attack_complexity':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
break;
case 'vuls_by_packages':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
break;
case 'vuls_by_agent':
$values['id_group'] = get_parameter('combo_group');
$es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter');
$es['secmon_status'] = get_parameter('secmon_status');
$es['security_hardening_score'] = get_parameter('security_hardening_score');
$es['vulnerabilities_status'] = get_parameter('vulnerabilities_status');
$values['external_source'] = json_encode($es);
$good_format = true;
break;
case 'vuls_info_agent':
$values['id_agent'] = get_parameter('id_agent');
$es['server_id'] = get_parameter('server_id');
$es['vul_package'] = get_parameter('vul_package');
$es['vul_severity'] = get_parameter('vul_severity');
$es['vul_ac'] = get_parameter('vul_ac');
$es['vul_pr'] = get_parameter('vul_pr');
$es['vul_ui'] = get_parameter('vul_ui');
$es['vul_av'] = get_parameter('vul_av');
$values['external_source'] = json_encode($es);
$good_format = true;
break;
case 'top_n_agents_vuls':
$values['id_group'] = get_parameter('combo_group');
$values['top_n_value'] = get_parameter('max_items');
$good_format = true;
break;
case 'top_n_vuls_count':
$values['id_group'] = get_parameter('combo_group');
$values['top_n_value'] = get_parameter('max_items');
$good_format = true;
break;
default: default:
$values['period'] = get_parameter('period'); $values['period'] = get_parameter('period');
$values['top_n'] = get_parameter( $values['top_n'] = get_parameter(
@ -2979,6 +3029,56 @@ switch ($action) {
$good_format = true; $good_format = true;
break; break;
case 'vuls_severity_graph':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
break;
case 'vuls_attack_complexity':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
break;
case 'vuls_by_packages':
$values['id_group'] = get_parameter('combo_group');
$good_format = true;
break;
case 'vuls_by_agent':
$values['id_group'] = get_parameter('combo_group');
$es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter');
$es['secmon_status'] = get_parameter('secmon_status');
$es['security_hardening_score'] = get_parameter('security_hardening_score');
$es['vulnerabilities_status'] = get_parameter('vulnerabilities_status');
$values['external_source'] = json_encode($es);
$good_format = true;
break;
case 'vuls_info_agent':
$values['id_agent'] = get_parameter('id_agent');
$es['server_id'] = get_parameter('server_id');
$es['vul_package'] = get_parameter('vul_package');
$es['vul_severity'] = get_parameter('vul_severity');
$es['vul_ac'] = get_parameter('vul_ac');
$es['vul_pr'] = get_parameter('vul_pr');
$es['vul_ui'] = get_parameter('vul_ui');
$es['vul_av'] = get_parameter('vul_av');
$values['external_source'] = json_encode($es);
$good_format = true;
break;
case 'top_n_agents_vuls':
$values['id_group'] = get_parameter('combo_group');
$values['top_n_value'] = get_parameter('max_items');
$good_format = true;
break;
case 'top_n_vuls_count':
$values['id_group'] = get_parameter('combo_group');
$values['top_n_value'] = get_parameter('max_items');
$good_format = true;
break;
default: default:
$values['period'] = get_parameter('period'); $values['period'] = get_parameter('period');
$values['top_n'] = get_parameter( $values['top_n'] = get_parameter(

View File

@ -860,8 +860,10 @@ if (empty($create) === false || empty($view) === false) {
if ($management_allowed === false) { if ($management_allowed === false) {
ui_print_warning_message( ui_print_warning_message(
__( __(
'This console is not manager of this environment, 'This console is not manager of this environment, please manage this feature from feature from %s.',
please manage this feature from centralized manager console (Metaconsole).' '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/servers/plugin_registration&tab=plugin_registration&pure=0'
).'">'.__('metaconsole').'</a>'
) )
); );
} }

View File

@ -179,7 +179,7 @@ foreach ($servers as $server) {
} }
$data[7] = ''; $data[7] = '';
if ($server['queued_modules'] > 500) { if ($server['queued_modules'] >= $config['number_modules_queue']) {
$data[7] .= '<div class="inline"><a onclick="show_dialog();" >'.html_print_image( $data[7] .= '<div class="inline"><a onclick="show_dialog();" >'.html_print_image(
'images/info-warning.svg', 'images/info-warning.svg',
true, true,
@ -276,7 +276,7 @@ foreach ($servers as $server) {
$data[9] .= '</a>'; $data[9] .= '</a>';
if (($names_servers[$safe_server_name] === true) && ($ext === '_server' || $server['type'] === 'enterprise satellite')) { if (($names_servers[$safe_server_name] === true) && ($ext === '_server' || $server['type'] === 'enterprise satellite')) {
$data[9] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext.'&tab=agent_editor').'">'; $data[9] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext.'&tab=advanced_editor').'">';
$data[9] .= html_print_image( $data[9] .= html_print_image(
'images/agents@svg.svg', 'images/agents@svg.svg',
true, true,

View File

@ -54,8 +54,12 @@ if (isset($_POST['create'])) {
if (! $result) { if (! $result) {
ui_print_error_message(__('There was a problem creating link')); ui_print_error_message(__('There was a problem creating link'));
} else { } else {
ui_print_success_message(__('Successfully created'));
$id_link = $result; $id_link = $result;
ui_print_result_message(
$id_link,
__('Successfully created'),
__('Could not be created')
);
} }
} }
@ -111,8 +115,8 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
$link = ''; $link = '';
} }
echo '<table class="databox filters filter-table-adv max_floating_element_size" cellpadding="4" cellspacing="4" width="100%">';
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/links">'; echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/links">';
echo '<table class="databox filters filter-table-adv max_floating_element_size" cellpadding="4" cellspacing="4" width="100%">';
if ($creation_mode == 1) { if ($creation_mode == 1) {
echo "<input type='hidden' name='create' value='1'>"; echo "<input type='hidden' name='create' value='1'>";
} else { } else {
@ -179,10 +183,10 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
) )
); );
echo '</form></td></tr></table>'; echo '</td></tr></table></form>';
} else { } else {
// Main list view for Links editor // Main list view for Links editor.
$rows = db_get_all_rows_in_table('tlink', 'name'); $rows = db_get_all_fields_in_table('tlink', '', '', 'name');
if ($rows === false) { if ($rows === false) {
$rows = []; $rows = [];
} }

View File

@ -187,7 +187,8 @@ $button_test .= '&nbsp;<span id="ITSM-message" class="invisible"></span>';
$row['control'] = html_print_label_input_block( $row['control'] = html_print_label_input_block(
__('Test connection pandora to ITSM'), __('Test connection pandora to ITSM'),
$button_test $button_test,
['div_class' => 'ITSM-remote-setup-ITSM_token']
); );
$table_remote->data['ITSM_test'] = $row; $table_remote->data['ITSM_test'] = $row;

View File

@ -766,6 +766,16 @@ $table->data[$i][] = html_print_label_input_block(
true true
) )
); );
$table->data[$i++][] = html_print_label_input_block(
__('Number of modules in queue'),
html_print_input_number(
[
'name' => 'number_modules_queue',
'min' => 0,
'value' => $config['number_modules_queue'],
]
)
);
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=general&amp;pure='.$config['pure'].'">'; echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=general&amp;pure='.$config['pure'].'">';

View File

@ -424,8 +424,10 @@ if ($create_user === true) {
$values['data_section'] = $dashboard; $values['data_section'] = $dashboard;
} else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) { } else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) {
$values['data_section'] = $visual_console; $values['data_section'] = $visual_console;
} else if ($values['section'] === HOME_SCREEN_OTHER || io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) { } else if ($values['section'] === HOME_SCREEN_OTHER) {
$values['data_section'] = get_parameter('data_section'); $values['data_section'] = get_parameter('data_section_other');
} else if (io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) {
$values['data_section'] = get_parameter('data_section_external');
} }
// $values['section'] = $homeScreenValues[$values['section']]; // $values['section'] = $homeScreenValues[$values['section']];
@ -672,8 +674,11 @@ if ($update_user) {
$values['email'] = (string) get_parameter('email'); $values['email'] = (string) get_parameter('email');
$values['phone'] = (string) get_parameter('phone'); $values['phone'] = (string) get_parameter('phone');
$values['comments'] = io_safe_input(strip_tags(io_safe_output((string) get_parameter('comments')))); $values['comments'] = io_safe_input(strip_tags(io_safe_output((string) get_parameter('comments'))));
$values['allowed_ip_active'] = ((int) get_parameter('allowed_ip_active', -1) === 0); if (users_is_admin($config['id_user']) === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
$values['allowed_ip_list'] = io_safe_input(strip_tags(io_safe_output((string) get_parameter('allowed_ip_list')))); $values['allowed_ip_active'] = ((int) get_parameter('allowed_ip_active', -1) === 0);
$values['allowed_ip_list'] = io_safe_input(strip_tags(io_safe_output((string) get_parameter('allowed_ip_list'))));
}
$values['is_admin'] = (get_parameter('is_admin', 0) === 0) ? 0 : 1; $values['is_admin'] = (get_parameter('is_admin', 0) === 0) ? 0 : 1;
$values['language'] = (string) get_parameter('language'); $values['language'] = (string) get_parameter('language');
$values['timezone'] = (string) get_parameter('timezone'); $values['timezone'] = (string) get_parameter('timezone');
@ -719,8 +724,10 @@ if ($update_user) {
$values['data_section'] = $dashboard; $values['data_section'] = $dashboard;
} else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) { } else if (io_safe_output($values['section']) === HOME_SCREEN_VISUAL_CONSOLE) {
$values['data_section'] = $visual_console; $values['data_section'] = $visual_console;
} else if ($values['section'] === HOME_SCREEN_OTHER || io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) { } else if ($values['section'] === HOME_SCREEN_OTHER) {
$values['data_section'] = get_parameter('data_section'); $values['data_section'] = get_parameter('data_section_other');
} else if (io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) {
$values['data_section'] = get_parameter('data_section_external');
} }
// $values['section'] = $homeScreenValues[$values['section']]; // $values['section'] = $homeScreenValues[$values['section']];

View File

@ -81,6 +81,11 @@ $customHomeScreenAddition[HOME_SCREEN_DASHBOARD] = html_print_select(
false, false,
'width: 100%' 'width: 100%'
); );
// Home screen. Visual consoles.
$customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true, false, true, 'w100p', false, 'width: 100%');
// Home screen. External link and Other.
$customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text('data_section_external', $user_info['data_section'], '', 60, 255, true);
$customHomeScreenAddition[HOME_SCREEN_OTHER] = html_print_input_text('data_section_other', $user_info['data_section'], '', 60, 255, true);
$layouts = visual_map_get_user_layouts($config['id_user'], true); $layouts = visual_map_get_user_layouts($config['id_user'], true);
$layouts_aux = []; $layouts_aux = [];
@ -859,50 +864,56 @@ $userManagementTable->data['fields_addSettings'][0] = html_print_textarea(
'' ''
); );
$userManagementTable->data['captions_addSettings'][1] = __('Login allowed IP list'); if (users_is_admin($config['id_user']) === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
$userManagementTable->data['fields_addSettings'][1] = html_print_div( $allowAllIpsContent = [];
[ $allowAllIpsContent[] = '<span>'.__('Enable IP allowlist').'</span>';
'class' => 'edit_user_allowed_ip', $allowAllIpsContent[] = html_print_div(
'content' => html_print_textarea( [
'allowed_ip_list', 'content' => html_print_checkbox_switch(
5, 'allowed_ip_active',
65, 0,
($user_info['allowed_ip_list'] ?? ''), ($user_info['allowed_ip_active'] ?? 0),
(((bool) $view_mode === true) ? 'readonly="readonly"' : ''), true,
true false,
), 'handleIpAllowlist(this)'
], ),
true ],
); true
);
$userManagementTable->data['fields_addSettings'][1] .= ui_print_input_placeholder( $userManagementTable->data['captions_addSettings'][1] = html_print_div(
__('Add the source IPs that will allow console access. Each IP must be separated only by comma. * allows all.'), [
true 'class' => 'margin-top-10',
); 'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
'content' => implode('', $allowAllIpsContent),
],
true
);
$allowAllIpsContent = []; $userManagementTable->data['fields_addSettings'][1] .= html_print_div(
$allowAllIpsContent[] = '<span>'.__('Allow all IPs').'</span>'; [
$allowAllIpsContent[] = html_print_div( 'class' => 'edit_user_allowed_ip '.(((int) $user_info['allowed_ip_active'] === 1) ? '' : 'invisible'),
[ 'content' => html_print_textarea(
'content' => html_print_checkbox_switch( 'allowed_ip_list',
'allowed_ip_active', 5,
0, 65,
($user_info['allowed_ip_active'] ?? 0), ($user_info['allowed_ip_list'] ?? ''),
true (((bool) $view_mode === true) ? 'readonly="readonly"' : ''),
), true
], ),
true ],
); true
);
$userManagementTable->data['fields_addSettings'][1] .= html_print_div(
[
'class' => 'margin-top-10',
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
'content' => implode('', $allowAllIpsContent),
],
true
);
$userManagementTable->data['fields_addSettings'][1] .= ui_print_input_placeholder(
__('Add the source IPs that will allow console access. Each IP must be separated only by comma. * allows all.'),
true,
[
'id' => 'info_allowed_ip',
'class' => ((int) $user_info['allowed_ip_active'] === 1) ? 'input_sub_placeholder' : 'input_sub_placeholder invisible',
]
);
}
if ($config['ITSM_enabled'] && $config['ITSM_user_level_conf']) { if ($config['ITSM_enabled'] && $config['ITSM_user_level_conf']) {
// Pandora ITSM user remote login. // Pandora ITSM user remote login.
@ -1040,4 +1051,14 @@ $(document).ready(function () {
} }
}) })
}); });
function handleIpAllowlist(e){
if(e.checked === true) {
$('.edit_user_allowed_ip').show();
$('#info_allowed_ip').show();
} else {
$('.edit_user_allowed_ip').hide();
$('#info_allowed_ip').hide();
}
}
</script> </script>

View File

@ -737,7 +737,7 @@ class Diagnostics extends Wizard
$cpuModelName = 'cat /proc/cpuinfo | grep "model name" | tail -1 | cut -f 2 -d ":"'; $cpuModelName = 'cat /proc/cpuinfo | grep "model name" | tail -1 | cut -f 2 -d ":"';
$cpuProcessor = 'cat /proc/cpuinfo | grep "processor" | wc -l'; $cpuProcessor = 'cat /proc/cpuinfo | grep "processor" | wc -l';
$ramMemTotal = 'cat /proc/meminfo | grep "MemTotal"'; $ramMemTotal = 'cat /proc/meminfo | grep "MemTotal"';
$distroInfo = 'cat /etc/os-release | grep "PRETTY_NAME" | cut -f 2 -d "="';
exec( exec(
"ifconfig | awk '{ print $2}' | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'", "ifconfig | awk '{ print $2}' | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'",
$output $output
@ -756,6 +756,10 @@ class Diagnostics extends Wizard
'name' => __('RAM'), 'name' => __('RAM'),
'value' => exec($ramMemTotal), 'value' => exec($ramMemTotal),
], ],
'distroInfo' => [
'name' => __('Distro'),
'value' => str_replace('"', '', exec($distroInfo)),
],
'osInfo' => [ 'osInfo' => [
'name' => __('Os'), 'name' => __('Os'),
'value' => exec('uname -a'), 'value' => exec('uname -a'),

View File

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

View File

@ -4752,7 +4752,7 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
$secondary_groups = enterprise_hook('agents_get_secondary_groups', [$id_agente]); $secondary_groups = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
$secondaryLinks = []; $secondaryLinks = [];
if (empty($secondary_groups['for_select']) === true) { if (empty($secondary_groups['for_select']) === true) {
$secondaryLinks[] = '<em>'.__('N/A').'</em>'; $secondaryLinks = [];
} else { } else {
foreach ($secondary_groups['for_select'] as $id => $name) { foreach ($secondary_groups['for_select'] as $id => $name) {
$secondaryLinks[] = html_print_anchor( $secondaryLinks[] = html_print_anchor(
@ -4811,22 +4811,22 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
'content' => groups_get_name($agent['id_grupo']), 'content' => groups_get_name($agent['id_grupo']),
], ],
true true
); ).' '.ui_print_group_icon($agent['id_grupo'], true, '', 'margin-left: 2%;', true, false, false, '', true);
$table_contact->data[] = $data; $table_contact->data[] = $data;
// Secondary groups. // Secondary groups.
$data = []; $data = [];
$data[0] = '<b>'.__('Secondary groups').'</b>'; if (!empty($secondaryLinks) === true) {
$data[1] = implode(', ', $secondaryLinks); $data[0] = '<b>'.__('Secondary groups').'</b>';
$table_contact->data[] = $data; $data[1] = implode(', ', $secondaryLinks);
$table_contact->data[] = $data;
}
// Parent agent line. // Parent agent line.
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
$data = []; if ((int) $agent['id_parent'] !== 0) {
$data[0] = '<b>'.__('Parent').'</b>'; $data = [];
if ((int) $agent['id_parent'] === 0) { $data[0] = '<b>'.__('Parent').'</b>';
$data[1] = '<em>'.__('N/A').'</em>';
} else {
$data[1] = html_print_anchor( $data[1] = html_print_anchor(
[ [
'href' => 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$agent['id_parent'], 'href' => 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$agent['id_parent'],
@ -4834,9 +4834,9 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
], ],
true true
); );
}
$table_contact->data[] = $data; $table_contact->data[] = $data;
}
} }
// Last status change line. // Last status change line.
@ -4845,6 +4845,44 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
$data[1] = $time_elapsed; $data[1] = $time_elapsed;
$table_contact->data[] = $data; $table_contact->data[] = $data;
$has_remote_conf = enterprise_hook(
'config_agents_has_remote_configuration',
[$agent['id_agente']]
);
if ((bool) $has_remote_conf) {
$data = [];
$data[0] = __('Remote configuration');
$data[1] = '<spam style="position: relative;top: -10%; margin-right: 10px;">'.__('Enabled').'</spam>';
$data[1] .= html_print_menu_button(
[
'href' => ui_get_full_url('index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$agent['id_agente'].'&disk_conf=1'),
'image' => 'images/remote-configuration@svg.svg',
'title' => __('Edit remote config'),
],
true
);
$satellite_server = (int) db_get_value_filter(
'satellite_server',
'tagente',
['id_agente' => $id_agente]
);
if (empty($satellite_server) === false) {
$satellite_name = db_get_value_filter(
'name',
'tserver',
['id_server' => $satellite_server]
);
$data[0] = __('Satellite server');
$data[1] = $satellite_name;
}
$table_contact->data[] = $data;
}
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
// SecurityMon line. // SecurityMon line.
$id_module_group = db_get_value('id_mg', 'tmodule_group', 'name', 'Security'); $id_module_group = db_get_value('id_mg', 'tmodule_group', 'name', 'Security');
@ -4887,6 +4925,43 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
} }
} }
// Optional data
// Position Information.
if ((bool) $config['activate_gis'] === true) {
$data = [];
$dataPositionAgent = gis_get_data_last_position_agent(
$agent['id_agente']
);
if (is_array($dataPositionAgent) === true && $dataPositionAgent['stored_longitude'] !== '' && $dataPositionAgent['stored_latitude'] !== '') {
$data[0] = __('Position (Long, Lat)');
$dataOptionalOutput = html_print_anchor(
[
'href' => 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=gis&amp;id_agente='.$id_agente,
'content' => $dataPositionAgent['stored_longitude'].', '.$dataPositionAgent['stored_latitude'],
],
true
);
if (empty($dataPositionAgent['description']) === false) {
$dataOptionalOutput .= ' ('.$dataPositionAgent['description'].')';
}
$data[1] = $dataOptionalOutput;
}
$table_contact->data[] = $data;
}
// Timezone Offset.
if ((int) $agent['timezone_offset'] !== 0) {
$data = [];
$data[0] = __('Timezone Offset');
$data[1] = $agent['timezone_offset'];
$table_contact->data[] = $data;
}
$agent_contact = html_print_div( $agent_contact = html_print_div(
[ [
'class' => 'agent_details_header', 'class' => 'agent_details_header',

View File

@ -371,6 +371,10 @@ function config_update_config()
$error_update[] = __('show_experimental_features'); $error_update[] = __('show_experimental_features');
} }
if (config_update_value('number_modules_queue', get_parameter('number_modules_queue'), true) === false) {
$error_update[] = __('number_modules_queue');
}
if (config_update_value('console_log_enabled', get_parameter('console_log_enabled'), true) === false) { if (config_update_value('console_log_enabled', get_parameter('console_log_enabled'), true) === false) {
$error_update[] = __('Console log enabled'); $error_update[] = __('Console log enabled');
} }
@ -2441,6 +2445,10 @@ function config_process_config()
config_update_value('show_experimental_features', 0); config_update_value('show_experimental_features', 0);
} }
if (!isset($config['number_modules_queue'])) {
config_update_value('number_modules_queue', 500);
}
if (!isset($config['agent_vulnerabilities'])) { if (!isset($config['agent_vulnerabilities'])) {
config_update_value('agent_vulnerabilities', 1); config_update_value('agent_vulnerabilities', 1);
} }

View File

@ -1745,20 +1745,37 @@ function html_print_select_multiple_modules_filtered(array $data):string
} }
} }
$output .= html_print_input( if (is_metaconsole() === true) {
[ $output .= html_print_input(
'label' => __('Agents'), [
'label_class' => 'font-title-font', 'label' => __('Agents'),
'type' => 'select_from_sql', 'label_class' => 'font-title-font',
'sql' => 'SELECT `id_agente`,`alias` FROM tagente', 'type' => 'select',
'name' => 'filtered-module-agents-'.$uniqId, 'fields' => $agents,
'selected' => explode(',', $data['mAgents']), 'name' => 'filtered-module-agents-'.$uniqId,
'return' => true, 'selected' => explode(',', $data['mAgents']),
'multiple' => true, 'return' => true,
'style' => 'min-width: 200px;max-width:200px;', 'multiple' => true,
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', 'style' => 'min-width: 200px;max-width:200px;',
] 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
); ]
);
} else {
$output .= html_print_input(
[
'label' => __('Agents'),
'label_class' => 'font-title-font',
'type' => 'select_from_sql',
'sql' => 'SELECT `id_agente`,`alias` FROM tagente',
'name' => 'filtered-module-agents-'.$uniqId,
'selected' => explode(',', $data['mAgents']),
'return' => true,
'multiple' => true,
'style' => 'min-width: 200px;max-width:200px;',
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
]
);
}
$commonModules = 0; $commonModules = 0;
if (empty($data['mShowCommonModules']) === false) { if (empty($data['mShowCommonModules']) === false) {

View File

@ -1170,6 +1170,14 @@ if (is_ajax()) {
<p style="font-size: 10pt;">'.$sys_info->data->ramInfo->value.'</p> <p style="font-size: 10pt;">'.$sys_info->data->ramInfo->value.'</p>
</th> </th>
</tr> </tr>
<tr>
<th style="width: 15%;">
<p><span>'.$sys_info->data->distroInfo->name.'</span></p>
</th>
<th style="width: 85%;">
<p style="font-size: 10pt;">'.$sys_info->data->distroInfo->value.'</p>
</th>
</tr>
<tr> <tr>
<th style="width: 15%;"> <th style="width: 15%;">
<p><span>'.$sys_info->data->osInfo->name.'</span></p> <p><span>'.$sys_info->data->osInfo->name.'</span></p>

View File

@ -1024,6 +1024,62 @@ function reporting_make_reporting_data(
); );
break; break;
case 'vuls_severity_graph':
$report['contents'][] = reporting_vuls_severity_graph(
$report,
$content,
$type
);
break;
case 'vuls_attack_complexity':
$report['contents'][] = reporting_vuls_attack_complexity_graph(
$report,
$content,
$type
);
break;
case 'vuls_by_packages':
$report['contents'][] = reporting_vuls_by_packages_graph(
$report,
$content,
$type
);
break;
case 'vuls_by_agent':
$report['contents'][] = reporting_vuls_by_agent(
$report,
$content,
$type
);
break;
case 'vuls_info_agent':
$report['contents'][] = reporting_vuls_info_agent(
$report,
$content,
$type
);
break;
case 'top_n_agents_vuls':
$report['contents'][] = reporting_top_n_agents_vuls(
$report,
$content,
$type
);
break;
case 'top_n_vuls_count':
$report['contents'][] = reporting_top_n_vuls_count(
$report,
$content,
$type
);
break;
default: default:
// Default. // Default.
break; break;
@ -13642,38 +13698,47 @@ function reporting_tiny_stats(
} }
if ($modern === true) { if ($modern === true) {
$out .= '<div id="bullets_modules">';
if (isset($fired_count) && $fired_count > 0) { if (isset($fired_count) && $fired_count > 0) {
$out .= '<div class="bullets_modules">';
$out .= '<div><div id="fired_count_'.$uniq_id.'" class="forced_title bullet_modules orange_background"></div>'; $out .= '<div><div id="fired_count_'.$uniq_id.'" class="forced_title bullet_modules orange_background"></div>';
$out .= '<span class="font_12pt">'.$fired_count.'</span></div>'; $out .= '<span class="font_12pt">'.$fired_count.'</span></div>';
$out .= '</div>';
} }
if (isset($critical_count) && $critical_count > 0) { if (isset($critical_count) && $critical_count > 0) {
$out .= '<div class="bullets_modules">';
$out .= '<div><div id="critical_count_'.$uniq_id.'" class="forced_title bullet_modules red_background"></div>'; $out .= '<div><div id="critical_count_'.$uniq_id.'" class="forced_title bullet_modules red_background"></div>';
$out .= '<span class="font_12pt">'.$critical_count.'</span></div>'; $out .= '<span class="font_12pt">'.$critical_count.'</span></div>';
$out .= '</div>';
} }
if (isset($warning_count) && $warning_count > 0) { if (isset($warning_count) && $warning_count > 0) {
$out .= '<div class="bullets_modules">';
$out .= '<div><div id="warning_count_'.$uniq_id.'" class="forced_title bullet_modules yellow_background"></div>'; $out .= '<div><div id="warning_count_'.$uniq_id.'" class="forced_title bullet_modules yellow_background"></div>';
$out .= '<span class="font_12pt">'.$warning_count.'</span></div>'; $out .= '<span class="font_12pt">'.$warning_count.'</span></div>';
$out .= '</div>';
} }
if (isset($unknown_count) && $unknown_count > 0) { if (isset($unknown_count) && $unknown_count > 0) {
$out .= '<div class="bullets_modules">';
$out .= '<div><div id="unknown_count_'.$uniq_id.'" class="forced_title bullet_modules grey_background"></div>'; $out .= '<div><div id="unknown_count_'.$uniq_id.'" class="forced_title bullet_modules grey_background"></div>';
$out .= '<span class="font_12pt">'.$unknown_count.'</span></div>'; $out .= '<span class="font_12pt">'.$unknown_count.'</span></div>';
$out .= '</div>';
} }
if (isset($not_init_count) && $not_init_count > 0) { if (isset($not_init_count) && $not_init_count > 0) {
$out .= '<div class="bullets_modules">';
$out .= '<div><div id="not_init_count_'.$uniq_id.'" class="forced_title bullet_modules blue_background"></div>'; $out .= '<div><div id="not_init_count_'.$uniq_id.'" class="forced_title bullet_modules blue_background"></div>';
$out .= '<span class="font_12pt">'.$not_init_count.'</span></div>'; $out .= '<span class="font_12pt">'.$not_init_count.'</span></div>';
$out .= '</div>';
} }
if (isset($normal_count) && $normal_count > 0) { if (isset($normal_count) && $normal_count > 0) {
$out .= '<div class="bullets_modules">';
$out .= '<div><div id="normal_count_'.$uniq_id.'" class="forced_title bullet_modules green_background"></div>'; $out .= '<div><div id="normal_count_'.$uniq_id.'" class="forced_title bullet_modules green_background"></div>';
$out .= '<span class="font_12pt">'.$normal_count.'</span></div>'; $out .= '<span class="font_12pt">'.$normal_count.'</span></div>';
$out .= '</div>';
} }
$out .= '</div>';
} else { } else {
// Classic ones. // Classic ones.
$out .= '<b><span id="total_count_'.$uniq_id.'" class="forced_title" >'.$total_count.'</span>'; $out .= '<b><span id="total_count_'.$uniq_id.'" class="forced_title" >'.$total_count.'</span>';

View File

@ -507,6 +507,34 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust
case 'evolution': case 'evolution':
reporting_evolution_graph($table, $item); reporting_evolution_graph($table, $item);
break; break;
case 'vuls_severity_graph':
reporting_html_vuls_severity_graph($table, $item);
break;
case 'vuls_attack_complexity':
reporting_html_vuls_attack_complexity($table, $item);
break;
case 'vuls_by_packages':
reporting_html_vuls_by_packages($table, $item);
break;
case 'vuls_by_agent':
reporting_html_vuls_by_agent($table, $item);
break;
case 'vuls_info_agent':
reporting_html_vuls_info_agent($table, $item);
break;
case 'top_n_agents_vuls':
reporting_html_top_n_agents_vuls($table, $item);
break;
case 'top_n_vuls_count':
reporting_html_top_n_vuls_count($table, $item);
break;
} }
if ($item['type'] == 'agent_module') { if ($item['type'] == 'agent_module') {
@ -522,6 +550,300 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust
} }
/**
* Function to print top vulnerabiries more common.
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_top_n_vuls_count($table, $item, $pdf=0)
{
global $config;
$table->width = '99%';
$table->styleTable = 'border: 0px;';
$table->colspan[2][0] = 3;
$table1 = new stdClass();
$table1->headstyle = [];
$table1->width = '99%';
$table1->class = 'info_table';
$table1->titleclass = 'title_table_pdf';
$table1->rowclass[0] = '';
$table1->head[0] = __('Vulnerability');
$table1->head[2] = __('Total');
$row = 2;
foreach ($item['data'] as $key => $vul) {
$table1->data[$row][0] = $vul['cve_id'];
$table1->data[$row][2] = $vul['count'];
$row++;
}
if ($pdf === 1) {
$table1->title = $item['title'];
$table1->titleclass = 'title_table_pdf';
$table1->titlestyle = 'text-align:left;';
}
$table->data[2][0] = html_print_table($table1, true);
if ($pdf === 1) {
return html_print_table($table, true);
}
}
/**
* Function to print top agents with worst score.
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_top_n_agents_vuls($table, $item, $pdf=0)
{
global $config;
$table->width = '99%';
$table->styleTable = 'border: 0px;';
$table->colspan[2][0] = 3;
$table1 = new stdClass();
$table1->headstyle = [];
$table1->width = '99%';
$table1->class = 'info_table';
$table1->titleclass = 'title_table_pdf';
$table1->rowclass[0] = '';
$table1->head[0] = __('Agent');
$table1->head[2] = __('Risk');
$row = 2;
foreach ($item['data'] as $key => $agent) {
$table1->data[$row][0] = $agent['alias'];
$table1->data[$row][2] = $agent['score'];
$row++;
}
if ($pdf === 1) {
$table1->title = $item['title'];
$table1->titleclass = 'title_table_pdf';
$table1->titlestyle = 'text-align:left;';
}
$table->data[2][0] = html_print_table($table1, true);
if ($pdf === 1) {
return html_print_table($table, true);
}
}
/**
* Function to print vulnerabilities of agent.
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_vuls_info_agent($table, $item, $pdf=0)
{
$table->width = '99%';
$table->styleTable = 'border: 0px;';
$table->colspan[2][0] = 3;
$table1 = new stdClass();
$table1->headstyle[0] = 'text-align: left';
$table1->headstyle[1] = 'text-align: left';
$table1->headstyle[2] = 'text-align: left';
$table1->width = '99%';
$table1->class = 'info_table';
$table1->titleclass = 'title_table_pdf';
$table1->rowclass[0] = '';
$table1->head[0] = __('Name');
$table1->head[1] = __('CVE');
$table1->head[2] = __('Version');
$table1->head[3] = __('Score');
$table1->head[4] = __('Detection time');
$table1->head[5] = __('Severity');
$table1->head[6] = __('Version');
$table1->head[7] = __('Attack Vector');
$table1->head[8] = __('Attack Complexity');
$table1->head[9] = __('Privileges Required');
$table1->head[10] = __('User Interaction');
$table1->head[11] = __('Scope');
$table1->head[12] = __('Confidentiality');
$table1->head[13] = __('Integrity');
$table1->head[14] = __('Availability');
$row = 1;
foreach ($item['data'] as $key => $vul) {
$table1->data[$row][0] = (key_exists('name', $vul) === true) ? $vul['name'] : '';
$table1->data[$row][1] = (key_exists('cve', $vul) === true) ? $vul['cve'] : '';
$table1->data[$row][2] = (key_exists('version', $vul) === true) ? $vul['version'] : '';
$table1->data[$row][3] = (key_exists('score', $vul) === true) ? $vul['score'] : '';
$table1->data[$row][4] = (key_exists('detection_time', $vul) === true) ? $vul['detection_time'] : '';
$table1->data[$row][5] = (key_exists('severity', $vul) === true) ? $vul['severity'] : '';
$table1->data[$row][6] = (key_exists('CVSS', $vul) === true) ? $vul['CVSS'] : '';
$table1->data[$row][7] = (key_exists('AV', $vul) === true) ? $vul['AV'] : '';
$table1->data[$row][8] = (key_exists('AC', $vul) === true) ? $vul['AC'] : '';
$table1->data[$row][9] = (key_exists('PR', $vul) === true) ? $vul['PR'] : '';
$table1->data[$row][10] = (key_exists('UI', $vul) === true) ? $vul['UI'] : '';
$table1->data[$row][11] = (key_exists('S', $vul) === true) ? $vul['S'] : '';
$table1->data[$row][12] = (key_exists('C', $vul) === true) ? $vul['C'] : '';
$table1->data[$row][13] = (key_exists('I', $vul) === true) ? $vul['I'] : '';
$table1->data[$row][14] = (key_exists('A', $vul) === true) ? $vul['A'] : '';
$row++;
}
$table->data[2][0] = html_print_table($table1, true);
if ($pdf === 1) {
$table1->title = $item['title'];
$table1->titleclass = 'title_table_pdf';
$table1->titlestyle = 'text-align:left;';
return html_print_table($table1, true);
}
}
/**
* Function to print total vulnerabilities by packages in graph.
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_vuls_by_packages($table, $item, $pdf=0)
{
$table->rowclass[0] = '';
$table->colspan['chart']['cell'] = 3;
$table->cellstyle['chart']['cell'] = 'text-align: center;';
$table->data['chart']['cell'] = $item['chart'];
if ($pdf === 1) {
return html_print_table($table, true);
}
}
/**
* Function to print attack complexity in graph
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_vuls_attack_complexity($table, $item, $pdf=0)
{
$table->rowclass[0] = '';
$table->colspan['chart']['cell'] = 3;
$table->cellstyle['chart']['cell'] = 'text-align: center;';
$table->data['chart']['cell'] = html_print_div(
[
'content' => $item['chart'],
'style' => 'width: 450px; height: 300px; margin: 0 auto;',
],
true
);
if ($pdf === 1) {
return html_print_table($table, true);
}
}
/**
* Function to print the severity vuls in graph.
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_vuls_severity_graph($table, $item, $pdf=0)
{
$table->rowclass[0] = '';
$table->colspan['chart']['cell'] = 3;
$table->cellstyle['chart']['cell'] = 'text-align: center;';
$table->data['chart']['cell'] = $item['chart'];
if ($pdf === 1) {
return html_print_table($table, true);
}
}
/**
* Function to print the all vulnerabilities by agent.
*
* @param object $table Head table or false if it comes from pdf.
* @param array $item Items data.
* @param integer $pdf Flag for return table.
*
* @return mixed
*/
function reporting_html_vuls_by_agent($table, $item, $pdf=0)
{
$table->width = '99%';
$table->styleTable = 'border: 0px;';
$table->colspan[2][0] = 3;
$table1 = new stdClass();
$table1->headstyle[0] = 'text-align: left';
$table1->headstyle[1] = 'text-align: left';
$table1->headstyle[2] = 'text-align: left';
$table1->width = '99%';
$table1->class = 'info_table';
$table1->titleclass = 'title_table_pdf';
$table1->rowclass[0] = '';
$table1->head[0] = __('Agent');
$table1->head[1] = __('OS');
$table1->head[2] = __('OS Version');
$table1->head[3] = __('Group');
$table1->head[4] = __('Ip');
$table1->head[5] = __('Status');
$table1->head[6] = __('SecMon');
$table1->head[7] = __('Hardening');
$table1->head[8] = __('Vulnerability');
$table1->head[9] = __('Last contact');
$table1->head[10] = __('L.S. Change');
$row = 1;
foreach ($item['data'] as $key => $vul) {
$table1->data[$row][0] = $vul['alias'];
$table1->data[$row][2] = $vul['name'];
$table1->data[$row][3] = $vul['os_version'];
$table1->data[$row][4] = $vul['nombre_gr'];
$table1->data[$row][5] = $vul['direccion'];
$table1->data[$row][6] = $vul['status'];
$table1->data[$row][7] = $vul['secmon'];
$table1->data[$row][8] = $vul['hardening'];
$table1->data[$row][9] = $vul['vulnerabilities'];
$table1->data[$row][10] = $vul['ultimo_contacto'];
$table1->data[$row][11] = $vul['last_status_c'];
$row++;
}
if ($pdf === 1) {
$table1->title = $item['title'];
$table1->titleclass = 'title_table_pdf';
$table1->titlestyle = 'text-align:left;';
}
$table->data[2][0] = html_print_table($table1, true);
if ($pdf === 1) {
return html_print_table($table1, true);
}
}
/** /**
* Function to print the security hardening evolution. * Function to print the security hardening evolution.
* *

View File

@ -1003,6 +1003,41 @@ function reports_get_report_types($template=false, $not_editor=false)
'optgroup' => __('Security hardening'), 'optgroup' => __('Security hardening'),
'name' => __('Evolution'), 'name' => __('Evolution'),
]; ];
$types['vuls_severity_graph'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Severity graph bar'),
];
$types['vuls_attack_complexity'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Attack complexity graph donut'),
];
$types['vuls_by_packages'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('By packages in graph pie'),
];
$types['vuls_by_agent'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Detailed security report'),
];
$types['vuls_info_agent'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Vulnerabilities of agent'),
];
$types['top_n_agents_vuls'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N agents with more risk'),
];
$types['top_n_vuls_count'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N common vulnerabilities'),
];
} }
return $types; return $types;

View File

@ -331,9 +331,13 @@
id_group: id_group id_group: id_group
}, },
function(data) { function(data) {
let routeImg =
typeof data.folder === "undefined"
? "images/"
: "images/" + data.folder;
$("img", config.spanPreview).attr( $("img", config.spanPreview).attr(
"src", "src",
"images/" + data["icon"] routeImg + data["icon"]
); );
$("a", config.spanPreview).attr("href", hrefNew); $("a", config.spanPreview).attr("href", hrefNew);
}, },

View File

@ -1653,6 +1653,10 @@ function paint_graph_status(
max_c = 0; max_c = 0;
} }
// Remove Error class.
$("#text-max_warning").removeClass("input_error");
$("#text-max_critical").removeClass("input_error");
//if haven't errors //if haven't errors
if (error_w == 0 && error_c == 0) { if (error_w == 0 && error_c == 0) {
//parse element //parse element
@ -1958,6 +1962,9 @@ function paint_graph_status(
.html(message_error_critical) .html(message_error_critical)
.style("text-anchor", "first"); .style("text-anchor", "first");
} }
if (error_c == 2) {
$("#text-max_critical").addClass("input_error");
}
} }
} }

View File

@ -420,6 +420,20 @@ class TopNWidget extends Widget
// Prevent double safe input in agents_get_group_agents function. // Prevent double safe input in agents_get_group_agents function.
$agentRegex = io_safe_output($agentRegex); $agentRegex = io_safe_output($agentRegex);
// Validate regex.
if (@preg_match('/'.$agentRegex.'/', '') === false
|| @preg_match('/'.$this->values['module'].'/', '') === false
) {
$output .= '<div class="container-center">';
$output .= \ui_print_info_message(
__('Invalid regex'),
'',
true
);
$output .= '</div>';
return $output;
}
// This function check ACL. // This function check ACL.
$agents = @agents_get_group_agents(0, ['aliasRegex' => $agentRegex]); $agents = @agents_get_group_agents(0, ['aliasRegex' => $agentRegex]);
$agentsId = \array_keys($agents); $agentsId = \array_keys($agents);

View File

@ -1120,7 +1120,10 @@ class Manager
} }
$onheader = []; $onheader = [];
$onheader['configure'] = $setup_tab; if (users_is_admin() === true) {
$onheader['configure'] = $setup_tab;
}
$onheader['dashboard'] = $dashboard_tab; $onheader['dashboard'] = $dashboard_tab;
$onheader['list'] = $list_tab; $onheader['list'] = $list_tab;
if ($idIncidence !== 0) { if ($idIncidence !== 0) {

View File

@ -6,6 +6,10 @@ div#bullets_modules span {
font-weight: 700; font-weight: 700;
} }
div.bullets_modules span {
font-weight: 700;
}
div.agent_details_agent_caption { div.agent_details_agent_caption {
flex: 1; flex: 1;
} }

View File

@ -6043,18 +6043,18 @@ div.switch_radio_button label:last-of-type {
margin-top: -2px; margin-top: -2px;
} }
/*
div#bullets_modules {
display: flex;
margin-left: 2em;
}
*/
div#bullets_modules div { div#bullets_modules div {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0 5px; margin: 0 5px;
} }
div.bullets_modules div {
display: flex;
align-items: center;
margin: 0 10px;
}
.orange_background { .orange_background {
background: #ffa631; background: #ffa631;
} }
@ -6225,7 +6225,7 @@ div#status_pie {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
padding: 20px; padding: 20px;
padding-bottom: 0; padding-bottom: 1%;
} }
.agent_details_content_cluster { .agent_details_content_cluster {
@ -6315,6 +6315,7 @@ div#status_pie {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%;
} }
.agent_details_agent_data { .agent_details_agent_data {
@ -6344,23 +6345,45 @@ div#status_pie {
justify-content: flex-start; justify-content: flex-start;
} }
.agent_details_bullets .bullets_modules {
display: flex;
justify-content: flex-start;
}
.agent_details_bullets_cluster #bullets_modules { .agent_details_bullets_cluster #bullets_modules {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
flex-direction: column; flex-direction: column;
} }
.agent_details_bullets_cluster .bullets_modules {
display: flex;
justify-content: flex-start;
flex-direction: column;
}
.agent_details_bullets_cluster #bullets_modules > div { .agent_details_bullets_cluster #bullets_modules > div {
padding: 0px; padding: 0px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.agent_details_bullets_cluster .bullets_modules > div {
padding: 0px;
margin-bottom: 10px;
}
.agent_details_bullets #bullets_modules > div { .agent_details_bullets #bullets_modules > div {
display: flex; display: flex;
align-items: center; align-items: center;
padding-bottom: 20px; padding-bottom: 20px;
} }
.agent_details_bullets .bullets_modules > div {
display: flex;
align-items: center;
padding-bottom: 20px;
}
#agent_contact_main tr td img { #agent_contact_main tr td img {
max-width: 100%; max-width: 100%;
} }
@ -6412,6 +6435,11 @@ div#status_pie {
float: right; float: right;
} }
.white_table_graph_header div.bullets_modules {
display: flex;
float: right;
}
.white_table_graph_header img, .white_table_graph_header img,
.white_table_graph_header span { .white_table_graph_header span {
vertical-align: middle; vertical-align: middle;

View File

@ -1471,6 +1471,10 @@ ul.datatable_filter:has(li > div.action-buttons) {
background-color: #222 !important; background-color: #222 !important;
} }
ul.datatable_filter {
background-color: #222 !important;
}
span.ui-dialog-title { span.ui-dialog-title {
color: #fff !important; color: #fff !important;
} }

View File

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

View File

@ -102,17 +102,37 @@ $agentCountModules = html_print_div(
$table_status = new stdClass(); $table_status = new stdClass();
$table_status->id = 'agent_status_main'; $table_status->id = 'agent_status_main';
$table_status->width = '100%'; $table_status->width = '90%';
$table_status->height = 'auto';
$table_status->cellspacing = 0; $table_status->cellspacing = 0;
$table_status->cellpadding = 0; $table_status->cellpadding = 0;
$table_status->class = 'floating_form'; $table_status->class = 'floating_form';
$table_status->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end; vertical-align: top'; $table_status->style[0] = 'height: 28px; width: 30%; padding-right: 5px; text-align: end; vertical-align: top';
$table_status->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter; vertical-align: top'; $table_status->style[1] = 'height: 28px; width: 70%; padding-left: 5px; font-weight: lighter; vertical-align: top';
$table_status->data['agent_os'][0] = __('OS');
$agentOS = []; $os_agent_text = '';
$agentOS[] = html_print_div([ 'content' => (empty($agent['os_version']) === true) ? get_os_name((int) $agent['id_os']) : $agent['os_version']], true); $os_name = get_os_name((int) $agent['id_os']);
$agentOS[] = html_print_div([ 'style' => 'width: 16px;padding-left: 5px', 'content' => ui_print_os_icon($agent['id_os'], false, true, true, false, false, false, ['width' => '16px'])], true); if (empty($agent['os_version']) !== true) {
$table_status->data['agent_os'][1] = html_print_div(['class' => 'agent_details_agent_data', 'content' => implode('', $agentOS)], true); $agent['os_version'] = io_safe_output($agent['os_version']);
if (strpos($agent['os_version'], '(') !== false) {
$os_name = preg_split('/[0-9]|[\(]/', $agent['os_version'])[0];
$os_version = explode($os_name, explode('(', $agent['os_version'])[0])[1];
$os_version_name = preg_split('/[\(]|[\)]/', $agent['os_version']);
$os_agent_text = $os_version.' ('.$os_version_name[1].')';
} else {
$os_name = preg_split('/[0-9]/', $agent['os_version'])[0];
$os_version = explode($os_name, explode('(', $agent['os_version'])[0])[1];
$os_agent_text = $os_version;
}
}
$table_status->data['agent_os'][0] = html_print_div([ 'style' => 'width: 16px; position: relative; left: 75%', 'content' => ui_print_os_icon($agent['id_os'], false, true, true, false, false, false, ['width' => '16px'])], true);
$table_status->data['agent_os'][1] = $os_name;
if (empty($agent['os_version']) !== true) {
$table_status->data['agent_os_version'][0] = __('OS Version');
$table_status->data['agent_os_version'][1] = $os_agent_text;
}
$addresses = agents_get_addresses($id_agente); $addresses = agents_get_addresses($id_agente);
$address = agents_get_address($id_agente); $address = agents_get_address($id_agente);
@ -124,43 +144,48 @@ foreach ($addresses as $k => $add) {
} }
if (empty($address) === false) { if (empty($address) === false) {
$address_text = '<span class="bolder" >'.$address.'</span>';
if (!empty($addresses) === true) {
foreach ($addresses as $sec_address) {
$address_text .= '<br/><span class="italic">'.$sec_address.'</span>';
}
}
$table_status->data['ip_address'][0] = __('IP address'); $table_status->data['ip_address'][0] = __('IP address');
$table_status->data['ip_address'][1] = (empty($address) === true) ? '<em>'.__('N/A').'</em>' : $address; $table_status->data['ip_address'][1] = (empty($address) === true) ? '<em>'.__('N/A').'</em>' : $address_text;
} }
$table_status->data['agent_version'][0] = __('Agent Version'); $table_status->data['agent_version'][0] = __('Agent Version');
$table_status->data['agent_version'][1] = (empty($agent['agent_version']) === true) ? '<i>'.__('N/A').'</i>' : $agent['agent_version']; $table_status->data['agent_version'][1] = (empty($agent['agent_version']) === true) ? '<i>'.__('N/A').'</i>' : $agent['agent_version'];
$table_status->data['description'][0] = __('Description'); $table_status->data['description'][0] = __('Description');
$table_status->data['description'][1] = (empty($agent['comentarios']) === true) ? '<em>'.__('N/A').'</em>' : $agent['comentarios']; $table_status->data['description'][1] = (empty($agent['comentarios']) === true) ? '<em>'.__('N/A').'</em>' : ui_print_truncate_text($agent['comentarios'], 'description', true);
$has_remote_conf = enterprise_hook( $agentEventsHeader = html_print_div(
'config_agents_has_remote_configuration', [
[$agent['id_agente']] 'class' => 'agent_details_header',
'content' => '<span class="subsection_header_title">'.__('Events (Last 24h)').'</span>',
],
true
); );
if ((bool) $has_remote_conf) { $agentEventsGraph = html_print_div(
$table_status->data['remote_config'][0] = __('Remote configuration'); [
$table_status->data['remote_config'][1] = __('Enabled'); 'class' => 'white-table-graph-content',
'content' => graph_graphic_agentevents(
$satellite_server = (int) db_get_value_filter( $id_agente,
'satellite_server', 95,
'tagente', 50,
['id_agente' => $id_agente] SECONDS_1DAY,
); '',
true,
if (empty($satellite_server) === false) { true,
$satellite_name = db_get_value_filter( 500
'name', ),
'tserver', 'style' => 'margin-top: -25px',
['id_server' => $satellite_server] ],
); true
);
$table_status->data['remote_config'][0] = __('Satellite server');
$table_status->data['remote_config'][1] = $satellite_name;
}
}
$table_agent = $agentStatusHeader.' $table_agent = $agentStatusHeader.'
<div class="agent_details_content"> <div class="agent_details_content">
@ -170,6 +195,9 @@ $table_agent = $agentStatusHeader.'
<div class="agent_details_info"> <div class="agent_details_info">
'.$alive_animation.html_print_table($table_status, true).' '.$alive_animation.html_print_table($table_status, true).'
</div> </div>
</div>
<div class="agent_details_graph">
'.$agentEventsHeader.$agentEventsGraph.'
</div>'; </div>';
@ -189,11 +217,12 @@ $data_opcional->class = 'floating_form';
// Gis and url address. // Gis and url address.
$agentAdditionalContent = ''; $agentAdditionalContent = '';
// Position Information. // Position Information.
if ((bool) $config['activate_gis'] === true) { /*
if ((bool) $config['activate_gis'] === true) {
$dataPositionAgent = gis_get_data_last_position_agent( $dataPositionAgent = gis_get_data_last_position_agent(
$agent['id_agente'] $agent['id_agente']
); );
if (is_array($dataPositionAgent) === true && $dataPositionAgent['stored_longitude'] !== '' && $dataPositionAgent['stored_longitude'] !== '') { if (is_array($dataPositionAgent) === true && $dataPositionAgent['stored_longitude'] !== '' && $dataPositionAgent['stored_latitude'] !== '') {
$data_opcional->data['agent_position'][0] = __('Position (Long, Lat)'); $data_opcional->data['agent_position'][0] = __('Position (Long, Lat)');
$dataOptionalOutput = html_print_anchor( $dataOptionalOutput = html_print_anchor(
@ -210,10 +239,11 @@ if ((bool) $config['activate_gis'] === true) {
$data_opcional->data['agent_position'][1] = $dataOptionalOutput; $data_opcional->data['agent_position'][1] = $dataOptionalOutput;
} }
} }*/
// If the url description is set. // If the url description is set.
if (empty($agent['url_address']) === false) { /*
if (empty($agent['url_address']) === false) {
$data_opcional->data['url_address'][0] = __('Url address'); $data_opcional->data['url_address'][0] = __('Url address');
$data_opcional->data['url_address'][1] = html_print_anchor( $data_opcional->data['url_address'][1] = html_print_anchor(
[ [
@ -222,11 +252,12 @@ if (empty($agent['url_address']) === false) {
], ],
true true
); );
} }*/
// Other IP address and timezone offset. // Other IP address and timezone offset.
if (empty($addresses) === false) { /*
if (empty($addresses) === false) {
$data_opcional->data['other_ip_address'][0] = __('Other IP addresses'); $data_opcional->data['other_ip_address'][0] = __('Other IP addresses');
$data_opcional->data['other_ip_address'][1] = html_print_div( $data_opcional->data['other_ip_address'][1] = html_print_div(
[ [
@ -235,13 +266,14 @@ if (empty($addresses) === false) {
], ],
true true
); );
} }
*/
// Timezone Offset. // Timezone Offset.
if ((int) $agent['timezone_offset'] !== 0) { /*
if ((int) $agent['timezone_offset'] !== 0) {
$data_opcional->data['timezone_offset'][0] = __('Timezone Offset'); $data_opcional->data['timezone_offset'][0] = __('Timezone Offset');
$data_opcional->data['timezone_offset'][1] = $agent['timezone_offset']; $data_opcional->data['timezone_offset'][1] = $agent['timezone_offset'];
} }*/
// Custom fields. // Custom fields.
$fields = db_get_all_rows_filter( $fields = db_get_all_rows_filter(
@ -485,39 +517,6 @@ $agentContact = html_print_div(
true true
); );
$agentEventsHeader = html_print_div(
[
'class' => 'agent_details_header',
'content' => '<span class="subsection_header_title">'.__('Events (Last 24h)').'</span>',
],
true
);
$agentEventsGraph = html_print_div(
[
'class' => 'white-table-graph-content',
'content' => graph_graphic_agentevents(
$id_agente,
95,
70,
SECONDS_1DAY,
'',
true,
true,
500
),
],
true
);
$agentEvents = html_print_div(
[
'class' => 'box-flat agent_details_col w50p',
'content' => $agentEventsHeader.$agentEventsGraph,
],
true
);
/* /*
* EVENTS TABLE END. * EVENTS TABLE END.
*/ */

View File

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

View File

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

View File

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

View File

@ -1167,9 +1167,9 @@ INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`) VALUES (6,'Create&#x20;Pandora&#x20;ITSM&#x20;ticket',16); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`) VALUES (6,'Create&#x20;Pandora&#x20;ITSM&#x20;ticket',16);
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (7, 'Pandora&#x20;Google&#x20;chat', 17, "", "data=_data_", "[PANDORA] Alert FIRED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", "", 0, 0, "", "data=_data_", "[PANDORA] Alert RECOVERED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", ""); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (7, 'Pandora&#x20;Google&#x20;chat', 17, "", "data=_data_", "[PANDORA] Alert FIRED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", "", 0, 0, "", "data=_data_", "[PANDORA] Alert RECOVERED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", "");
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (8, 'Pandora&#x20;Slack', 18, "data=_data_", "", ":red_circle:", "[PANDORA] Alert FIRED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", 0, 0, "data=_data_", "", ":green_circle:", "[PANDORA] Alert RECOVERED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", ""); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (8, 'Pandora&#x20;Slack', 18, "data=_data_", "", ":red_circle:", "[PANDORA] Alert FIRED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", 0, 0, "data=_data_", "", ":green_circle:", "[PANDORA] Alert RECOVERED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "");
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (9, 'Pandora&#x20;Telegram', 19, "", "[PANDORA] Alert FIRED on _agent_ / _module_ / _tiemstamp_ / _data_", "", "", "", "", "", "", "", "", 0, 0, "", "[PANDORA] Alert RECOVERED on _agent_ / _module_ / _tiemstamp_ / _data_", "", "", "", "", "", "", "", ""); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (9, 'Pandora&#x20;Telegram', 19, "", "[PANDORA] Alert FIRED on _agent_ / _module_ / _timestamp_ / _data_", "", "", "", "", "", "", "", "", 0, 0, "", "[PANDORA] Alert RECOVERED on _agent_ / _module_ / _timestamp_ / _data_", "", "", "", "", "", "", "", "");
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (10, 'Pandora&#x20;ilert', 20, "alert", "", "[PANDORA] Alert FIRED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", "", 0, 0, "resolved", "", "[PANDORA] Alert RECOVERED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", ""); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (10, 'Pandora&#x20;ilert', 20, "alert", "", "[PANDORA] Alert FIRED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", "", 0, 0, "resolved", "", "[PANDORA] Alert RECOVERED on _agent_ / _module_", "_agent_ | _module_ | _data_ | _timestamp_", "", "", "", "", "", "");
INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (11, 'Pandora&#x20;Vonage', 21, "", "[PANDORA] Alert FIRED on _agent_ / _module_ / _tiemstamp_ / _data_", "", "", "", "", "", "", "", "", 0, 0, "", "[PANDORA] Alert RECOVERED on _agent_ / _module_ / _tiemstamp_ / _data_", "", "", "", "", "", "", "", ""); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (11, 'Pandora&#x20;Vonage', 21, "", "[PANDORA] Alert FIRED on _agent_ / _module_ / _timestamp_ / _data_", "", "", "", "", "", "", "", "", 0, 0, "", "[PANDORA] Alert RECOVERED on _agent_ / _module_ / _timestamp_ / _data_", "", "", "", "", "", "", "", "");
-- alert templates (default) -- alert templates (default)
@ -1194,7 +1194,7 @@ INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALU
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (2, 'Discovery.Cloud', 'Discovery&#x20;Cloud&#x20;script&#x20;to&#x20;monitor&#x20;Cloud&#x20;technologies&#x20;&#40;AWS.EC2,&#x20;AWS.S3,&#x20;AWS.RDS,&#x20RDS,&#x20AWS.EKS&#41;', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (2, 'Discovery.Cloud', 'Discovery&#x20;Cloud&#x20;script&#x20;to&#x20;monitor&#x20;Cloud&#x20;technologies&#x20;&#40;AWS.EC2,&#x20;AWS.S3,&#x20;AWS.RDS,&#x20RDS,&#x20AWS.EKS&#41;', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}');
-- IPAM is 3. -- IPAM is 3.
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (4, 'IPMI&#x20;Recon','Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (4, 'IPMI&#x20;Recon','Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@pandorafms.com&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}');
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (3, 'IPAM Recon', 'This script is used to automatically detect network hosts availability and name, used as Recon Custom Script in the recon task. Parameters used are:\n\n* custom_field1 = network. i.e.: 192.168.100.0/24\n* custom_field2 = associated IPAM network id. i.e.: 4. Please do not change this value, it is assigned automatically in IPAM management.\n\nSee documentation for more information.', '/usr/share/pandora_server/util/recon_scripts/IPAMrecon.pl', '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.:&#x20;192.168.100.0/24","value":"","hide":""}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (3, 'IPAM Recon', 'This script is used to automatically detect network hosts availability and name, used as Recon Custom Script in the recon task. Parameters used are:\n\n* custom_field1 = network. i.e.: 192.168.100.0/24\n* custom_field2 = associated IPAM network id. i.e.: 4. Please do not change this value, it is assigned automatically in IPAM management.\n\nSee documentation for more information.', '/usr/share/pandora_server/util/recon_scripts/IPAMrecon.pl', '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.:&#x20;192.168.100.0/24","value":"","hide":""}}');
@ -1214,7 +1214,7 @@ INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `max_retries`
INSERT INTO `tagent_custom_fields` VALUES (1,'Serial&#x20;Number',0,0,'',0),(2,'Department',0,0,'',0),(3,'Additional&#x20;ID',0,0,'',0),(4,'eHorusID',0,0,'',0); INSERT INTO `tagent_custom_fields` VALUES (1,'Serial&#x20;Number',0,0,'',0),(2,'Department',0,0,'',0),(3,'Additional&#x20;ID',0,0,'',0),(4,'eHorusID',0,0,'',0);
INSERT INTO `ttag` VALUES (1,'network','Network&#x20;equipment','http://artica.es','','',''),(2,'critical','Critical&#x20;modules','','','',''),(3,'dmz','DMZ&#x20;Network&#x20;Zone','','','',''),(4,'performance','Performance&#x20;anda&#x20;capacity&#x20;modules','','','',''),(5,'configuration','','','','',''); INSERT INTO `ttag` VALUES (1,'network','Network&#x20;equipment','http://pandorafms.com','','',''),(2,'critical','Critical&#x20;modules','','','',''),(3,'dmz','DMZ&#x20;Network&#x20;Zone','','','',''),(4,'performance','Performance&#x20;anda&#x20;capacity&#x20;modules','','','',''),(5,'configuration','','','','','');
INSERT INTO `tevent_response` VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x20;the&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_agent_address_','command',0,620,500,0,'',0,90,0),(3,'Create&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;the&#x20;standard&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS','index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,0),(5,'Restart&#x20;agent','Restart&#x20;the&#x20;agent&#x20;with&#x20;using&#x20;UDP&#x20;protocol.&#x0d;&#x0a;&#x0d;&#x0a;To&#x20;use&#x20;this&#x20;response&#x20;is&#x20;necessary&#x20;to&#x20;have&#x20;installed&#x20;Pandora&#x20;FMS&#x20;server&#x20;and&#x20;console&#x20;in&#x20;the&#x20;same&#x20;machine.','/usr/share/pandora_server/util/udp_client.pl&#x20;_agent_address_&#x20;41122&#x20;&quot;REFRESH&#x20;AGENT&quot;','command',0,620,500,0,'',0,90,0),(6,'Ping&#x20;to&#x20;module&#x20;agent&#x20;host','Ping&#x20;to&#x20;the&#x20;module&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_module_address_','command',0,620,500,0,'',0,90,0),(7,'Create&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;event','Create&#x20;a&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;an&#x20;event','index.php?sec=manageTickets&amp;sec2=operation/ITSM/itsm&amp;operation=edit&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,1); INSERT INTO `tevent_response` VALUES (1,'Ping&#x20;to&#x20;host','Ping&#x20;to&#x20;the&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_agent_address_','command',0,620,500,0,'',0,90,0),(3,'Create&#x20;incident&#x20;from&#x20;event','Create&#x20;a&#x20;incident&#x20;from&#x20;the&#x20;event&#x20;with&#x20;the&#x20;standard&#x20;incidents&#x20;system&#x20;of&#x20;Pandora&#x20;FMS','index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;insert_form&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,0),(5,'Restart&#x20;agent','Restart&#x20;the&#x20;agent&#x20;with&#x20;using&#x20;UDP&#x20;protocol.&#x0d;&#x0a;&#x0d;&#x0a;To&#x20;use&#x20;this&#x20;response&#x20;is&#x20;necessary&#x20;to&#x20;have&#x20;installed&#x20;Pandora&#x20;FMS&#x20;server&#x20;and&#x20;console&#x20;in&#x20;the&#x20;same&#x20;machine.','/usr/share/pandora_server/util/udp_client.pl&#x20;_agent_address_&#x20;41122&#x20;&quot;REFRESH&#x20;AGENT&quot;','command',0,620,500,0,'',0,90,0),(6,'Ping&#x20;to&#x20;module&#x20;agent&#x20;host','Ping&#x20;to&#x20;the&#x20;module&#x20;agent&#x20;host','ping&#x20;-c&#x20;5&#x20;_module_address_','command',0,620,500,0,'',0,90,0),(7,'Create&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;event','Create&#x20;a&#x20;ticket&#x20;in&#x20;Pandora&#x20;ITSM&#x20;from&#x20;an&#x20;event','index.php?sec=manageTickets&amp;sec2=operation/ITSM/itsm&amp;operation=edit&amp;from_event=_event_id_','url',0,0,0,1,'',0,90,1);
@ -2775,7 +2775,7 @@ SET @short_name = 'pandorafms.oracle';
SET @name = 'Oracle'; SET @name = 'Oracle';
SET @section = 'app'; SET @section = 'app';
SET @description = 'Monitor&#x20;Oracle&#x20;databases'; SET @description = 'Monitor&#x20;Oracle&#x20;databases';
SET @version = '1.0'; SET @version = '1.1';
INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version);
SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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