Resuelto. Merge branch 'develop' into 'ent-8892-Widget-TopN-sale-mal'

# Conflicts:
#   pandora_console/include/lib/Dashboard/Widgets/top_n.php
This commit is contained in:
José González 2022-05-12 08:20:50 +00:00
commit 200fdf9d9f
40 changed files with 182 additions and 156 deletions

View File

@ -166,9 +166,8 @@ if [ "$(grep -Ei 'Red Hat Enterprise' /etc/redhat-release)" ]; then
## In case REDHAT ## In case REDHAT
# Check susbscription manager status: # Check susbscription manager status:
echo -en "${cyan}Checking Red Hat Enterprise subscription... ${reset}" echo -en "${cyan}Checking Red Hat Enterprise subscription... ${reset}"
subscription-manager status &>> "$LOGFILE"
subscription-manager list &>> "$LOGFILE" subscription-manager list &>> "$LOGFILE"
subscription-manager list | grep 'Status:' | grep Subscribed &>> "$LOGFILE" subscription-manager status &>> "$LOGFILE"
check_cmd_status 'Error checking subscription status, make sure your server is activated and suscribed to Red Hat Enterprise repositories' check_cmd_status 'Error checking subscription status, make sure your server is activated and suscribed to Red Hat Enterprise repositories'
# Ckeck repolist # Ckeck repolist

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.761-220429 Version: 7.0NG.761-220512
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.761-220429" pandora_version="7.0NG.761-220512"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.761 %define version 7.0NG.761
%define release 220429 %define release 220512
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.761" PI_VERSION="7.0NG.761"
PI_BUILD="220429" PI_BUILD="220512"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{220429} {220512}
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.761 Build 220429") #define PANDORA_VERSION ("7.0NG.761 Build 220512")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.761(Build 220429))" VALUE "ProductVersion", "(7.0NG.761(Build 220512))"
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.761-220429 Version: 7.0NG.761-220512
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.761-220429" pandora_version="7.0NG.761-220512"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -278,11 +278,11 @@ foreach ($sessions as $session) {
true true
).human_time_comparation($session['utimestamp'], 'tiny'); ).human_time_comparation($session['utimestamp'], 'tiny');
$data[3] = $session_ip_origen; $data[3] = $session_ip_origen;
$description = str_replace([',', ', '], ', ', $session['descripcion']); $description = io_safe_output(str_replace([',', ', '], ', ', $session['descripcion']));
if (strlen($description) > 100) { if (strlen($description) > 100) {
$data[4] = '<div >'.io_safe_output(substr($description, 0, 150).'...').'</div>'; $data[4] = '<div >'.io_safe_input(substr($description, 0, 150)).'...</div>';
} else { } else {
$data[4] = '<div >'.io_safe_output($description).'</div>'; $data[4] = '<div >'.io_safe_input($description).'</div>';
} }
array_push($table->data, $data); array_push($table->data, $data);

View File

@ -1156,7 +1156,7 @@ if (check_acl($config['id_user'], 0, 'PM')) {
); );
$table_advanced->colspan[16][1] = 6; $table_advanced->colspan[16][1] = 6;
} else { } else {
// Store in a hidden field if is not visible to avoid delete the value // Store in a hidden field if is not visible to avoid delete the value.
$table_advanced->data[15][4] .= html_print_input_hidden('id_category', $id_category, true); $table_advanced->data[15][4] .= html_print_input_hidden('id_category', $id_category, true);
} }
@ -1193,7 +1193,7 @@ if (!$in_policy) {
} }
// Advanced form part // Advanced form part.
$table_macros = new stdClass(); $table_macros = new stdClass();
$table_macros->id = 'module_macros'; $table_macros->id = 'module_macros';
$table_macros->width = '100%'; $table_macros->width = '100%';
@ -1398,7 +1398,7 @@ ui_require_jquery_file('json');
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
$(document).ready (function () { $(document).ready (function () {
var disabledBecauseInPolicy = <?php echo '\''.(empty($disabledBecauseInPolicy) === true ? '0' : '1').'\''; ?>; var disabledBecauseInPolicy = <?php echo '\''.((empty($disabledBecauseInPolicy) === true) ? '0' : '1').'\''; ?>;
$("#right").click (function () { $("#right").click (function () {
jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) { jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) {
tag_name = $(value).html(); tag_name = $(value).html();
@ -1407,12 +1407,16 @@ $(document).ready (function () {
$("#id_tag_available").find("option[value='" + tag_name + "']").remove(); $("#id_tag_available").find("option[value='" + tag_name + "']").remove();
$("#id_tag_selected").find("option[value='']").remove(); $("#id_tag_selected").find("option[value='']").remove();
if($("#id_tag_available option").length == 0) { if($("#id_tag_available option").length == 0) {
$("select[name='id_tag_available[]']").append(value); $("select[name='id_tag_available[]']").append(
$("<option></option>").val('').html(
'<i><?php echo __('None'); ?></i>'
)
);
} }
} }
}); });
}); });
$("#left").click (function () { $("#left").click (function () {
jQuery.each($("select[name='id_tag_selected[]'] option:selected"), function (key, value) { jQuery.each($("select[name='id_tag_selected[]'] option:selected"), function (key, value) {
tag_name = $(value).html(); tag_name = $(value).html();
@ -1422,7 +1426,11 @@ $(document).ready (function () {
$("#id_tag_selected").find("option[value='" + id_tag + "']").remove(); $("#id_tag_selected").find("option[value='" + id_tag + "']").remove();
$("#id_tag_available").find("option[value='']").remove(); $("#id_tag_available").find("option[value='']").remove();
if($("#id_tag_selected option").length == 0) { if($("#id_tag_selected option").length == 0) {
$("select[name='id_tag_selected[]']").append(value); $("select[name='id_tag_selected[]']").append(
$("<option></option>").val('').html(
'<i><?php echo __('None'); ?></i>'
)
);
} }
} }
}); });

View File

@ -63,7 +63,7 @@ if (empty($directory) === true) {
$real_directory = realpath($config['homedir'].'/'.$directory); $real_directory = realpath($config['homedir'].'/'.$directory);
echo '<h4>'.__('Index of %s', $directory).'</h4>'; echo '<h4>'.__('Index of %s', io_safe_input($directory)).'</h4>';
$upload_file = (bool) get_parameter('upload_file'); $upload_file = (bool) get_parameter('upload_file');
$create_text_file = (bool) get_parameter('create_text_file'); $create_text_file = (bool) get_parameter('create_text_file');

View File

@ -329,7 +329,7 @@ class AgentWizard extends HTML
} }
} }
if (count($this->datalist) === 1 && $this->targetIp === '') { if (empty($this->datalist) === false && count($this->datalist) === 1 && $this->targetIp === '') {
$this->targetIp = $this->datalist[0]; $this->targetIp = $this->datalist[0];
} }
} }

View File

@ -811,7 +811,7 @@ class Tree
} }
} }
// Counters // Counters.
if (empty($agent['counters'])) { if (empty($agent['counters'])) {
$agent['counters'] = []; $agent['counters'] = [];
@ -824,7 +824,7 @@ class Tree
$agent['counters']['alerts'] = isset($agent['fired_count']) ? $agent['fired_count'] : 0; $agent['counters']['alerts'] = isset($agent['fired_count']) ? $agent['fired_count'] : 0;
} }
// Status image // Status image.
$agent['statusImageHTML'] = agents_tree_view_status_img_ball( $agent['statusImageHTML'] = agents_tree_view_status_img_ball(
$agent['counters']['critical'], $agent['counters']['critical'],
$agent['counters']['warning'], $agent['counters']['warning'],
@ -834,7 +834,14 @@ class Tree
$agent['counters']['alerts'] $agent['counters']['alerts']
); );
// search module recalculate counters $agent['agentStatus'] = -1;
if ((bool) $this->filter['show_not_init_agents'] === true) {
if ($agent['total_count'] === 0 || $agent['total_count'] === $agent['notinit_count']) {
$agent['agentStatus'] = AGENT_STATUS_NOT_INIT;
}
}
// Search module recalculate counters.
if (array_key_exists('state_normal', $agent)) { if (array_key_exists('state_normal', $agent)) {
$agent['counters']['unknown'] = $agent['state_unknown']; $agent['counters']['unknown'] = $agent['state_unknown'];
$agent['counters']['critical'] = $agent['state_critical']; $agent['counters']['critical'] = $agent['state_critical'];
@ -935,7 +942,8 @@ class Tree
foreach ($agents as $iterator => $agent) { foreach ($agents as $iterator => $agent) {
$this->processAgent($agents[$iterator], $server); $this->processAgent($agents[$iterator], $server);
if ($agents[$iterator]['counters']['total'] !== '0' if ($agents[$iterator]['counters']['total'] !== '0'
|| (bool) $this->filter['show_not_init_agents'] === true || ((bool) $this->filter['show_not_init_agents'] === true
&& $agents[$iterator]['agentStatus'] === AGENT_STATUS_NOT_INIT)
) { ) {
$agents_aux[] = $agents[$iterator]; $agents_aux[] = $agents[$iterator];
} }

View File

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

View File

@ -3236,8 +3236,8 @@ function agents_get_network_interfaces($agents=false, $agents_filter=false)
$ni_by_agents = []; $ni_by_agents = [];
foreach ($agents as $agent) { foreach ($agents as $agent) {
$agent_id = (isset($agent['id_agente'])) ? $agent['id_agente'] : $agent; $agent_id = (isset($agent['id_agente'])) ? $agent['id_agente'] : $agent;
$agent_group_id = (isset($agent['id_grupo']) === true) ? $agent['id_grupo'] : ''; $agent_group_id = (isset($agent['id_grupo']) === true) ? $agent['id_grupo'] : agents_get_agent_group($agent_id);
$agent_name = (isset($agent['alias']) === true) ? $agent['alias'] : ''; $agent_name = (isset($agent['alias']) === true) ? $agent['alias'] : agents_get_alias($agent_id);
$agent_interfaces = []; $agent_interfaces = [];
$accepted_module_types = []; $accepted_module_types = [];

View File

@ -757,7 +757,7 @@ function events_get_all(
if (is_array($fields) === false && $fields === 'count' if (is_array($fields) === false && $fields === 'count'
|| (is_array($fields) === true && $fields[0] === 'count') || (is_array($fields) === true && $fields[0] === 'count')
) { ) {
$fields = ['te.id_evento']; $fields = ['te.*'];
$count = true; $count = true;
} else if (!is_array($fields)) { } else if (!is_array($fields)) {
error_log('[events_get_all] Fields must be an array or "count".'); error_log('[events_get_all] Fields must be an array or "count".');

View File

@ -670,16 +670,16 @@ function filemanager_file_explorer(
} }
if ($fileinfo['is_dir']) { if ($fileinfo['is_dir']) {
$data[1] = '<a href="'.$url.'&directory='.$relative_directory.'/'.$fileinfo['name'].'&hash2='.md5($relative_directory.'/'.$fileinfo['name'].$config['server_unique_identifier']).'">'.$fileinfo['name'].'</a>'; $data[1] = '<a href="'.$url.'&directory='.$relative_directory.'/'.io_safe_input($fileinfo['name']).'&hash2='.md5($relative_directory.'/'.$fileinfo['name'].$config['server_unique_identifier']).'">'.io_safe_input($fileinfo['name']).'</a>';
} else if (empty($url_file) === false) { } else if (empty($url_file) === false) {
// Set the custom url file. // Set the custom url file.
$url_file_clean = str_replace('[FILE_FULLPATH]', $fileinfo['realpath'], $url_file); $url_file_clean = str_replace('[FILE_FULLPATH]', $fileinfo['realpath'], $url_file);
$data[1] = '<a href="'.$url_file_clean.'">'.$fileinfo['name'].'</a>'; $data[1] = '<a href="'.$url_file_clean.'">'.io_safe_input($fileinfo['name']).'</a>';
} else { } else {
$filename = base64_encode($relative_directory.'/'.$fileinfo['name']); $filename = base64_encode($relative_directory.'/'.$fileinfo['name']);
$hash = md5($filename.$config['server_unique_identifier']); $hash = md5($filename.$config['server_unique_identifier']);
$data[1] = '<a href="'.$hack_metaconsole.'include/get_file.php?file='.urlencode($filename).'&hash='.$hash.'">'.$fileinfo['name'].'</a>'; $data[1] = '<a href="'.$hack_metaconsole.'include/get_file.php?file='.urlencode($filename).'&hash='.$hash.'">'.io_safe_input($fileinfo['name']).'</a>';
} }
// Notice that uploaded php files could be dangerous. // Notice that uploaded php files could be dangerous.

View File

@ -507,7 +507,7 @@ class TopNWidget extends Widget
1, 1,
$config['homeurl'], $config['homeurl'],
'white', 'white',
'black', '#DFDFDF',
$valueMin, $valueMin,
$valueMax $valueMax
); );

View File

@ -759,6 +759,9 @@ select:-internal-list-box {
.flex { .flex {
display: flex; display: flex;
} }
.padding-0 {
padding: 0 !important;
}
.padding-2 { .padding-2 {
padding: 2em; padding: 2em;
} }

View File

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

View File

@ -552,14 +552,18 @@ function print_table(
$all_interfaces = []; $all_interfaces = [];
foreach ($data as $value) { foreach ($data as $key => $value) {
$agent_alias = agents_get_alias($value['name']); if (empty($value['name']) === false) {
$agent_alias = $value['name'];
} else {
$agent_alias = agents_get_alias($key);
}
foreach ($value['interfaces'] as $if_name => $interface) { foreach ($value['interfaces'] as $if_name => $interface) {
$interface['agent_id'] = $value['name']; $interface['agent_id'] = $key;
$interface['agent_alias'] = $agent_alias; $interface['agent_alias'] = $agent_alias;
$interface['if_name'] = $if_name; $interface['if_name'] = $if_name;
$all_interfaces[$if_name] = $interface; $all_interfaces[$key][$if_name] = $interface;
} }
} }
@ -569,117 +573,121 @@ function print_table(
) { ) {
$filtered_interfaces = $all_interfaces; $filtered_interfaces = $all_interfaces;
} else { } else {
// Filter interfaces array. foreach ($all_interfaces as $key => $value) {
$filtered_interfaces = array_filter( // Filter interfaces array.
$all_interfaces, $filtered_interfaces[$key] = array_filter(
function ($interface) use ($selected_interfaces) { $value,
return in_array( function ($interface) use ($selected_interfaces) {
$interface['status_module_id'], return in_array(
$selected_interfaces $interface['status_module_id'],
) === true; $selected_interfaces
} );
); }
);
}
} }
$data = []; $data = [];
foreach ($filtered_interfaces as $if_name => $agent_interfaces) { foreach ($filtered_interfaces as $interfaces) {
// Get usage modules. foreach ($interfaces as $if_name => $agent_interfaces) {
$usage_module_in = db_get_row( // Get usage modules.
'tagente_modulo', $usage_module_in = db_get_row(
'nombre', 'tagente_modulo',
$if_name.'_inUsage' 'nombre',
); $if_name.'_inUsage'
$usage_module_out = db_get_row( );
'tagente_modulo', $usage_module_out = db_get_row(
'nombre', 'tagente_modulo',
$if_name.'_outUsage' 'nombre',
); $if_name.'_outUsage'
);
$usage_module_id_in = $usage_module_in['id_agente_modulo']; $usage_module_id_in = $usage_module_in['id_agente_modulo'];
$usage_module_id_out = $usage_module_out['id_agente_modulo']; $usage_module_id_out = $usage_module_out['id_agente_modulo'];
$usage_module_description = $usage_module_in['descripcion']; $usage_module_description = $usage_module_in['descripcion'];
// Get usage modules data. // Get usage modules data.
$usage_module_data_in = modules_get_previous_data( $usage_module_data_in = modules_get_previous_data(
$usage_module_id_in, $usage_module_id_in,
time() time()
); );
$usage_module_data_out = modules_get_previous_data( $usage_module_data_out = modules_get_previous_data(
$usage_module_id_out, $usage_module_id_out,
time() time()
); );
// Extract ifSpeed from description of usage module. // Extract ifSpeed from description of usage module.
$if_speed_str = strstr($usage_module_description, 'Speed:'); $if_speed_str = strstr($usage_module_description, 'Speed:');
$if_speed_str = substr($if_speed_str, 0, -1); $if_speed_str = substr($if_speed_str, 0, -1);
$if_speed_str = explode(':', $if_speed_str)[1]; $if_speed_str = explode(':', $if_speed_str)[1];
$matches = []; $matches = [];
preg_match_all('/\d+/', $if_speed_str, $matches); preg_match_all('/\d+/', $if_speed_str, $matches);
$if_speed_value = $matches[0][0]; $if_speed_value = $matches[0][0];
// Transform ifSpeed unit. // Transform ifSpeed unit.
$divisor = 1000; $divisor = 1000;
$counter = 0; $counter = 0;
while ($if_speed_value >= $divisor) { while ($if_speed_value >= $divisor) {
if ($if_speed_value >= $divisor) { if ($if_speed_value >= $divisor) {
$if_speed_value = ($if_speed_value / $divisor); $if_speed_value = ($if_speed_value / $divisor);
}
$counter++;
} }
$counter++; $if_speed_unit = 'bps';
switch ($counter) {
case 1:
$if_speed_unit = 'Kbps';
break;
case 2:
$if_speed_unit = 'Mbps';
break;
case 3:
$if_speed_unit = 'Gbps';
break;
case 4:
$if_speed_unit = 'Tbps';
break;
default:
$if_speed_unit = 'bps';
break;
}
// Get in and out traffic.
$ifInOctets = modules_get_previous_data(
$agent_interfaces['traffic']['in'],
time()
);
$ifOutOctets = modules_get_previous_data(
$agent_interfaces['traffic']['out'],
time()
);
if ($sec === 'view') {
$table_data[$loop_index]['if_agent_name'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$agent_interfaces['agent_id'].'">'.$agent_interfaces['agent_alias'].'</a>';
}
$table_data[$loop_index]['if_name'] = $agent_interfaces['if_name'];
$table_data[$loop_index]['if_status_image'] = $agent_interfaces['status_image'];
$table_data[$loop_index]['if_speed_data'] = ($if_speed_value === null) ? __('N/A') : $if_speed_value.' '.$if_speed_unit;
$table_data[$loop_index]['if_in_octets'] = ($ifInOctets['datos'] === null) ? __('N/A') : $ifInOctets['datos'];
$table_data[$loop_index]['if_out_octets'] = ($ifOutOctets['datos'] === null) ? __('N/A') : $ifOutOctets['datos'];
$table_data[$loop_index]['if_usage_module_data_in'] = ($usage_module_data_in['datos'] === null) ? __('N/A') : $usage_module_data_in['datos'];
$table_data[$loop_index]['if_usage_module_data_out'] = ($usage_module_data_out['datos'] === null) ? __('N/A') : $usage_module_data_out['datos'];
$table_data[$loop_index]['if_last_data'] = human_time_comparation($agent_interfaces['last_contact']);
$loop_index++;
} }
$if_speed_unit = 'bps';
switch ($counter) {
case 1:
$if_speed_unit = 'Kbps';
break;
case 2:
$if_speed_unit = 'Mbps';
break;
case 3:
$if_speed_unit = 'Gbps';
break;
case 4:
$if_speed_unit = 'Tbps';
break;
default:
$if_speed_unit = 'bps';
break;
}
// Get in and out traffic.
$ifInOctets = modules_get_previous_data(
$agent_interfaces['traffic']['in'],
time()
);
$ifOutOctets = modules_get_previous_data(
$agent_interfaces['traffic']['out'],
time()
);
if ($sec === 'view') {
$table_data[$loop_index]['if_agent_name'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$agent_interfaces['agent_id'].'">'.$agent_interfaces['agent_alias'].'</a>';
}
$table_data[$loop_index]['if_name'] = $agent_interfaces['if_name'];
$table_data[$loop_index]['if_status_image'] = $agent_interfaces['status_image'];
$table_data[$loop_index]['if_speed_data'] = ($if_speed_value === null) ? __('N/A') : $if_speed_value.' '.$if_speed_unit;
$table_data[$loop_index]['if_in_octets'] = ($ifInOctets['datos'] === null) ? __('N/A') : $ifInOctets['datos'];
$table_data[$loop_index]['if_out_octets'] = ($ifOutOctets['datos'] === null) ? __('N/A') : $ifOutOctets['datos'];
$table_data[$loop_index]['if_usage_module_data_in'] = ($usage_module_data_in['datos'] === null) ? __('N/A') : $usage_module_data_in['datos'];
$table_data[$loop_index]['if_usage_module_data_out'] = ($usage_module_data_out['datos'] === null) ? __('N/A') : $usage_module_data_out['datos'];
$table_data[$loop_index]['if_last_data'] = human_time_comparation($agent_interfaces['last_contact']);
$loop_index++;
} }
// Sort array of previously processed table values. // Sort array of previously processed table values.

View File

@ -241,10 +241,10 @@ if ($is_admin) {
} }
$out = '<table cellpadding=0 cellspacing=0 class="databox pies mrgn_top_15px" width=100%><tr><td>'; $out = '<table cellpadding=0 cellspacing=0 class="databox pies mrgn_top_15px" width=100%><tr><td>';
$out .= '<fieldset class="databox tactical_set" id="total_event_graph"> $out .= '<fieldset class="padding-0 databox tactical_set" id="total_event_graph">
<legend>'.__('Event graph').'</legend>'.html_print_image('images/spinner.gif', true, ['id' => 'spinner_total_event_graph']).'</fieldset>'; <legend>'.__('Event graph').'</legend>'.html_print_image('images/spinner.gif', true, ['id' => 'spinner_total_event_graph']).'</fieldset>';
$out .= '</td><td>'; $out .= '</td><td>';
$out .= '<fieldset class="databox tactical_set" id="graphic_event_group"> $out .= '<fieldset class="padding-0 databox tactical_set" id="graphic_event_group">
<legend>'.__('Event graph by agent').'</legend>'.html_print_image('images/spinner.gif', true, ['id' => 'spinner_graphic_event_group']).'</fieldset>'; <legend>'.__('Event graph by agent').'</legend>'.html_print_image('images/spinner.gif', true, ['id' => 'spinner_graphic_event_group']).'</fieldset>';
$out .= '</td></tr></table>'; $out .= '</td></tr></table>';

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.761 %define version 7.0NG.761
%define release 220429 %define release 220512
# 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.761 %define version 7.0NG.761
%define release 220429 %define release 220512
# 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.761 %define version 7.0NG.761
%define release 220429 %define release 220512
%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

@ -83,7 +83,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('netflow_daemon', '/usr/bin/nfcapd'), ('netflow_daemon', '/usr/bin/nfcapd'),
('netflow_nfdump', '/usr/bin/nfdump'), ('netflow_nfdump', '/usr/bin/nfdump'),
('netflow_max_resolution', '50'), ('netflow_max_resolution', '50'),
('event_fields', 'mini_severity,evento,id_agente,estado,timestamp'), ('event_fields', 'mini_severity,evento,estado,agent_name,timestamp'),
('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,last_status_change,graph,warn,data,timestamp'), ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,last_status_change,graph,warn,data,timestamp'),
('list_ACL_IPs_for_API', '127.0.0.1'), ('list_ACL_IPs_for_API', '127.0.0.1'),
('enable_pass_policy', 0), ('enable_pass_policy', 0),

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.761-220429 Version: 7.0NG.761-220512
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.761-220429" pandora_version="7.0NG.761-220512"
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.761"; my $pandora_version = "7.0NG.761";
my $pandora_build = "220429"; my $pandora_build = "220512";
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.761"; my $pandora_version = "7.0NG.761";
my $pandora_build = "220429"; my $pandora_build = "220512";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.761 Build 220429"; my $version = "7.0NG.761 Build 220512";
# 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.761 Build 220429"; my $version = "7.0NG.761 Build 220512";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);

View File

@ -12,7 +12,7 @@ RUN { \
RUN dnf install -y vim wget bzip2 curl && \ RUN dnf install -y vim wget bzip2 curl && \
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
dnf install -y yum-utils && \ dnf install -y yum-utils && \
dnf install -y https://dev.mysql.com/get/mysql80-community-release-el8-2.noarch.rpm && \ dnf install -y https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm && \
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm && \ dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm && \
dnf config-manager --set-enabled powertools && \ dnf config-manager --set-enabled powertools && \
dnf module reset -y php && \ dnf module reset -y php && \
@ -30,6 +30,7 @@ RUN dnf install -y vim wget bzip2 curl && \
pip3 install unittest2 && \ pip3 install unittest2 && \
pip3 install testtools && \ pip3 install testtools && \
dnf install -y git \ dnf install -y git \
git-lfs \
passwd \ passwd \
openssh-server \ openssh-server \
httpd \ httpd \
@ -90,6 +91,7 @@ RUN dnf install -y vim wget bzip2 curl && \
fontconfig-devel \ fontconfig-devel \
libstdc++ \ libstdc++ \
gettext \ gettext \
wmic \
cpanminus && \ cpanminus && \
cpanm Geo::IP && \ cpanm Geo::IP && \
mkdir -p /opt/phantomjs/bin && cd /opt/phantomjs/bin && \ mkdir -p /opt/phantomjs/bin && cd /opt/phantomjs/bin && \
@ -102,8 +104,6 @@ RUN dnf install -y vim wget bzip2 curl && \
setcap -r /usr/libexec/mysqld && \ setcap -r /usr/libexec/mysqld && \
yum clean all yum clean all
ADD wmic /usr/bin/
# Install debugg dependencies. # Install debugg dependencies.
RUN dnf install -y \ RUN dnf install -y \
initscripts \ initscripts \