Fix merge

This commit is contained in:
Jose Gonzalez 2022-01-05 11:14:04 +01:00
commit 1e92ad99ad
62 changed files with 267 additions and 257 deletions

View File

@ -1,14 +1,14 @@
#docker build -t pandorafms/pandorafms-open-base-el8 -f $HOME/code/pandorafms/extras/docker/centos8/base/Dockerfile $HOME/code/pandorafms/extras/docker/centos8/base/ #docker build -t pandorafms/pandorafms-open-base-el8 -f $HOME/code/pandorafms/extras/docker/centos8/base/Dockerfile $HOME/code/pandorafms/extras/docker/centos8/base/
#docker push pandorafms/pandorafms-open-base-el8 #docker push pandorafms/pandorafms-open-base-el8
FROM centos:8 FROM rockylinux:8
RUN dnf install -y --setopt=tsflags=nodocs \ RUN dnf install -y --setopt=tsflags=nodocs \
epel-release \ epel-release \
dnf-utils \ dnf-utils \
http://rpms.remirepo.net/enterprise/remi-release-8.rpm http://rpms.remirepo.net/enterprise/remi-release-8.rpm
RUN dnf module reset -y php && dnf module install -y php:remi-7.3 RUN dnf module reset -y php && dnf module install -y php:remi-7.4
RUN dnf config-manager --set-enabled powertools RUN dnf config-manager --set-enabled powertools
# Install console dependencies # Install console dependencies

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.759-211227 Version: 7.0NG.759-220105
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.759-211227" pandora_version="7.0NG.759-220105"
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.759'; use constant AGENT_VERSION => '7.0NG.759';
use constant AGENT_BUILD => '211227'; use constant AGENT_BUILD => '220105';
# 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.759 %define version 7.0NG.759
%define release 211227 %define release 220105
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.759 %define version 7.0NG.759
%define release 211227 %define release 220105
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.759" PI_VERSION="7.0NG.759"
PI_BUILD="211227" PI_BUILD="220105"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -1,59 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Fandora FMS - Generate SSH keys step-by-step</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="author" content="Sancho Lerena, Raul Mateos and others" />
<meta
name="copyright"
content="This is GPL software. Created by Sancho Lerena and others"
/>
</head>
<body>
<center>
<img src="images/logo.png" alt="" />
</center>
<h2>Step-by-step generating SSH keys</h2>
From
<a
href="https://pandorafms.com/docs/index.php?title=Pandora:FAQ#How_to_generate_a_pair_of_SSH_keys_for_Pandora_Windows_agent.3F_.28SSH_Transfer_only.29"
>Pandora FMS FAQ</a
>.
<ol>
<li>
Go to <code>.\util</code> of your Pandora FMS agent for Windows and run
<code>puttygen.exe</code>.<br />
Generate keys, SSH-2_DSA, 1024:<br /><br />
<img src="images/1.jpg" /><br /><br />
</li>
<li>
Press Generate<br />
Export key to OpenSSH key (Cygwin uses a port of OpenSSH)<br /><br />
<img src="images/2.jpg" /><br /><br />
</li>
<li>
We have no chosen password, so press YES:<br /><br />
<img src="images/3.jpg" /><br /><br />
</li>
<li>
Save it as <code>c:\pandora\keys\id_dsa:</code><br /><br />
<img src="images/4.jpg" /><br /><br />
</li>
<li>
Now let's copy the public key to clipboard:<br /><br />
<img src="images/5.jpg" /><br /><br />
</li>
<li>
and paste it as <code>c:\pandora_agent\keys\id_dsa.pub</code>, and also
to the <code>/home/pandora/.ssh/authorized_keys</code> file.
<br /><br />
<img src="images/6.jpg" /><br /><br />
</li>
</ol>
</body>
</html>

View File

@ -1,62 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Pandora FMS - Generación de claves SSH en Windows paso por paso
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="author" content="Sancho Lerena, Raul Mateos y otros" />
<meta
name="copyright"
content="This is GPL software. Created by Sancho Lerena and others"
/>
</head>
<body>
<center>
<img src="images/logo.png" alt="" />
</center>
<h2 class="print">Generación de claves SSH en Windows paso por paso</h2>
Extraído de las
<a
href="https://pandorafms.com/docs/index.php?title=Pandora:FAQ_ES#.C2.BFC.C3.B3mo_puedo_generar_un_par_de_claves_SHH_para_el_agente_para_Windows_.28SSH_Transfer.29_.3F"
>
FAQ</a
>.
<ol>
<li>
Desde el directorio <code>.\util</code> del agente Pandora FMS para
windows ejecutamos <code>puttygen.exe</code>.<br />
Generamos claves SSH-2_DSA, 1024:<br /><br />
<img src="images/1.jpg" /><br /><br />
</li>
<li>
Pulsamos «Generate» para generar la clave.<br />
Exportamos la clave a formato OpenSSH<br /><br />
<img src="images/2.jpg" /><br /><br />
</li>
<li>
No elegimos contraseña, con lo cual pulsamos «Sí»:<br /><br />
<img src="images/3.jpg" /><br /><br />
</li>
<li>
Guardamos la clave como <code>C:\pandora\keys\id_dsa:</code><br /><br />
<img src="images/4.jpg" /><br /><br />
</li>
<li>
Ahora copiamos la clave pública al portapapeles:<br /><br />
<img src="images/5.jpg" /><br /><br />
</li>
<li>
Pegamos la clave en un nuevo fichero
<code>C:\pandora_agent\keys\id_dsa.pub</code>, y debemos también
añadirla al fichero <code>/home/pandora/.ssh/authorized_keys</code>.
<br /><br />
<img src="images/6.jpg" /><br /><br />
</li>
</ol>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{211227} {220105}
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.759 Build 211227") #define PANDORA_VERSION ("7.0NG.759 Build 220105")
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.759(Build 211227))" VALUE "ProductVersion", "(7.0NG.759(Build 220105))"
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.759-211227 Version: 7.0NG.759-220105
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.759-211227" pandora_version="7.0NG.759-220105"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -117,3 +117,4 @@ mobile/include/style/jquery.mobile-1.3.1.css
godmode/alerts/configure_alert_special_days.php godmode/alerts/configure_alert_special_days.php
godmode/admin_access_logs.php godmode/admin_access_logs.php
enterprise/extensions/backup/main.php enterprise/extensions/backup/main.php
enterprise/extensions/backup.php

View File

@ -1385,9 +1385,15 @@ if ($update_module || $create_module) {
$custom_integer_2_default = $module['custom_integer_2']; $custom_integer_2_default = $module['custom_integer_2'];
} }
if ($id_module_type == 25) { if ($id_module_type === 25) {
// Web analysis, from MODULE_WUX. // Web analysis, from MODULE_WUX.
$custom_string_1 = base64_encode((string) get_parameter('custom_string_1', $custom_string_1_default)); $custom_string_1 = base64_encode((string) get_parameter('custom_string_1'));
// If the custom_string_1 parameter come empty, set the content
// of the module (it is base64_encoded).
if (empty($custom_string_1) === true) {
$custom_string_1 = $custom_string_1_default;
}
$custom_integer_1 = (int) get_parameter('custom_integer_1', $custom_integer_1_default); $custom_integer_1 = (int) get_parameter('custom_integer_1', $custom_integer_1_default);
} else { } else {
$custom_string_1 = (string) get_parameter('custom_string_1', $custom_string_1_default); $custom_string_1 = (string) get_parameter('custom_string_1', $custom_string_1_default);
@ -1402,7 +1408,7 @@ if ($update_module || $create_module) {
$macros = (string) get_parameter('macros'); $macros = (string) get_parameter('macros');
$macros_names = (array) get_parameter('macro_name', []); $macros_names = (array) get_parameter('macro_name', []);
if (!empty($macros)) { if (empty($macros) === false) {
$macros = json_decode(base64_decode($macros), true); $macros = json_decode(base64_decode($macros), true);
foreach ($macros as $k => $m) { foreach ($macros as $k => $m) {

View File

@ -250,6 +250,7 @@ if ($create_downtime || $update_downtime) {
} else if ($type_execution == 'periodically' } else if ($type_execution == 'periodically'
&& $type_periodicity == 'monthly' && $type_periodicity == 'monthly'
&& $periodically_day_from == $periodically_day_to && $periodically_day_from == $periodically_day_to
&& $periodically_time_from >= $periodically_time_to
) { ) {
ui_print_error_message( ui_print_error_message(
__('Not created. Error inserting data').'. '.__('The end time must be higher than the start time') __('Not created. Error inserting data').'. '.__('The end time must be higher than the start time')

View File

@ -1389,7 +1389,10 @@ class AgentWizard extends HTML
foreach (array_keys($data) as $k) { foreach (array_keys($data) as $k) {
foreach ($modulesActivated as $key => $value) { foreach ($modulesActivated as $key => $value) {
$valueStr = preg_replace('/\//', '\/', $value); $valueStr = preg_replace('/\//', '\/', $value);
if (empty(preg_match('/-'.$valueStr.'$/', $k)) === false) {
if (empty(preg_match('/-'.$valueStr.'$/', $k)) === false
|| empty(preg_match('/-'.$valueStr.'_sent$/', $k)) === false
) {
if (empty(preg_match('/module-name-set/', $k)) === false) { if (empty(preg_match('/module-name-set/', $k)) === false) {
$result[$value]['name'] = $data[$k]; $result[$value]['name'] = $data[$k];
} else if (empty(preg_match('/module-description-set/', $k)) === false) { } else if (empty(preg_match('/module-description-set/', $k)) === false) {
@ -1417,6 +1420,42 @@ class AgentWizard extends HTML
continue; continue;
} else if (empty(preg_match('/module-unit/', $k)) === false) { } else if (empty(preg_match('/module-unit/', $k)) === false) {
$result[$value]['unit'] = $data['module-unit-'.$key]; $result[$value]['unit'] = $data['module-unit-'.$key];
continue;
} else if (empty(preg_match('/module-warning-min/', $k)) === false) {
$result[$value]['warningMin'] = $data['module-warning-min-0_0-0'];
continue;
} else if (empty(preg_match('/module-warning-max/', $k)) === false) {
$result[$value]['warningMax'] = $data['module-warning-max-0_0-0'];
continue;
} else if (empty(preg_match('/module-critical-min/', $k)) === false) {
$result[$value]['criticalMin'] = $data['module-critical-min-0_0-0'];
continue;
} else if (empty(preg_match('/module-critical-max/', $k)) === false) {
$result[$value]['criticalMax'] = $data['module-critical-max-0_0-0'];
continue;
} else if (empty(preg_match('/module-critical-inv/', $k)) === false) {
if (isset($data['module-critical-inv-0_0-0'])) {
$result[$value]['criticalInv'] = $data['module-critical-inv-0_0-0_sent'];
}
continue;
} else if (empty(preg_match('/module-warning-inv/', $k)) === false) {
if (isset($data['module-warning-inv-0_0-0'])) {
$result[$value]['warningInv'] = $data['module-warning-inv-0_0-0_sent'];
}
continue;
} else if (empty(preg_match('/module-warning-perc/', $k)) === false) {
if (isset($data['module-warning-perc-0_0-0'])) {
$result[$value]['warningPerc'] = $data['module-warning-perc-0_0-0_sent'];
}
continue;
} else if (empty(preg_match('/module-critical-perc/', $k)) === false) {
if (isset($data['module-critical-perc-0_0-0'])) {
$result[$value]['criticalPerc'] = $data['module-critical-perc-0_0-0_sent'];
}
continue; continue;
} }
@ -1429,6 +1468,10 @@ class AgentWizard extends HTML
} }
} }
if (empty(preg_match('/-'.$valueStr.'_sent$/', $k)) === false) {
continue;
}
if (empty(preg_match('/module-warning-min/', $k)) === false) { if (empty(preg_match('/module-warning-min/', $k)) === false) {
$result[$value]['warningMin'] = $data[$k]; $result[$value]['warningMin'] = $data[$k];
} else if (empty(preg_match('/module-warning-max/', $k)) === false) { } else if (empty(preg_match('/module-warning-max/', $k)) === false) {
@ -1438,9 +1481,9 @@ class AgentWizard extends HTML
} else if (empty(preg_match('/module-critical-max/', $k)) === false) { } else if (empty(preg_match('/module-critical-max/', $k)) === false) {
$result[$value]['criticalMax'] = $data[$k]; $result[$value]['criticalMax'] = $data[$k];
} else if (empty(preg_match('/module-critical-inv/', $k)) === false) { } else if (empty(preg_match('/module-critical-inv/', $k)) === false) {
$result[$value]['criticalInv'] = $data[$k]; $result[$value]['criticalInv'] = $data[$k.'_sent'];
} else if (empty(preg_match('/module-warning-inv/', $k)) === false) { } else if (empty(preg_match('/module-warning-inv/', $k)) === false) {
$result[$value]['warningInv'] = $data[$k]; $result[$value]['warningInv'] = $data[$k.'_sent'];
} else if (empty(preg_match('/module-warning-perc/', $k)) === false) { } else if (empty(preg_match('/module-warning-perc/', $k)) === false) {
$result[$value]['warningPerc'] = $data[$k.'_sent']; $result[$value]['warningPerc'] = $data[$k.'_sent'];
} else if (empty(preg_match('/module-critical-perc/', $k)) === false) { } else if (empty(preg_match('/module-critical-perc/', $k)) === false) {

View File

@ -1256,8 +1256,7 @@ class ConsoleSupervisor
unix_timestamp() - unix_timestamp(keepalive) as downtime unix_timestamp() - unix_timestamp(keepalive) as downtime
FROM tserver FROM tserver
WHERE WHERE
unix_timestamp() - unix_timestamp(keepalive) > server_keepalive unix_timestamp() - unix_timestamp(keepalive) > server_keepalive'
OR status = 0'
); );
if ($servers === false) { if ($servers === false) {
@ -1298,13 +1297,12 @@ class ConsoleSupervisor
FROM tserver FROM tserver
WHERE WHERE
unix_timestamp() - unix_timestamp(keepalive) <= server_keepalive unix_timestamp() - unix_timestamp(keepalive) <= server_keepalive
OR status != 0' AND status = 1'
); );
if (is_array($servers_working) === true) { if (is_array($servers_working) === true) {
foreach ($servers_working as $server) { foreach ($servers_working as $server) {
$this->cleanNotifications( $this->cleanNotifications(
'NOTIF.SERVER.STATUS'.$server['id_server'] 'NOTIF.SERVER.STATUS.'.$server['id_server']
); );
} }
} }

View File

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

View File

@ -1181,6 +1181,7 @@ function html_print_select_multiple_filtered(
) { ) {
$output .= '<div class="item-filter flex-row-vcenter">'; $output .= '<div class="item-filter flex-row-vcenter">';
$output .= '<div style="display:none">';
$output .= html_print_input( $output .= html_print_input(
[ [
'style' => 'display:none;', 'style' => 'display:none;',
@ -1190,6 +1191,7 @@ function html_print_select_multiple_filtered(
'return' => true, 'return' => true,
] ]
); );
$output .= '</div>';
$f = "filterAvailableItems(this.value,'".$rid."','".__('None')."')"; $f = "filterAvailableItems(this.value,'".$rid."','".__('None')."')";
$output .= html_print_input( $output .= html_print_input(
@ -1312,7 +1314,7 @@ function html_print_select_multiple_filtered(
'input_class' => 'flex-row-vcenter', 'input_class' => 'flex-row-vcenter',
'label' => __('Group recursion'), 'label' => __('Group recursion'),
'name' => 'id-group-recursion-selected-select-'.$rid, 'name' => 'id-group-recursion-selected-select-'.$rid,
'type' => 'checkbox', 'type' => 'switch',
'script' => $reload_content, 'script' => $reload_content,
'return' => true, 'return' => true,
] ]
@ -1329,6 +1331,8 @@ function html_print_select_multiple_filtered(
) { ) {
$output .= '<div class="item-filter flex-row-vcenter">'; $output .= '<div class="item-filter flex-row-vcenter">';
$output .= '<div style="display:none">';
$output .= html_print_input( $output .= html_print_input(
[ [
'style' => 'display:none;', 'style' => 'display:none;',
@ -1338,6 +1342,7 @@ function html_print_select_multiple_filtered(
'return' => true, 'return' => true,
] ]
); );
$output .= '</div>';
$f = "filterSelectedItems(this.value,'".$rid."','".__('None')."')"; $f = "filterSelectedItems(this.value,'".$rid."','".__('None')."')";
$output .= html_print_input( $output .= html_print_input(

View File

@ -5346,7 +5346,7 @@ function reporting_get_agents_by_status($data, $graph_width=250, $graph_height=1
$agent_data = []; $agent_data = [];
$agent_data[0] = html_print_image('images/agent_notinit.png', true, ['title' => __('Agents not init')]); $agent_data[0] = html_print_image('images/agent_notinit.png', true, ['title' => __('Agents not init')]);
$agent_data[1] = "<a style='color: ".COL_NOTINIT.";' href='".$links['agents_not_init']."'><b><span class='blue_color_ligther font_12pt bolder big_data'>".format_numeric($data['agent_not_init']).'</span></b></a>'; $agent_data[1] = "<a style='color: ".COL_NOTINIT.";' href='".$links['agents_not_init']."'><b><span class='blue_color font_12pt bolder big_data'>".format_numeric($data['agent_not_init']).'</span></b></a>';
$agent_data[2] = ''; $agent_data[2] = '';
$agent_data[3] = ''; $agent_data[3] = '';

View File

@ -2850,9 +2850,6 @@ function get_donut_module_data($id_module)
foreach ($values as $val) { foreach ($values as $val) {
if ($index < $max_elements) { if ($index < $max_elements) {
$data = explode(',', $val); $data = explode(',', $val);
if ($data[1] == 0) {
$data[1] = __('No data');
}
if ($no_data_to_show) { if ($no_data_to_show) {
$values_to_return[$index]['tag_name'] = $data[0]; $values_to_return[$index]['tag_name'] = $data[0];
@ -2865,10 +2862,6 @@ function get_donut_module_data($id_module)
$total += (int) $data[1]; $total += (int) $data[1];
$index++; $index++;
} else { } else {
if ($data[1] == 0) {
$data[1] = __('No data');
}
$data = explode(',', $val); $data = explode(',', $val);
$values_to_return[$index]['tag_name'] = __('Others').': '.$data[1]; $values_to_return[$index]['tag_name'] = __('Others').': '.$data[1];
$values_to_return[$index]['color'] = $colors[$index]; $values_to_return[$index]['color'] = $colors[$index];
@ -2881,6 +2874,7 @@ function get_donut_module_data($id_module)
$values_to_return[$ind]['percent'] = (($donut_data['value'] * 100) / $total); $values_to_return[$ind]['percent'] = (($donut_data['value'] * 100) / $total);
} }
// sort array
$new_values_to_return = []; $new_values_to_return = [];
while (!empty($values_to_return)) { while (!empty($values_to_return)) {
$first = true; $first = true;

View File

@ -335,7 +335,7 @@ function pandoraFlotHBars(
"#e63c52", "#e63c52",
"#FFA631", "#FFA631",
"#f3b200", "#f3b200",
"#5BB6E5", "#4a83f3",
"#F2919D", "#F2919D",
"#82b92e" "#82b92e"
]; ];

View File

@ -942,7 +942,9 @@ function add_macro_field(macro, row_model_id, type_copy, k) {
.children() .children()
.eq(1) .eq(1)
.children() .children()
.attr("type", "password"); .attr("type", "password")
.removeAttr("value")
.val(macro_value);
} else { } else {
$("#" + row_id) $("#" + row_id)
.children() .children()
@ -955,7 +957,9 @@ function add_macro_field(macro, row_model_id, type_copy, k) {
$("#" + row_id) $("#" + row_id)
.children() .children()
.eq(1) .eq(1)
.attr("type", "password"); .attr("type", "password")
.removeAttr("value")
.val(macro_value);
} else { } else {
$("#" + row_id) $("#" + row_id)
.children() .children()

View File

@ -350,7 +350,7 @@ class GroupsStatusWidget extends Widget
// Agent Not Init. // Agent Not Init.
$table->data[2][1] = $this->getCellCounter( $table->data[2][1] = $this->getCellCounter(
$stats['agent_not_init'], $stats['agent_not_init'],
'#5bb6e5' '#4a83f3'
); );
$data .= html_print_table($table, true); $data .= html_print_table($table, true);
@ -424,7 +424,7 @@ class GroupsStatusWidget extends Widget
// Modules Not Init. // Modules Not Init.
$table->data[2][1] = $this->getCellCounter( $table->data[2][1] = $this->getCellCounter(
$stats['monitor_not_init'], $stats['monitor_not_init'],
'#5bb6e5' '#4a83f3'
); );
$data .= html_print_table($table, true); $data .= html_print_table($table, true);

View File

@ -1357,7 +1357,7 @@ td.datos2f9 {
font-weight: bold; font-weight: bold;
} }
.blue { .blue {
color: #5ab7e5; color: #4a83f3;
font-weight: bold; font-weight: bold;
} }
.black { .black {
@ -2506,7 +2506,7 @@ tr.group_view_ok,
tr.group_view_not_init, tr.group_view_not_init,
.group_view_not_init { .group_view_not_init {
background-color: #5bb6e5; background-color: #4a83f3;
color: #fff; color: #fff;
} }
@ -7301,6 +7301,10 @@ div.graph div.legend table {
background-color: #5bb6e5; background-color: #5bb6e5;
} }
.bg_4a83f3 {
background-color: #4a83f3;
}
.bg_aaaaaa { .bg_aaaaaa {
background-color: #aaaaaa; background-color: #aaaaaa;
} }
@ -8436,3 +8440,18 @@ div.stat-win-spinner img {
#backups_list > tbody > tr > td:last-child { #backups_list > tbody > tr > td:last-child {
text-align: center; text-align: center;
} }
/* err_msg_centralised */
div#err_msg_centralised div {
margin-top: 1em;
font-size: 14px;
}
div#err_msg_centralised img {
width: 100px;
margin-right: 3em;
}
div#err_msg_centralised {
display: flex;
flex-direction: row;
}

View File

@ -301,6 +301,7 @@ a.pandora_pagination.current:hover {
display: inline; display: inline;
padding: 7pt; padding: 7pt;
margin-left: 10px; margin-left: 10px;
background-color: transparent;
} }
.dt-button.buttons-csv.buttons-html5 span { .dt-button.buttons-csv.buttons-html5 span {
font-size: 0; font-size: 0;

View File

@ -1121,6 +1121,63 @@ if ($config['pure'] == 0) {
include 'godmode/menu.php'; include 'godmode/menu.php';
} }
if (has_metaconsole() === true
&& (bool) $config['centralized_management'] === true
) {
$MR = (float) $config['MR'];
// Node attached to a metaconsole.
$server_id = $config['metaconsole_node_id'];
// Connect to meta.
metaconsole_load_external_db(
[
'dbhost' => $config['replication_dbhost'],
'dbuser' => $config['replication_dbuser'],
'dbpass' => io_output_password($config['replication_dbpass']),
'dbname' => $config['replication_dbname'],
]
);
$metaMR = (float) db_get_value(
'value',
'tconfig',
'token',
'MR',
false,
false
);
// Return connection to node.
metaconsole_restore_db();
if ($MR !== $metaMR) {
$err = '<div id="err_msg_centralised">'.html_print_image(
'/images/warning_modern.png',
true
);
$err .= '<div>'.__(
'Metaconsole MR (%d) is different than this one (%d)',
$metaMR,
$MR
);
$err .= '<br>';
$err .= __('Please keep all environment updated to same version.');
$err .= '</div>';
?>
<script type="text/javascript">
$(document).ready(function () {
infoMessage({
title: '<?php echo __('Warning'); ?>',
text: '<?php echo $err; ?>',
simple: true,
})
})
</script>
<?php
}
}
/* /*
* Session locking concurrency speedup! * Session locking concurrency speedup!
* http://es2.php.net/manual/en/ref.session.php#64525 * http://es2.php.net/manual/en/ref.session.php#64525
@ -1362,8 +1419,6 @@ echo "\n<!-- Page generated in ".$run_time." seconds -->\n";
// Values from PHP to be recovered from JAVASCRIPT. // Values from PHP to be recovered from JAVASCRIPT.
require 'include/php_to_js_values.php'; require 'include/php_to_js_values.php';
?> ?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">

View File

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

View File

@ -175,7 +175,7 @@ tr.group_view_crit,
.group_view_not_init, .group_view_not_init,
.group_view_not_init * { .group_view_not_init * {
background-color: #5ab7e5 !important; background-color: #4a83f3 !important;
color: #fff !important; color: #fff !important;
} }

View File

@ -186,14 +186,14 @@ echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="data
echo "<span id='sumary' class='yellow_background'>".$total_agent_warning.'%</span>'; echo "<span id='sumary' class='yellow_background'>".$total_agent_warning.'%</span>';
echo "<span id='sumary' class='green_background'>".$total_agent_ok.'%</span>'; echo "<span id='sumary' class='green_background'>".$total_agent_ok.'%</span>';
echo "<span id='sumary' class='bg_B2B2B2'>".$total_agent_unknown.'%</span>'; echo "<span id='sumary' class='bg_B2B2B2'>".$total_agent_unknown.'%</span>';
echo "<span id='sumary' class='bg_5bb6e5'>".$total_not_init.'%</span>'; echo "<span id='sumary' class='blue'>".$total_not_init.'%</span>';
echo '</td>'; echo '</td>';
echo "<td align='center'>"; echo "<td align='center'>";
echo "<span id='sumary' class='red_background'>".$total_critical.'%</span>'; echo "<span id='sumary' class='red_background'>".$total_critical.'%</span>';
echo "<span id='sumary' class='yellow_background'>".$total_warning.'%</span>'; echo "<span id='sumary' class='yellow_background'>".$total_warning.'%</span>';
echo "<span id='sumary' class='green_background'>".$total_ok.'%</span>'; echo "<span id='sumary' class='green_background'>".$total_ok.'%</span>';
echo "<span id='sumary' class='bg_B2B2B2'>".$total_unknown.'%</span>'; echo "<span id='sumary' class='bg_B2B2B2'>".$total_unknown.'%</span>';
echo "<span id='sumary' class='bg_5bb6e5'>".$total_monitor_not_init.'%</span>'; echo "<span id='sumary' class='bg_4a83f3'>".$total_monitor_not_init.'%</span>';
echo '</td>'; echo '</td>';
echo '</tr>'; echo '</tr>';
echo '</table>'; echo '</table>';

View File

@ -480,7 +480,7 @@ if (is_ajax() === true) {
$return = []; $return = [];
$return['correct'] = false; $return['correct'] = false;
// ACL for the network map // ACL for the network map.
$id_group = db_get_value('id_group', 'tmap', 'id', $networkmap_id); $id_group = db_get_value('id_group', 'tmap', 'id', $networkmap_id);
// $networkmap_read = check_acl ($config['id_user'], $id_group, "MR"); // $networkmap_read = check_acl ($config['id_user'], $id_group, "MR");
$networkmap_write = check_acl($config['id_user'], $id_group, 'MW'); $networkmap_write = check_acl($config['id_user'], $id_group, 'MW');
@ -497,9 +497,7 @@ if (is_ajax() === true) {
$return['correct'] = networkmap_delete_link( $return['correct'] = networkmap_delete_link(
$networkmap_id, $networkmap_id,
$source_id,
$source_module_id, $source_module_id,
$target_id,
$target_module_id, $target_module_id,
$id_link $id_link
); );

View File

@ -168,7 +168,9 @@ if ($ag_freestring !== '' || $moduletype !== '' || $datatype !== ''
$autosearch = true; $autosearch = true;
} }
if (!is_metaconsole()) { $is_metaconsole = is_metaconsole();
if (!$is_metaconsole) {
$ag_group = (int) get_parameter('ag_group', 0); $ag_group = (int) get_parameter('ag_group', 0);
} else { } else {
$ag_group = get_parameter('ag_group', 0); $ag_group = get_parameter('ag_group', 0);
@ -219,7 +221,7 @@ if (is_numeric($ag_group)) {
} }
// Agent group selector. // Agent group selector.
if (!is_metaconsole()) { if (!$is_metaconsole) {
if ($ag_group > 0 && check_acl($config['id_user'], $ag_group, 'AR')) { if ($ag_group > 0 && check_acl($config['id_user'], $ag_group, 'AR')) {
if ($recursion) { if ($recursion) {
$all_groups = groups_get_children_ids($ag_group, true); $all_groups = groups_get_children_ids($ag_group, true);
@ -272,7 +274,7 @@ if (!is_metaconsole()) {
} }
// Module group. // Module group.
if (is_metaconsole()) { if ($is_metaconsole) {
if ($modulegroup != '-1') { if ($modulegroup != '-1') {
$sql_conditions .= sprintf(' AND tagente_modulo.id_module_group '.$not_condition.' IN (%s)', $modulegroup); $sql_conditions .= sprintf(' AND tagente_modulo.id_module_group '.$not_condition.' IN (%s)', $modulegroup);
} }
@ -370,7 +372,7 @@ if (!empty($ag_custom_fields)) {
// Filter by tag. // Filter by tag.
if ($tag_filter !== 0) { if ($tag_filter !== 0) {
if (is_metaconsole()) { if ($is_metaconsole) {
$sql_conditions .= ' AND tagente_modulo.id_agente_modulo IN ( $sql_conditions .= ' AND tagente_modulo.id_agente_modulo IN (
SELECT ttag_module.id_agente_modulo SELECT ttag_module.id_agente_modulo
FROM ttag_module FROM ttag_module
@ -415,7 +417,7 @@ if (!defined('METACONSOLE')) {
} }
// Get limit_sql depend of the metaconsole or standard mode. // Get limit_sql depend of the metaconsole or standard mode.
if (is_metaconsole()) { if ($is_metaconsole) {
// Offset will be used to get the subset of modules. // Offset will be used to get the subset of modules.
$inferior_limit = $offset; $inferior_limit = $offset;
$superior_limit = ($config['block_size'] + $offset); $superior_limit = ($config['block_size'] + $offset);
@ -514,7 +516,7 @@ $table->data[0][3] = html_print_select(
$rows_select = []; $rows_select = [];
$table->data[0][4] = __('Module group'); $table->data[0][4] = __('Module group');
$rows_select[0] = __('Not assigned'); $rows_select[0] = __('Not assigned');
if (!is_metaconsole()) { if (!$is_metaconsole) {
$rows = db_get_all_rows_sql( $rows = db_get_all_rows_sql(
'SELECT * 'SELECT *
FROM tmodule_group ORDER BY name' FROM tmodule_group ORDER BY name'
@ -617,27 +619,29 @@ if ($develop_bypass) {
$prediction_available = 1; $prediction_available = 1;
} }
$typemodules = []; $typemodules = [];
$typemodules[1] = __('Data server module'); $typemodules[1] = __('Data server module');
if ($network_available) { if ($network_available || $is_metaconsole) {
$typemodules[2] = __('Network server module'); $typemodules[2] = __('Network server module');
} }
if ($plugin_available) { if ($plugin_available || $is_metaconsole) {
$typemodules[4] = __('Plugin server module'); $typemodules[4] = __('Plugin server module');
} }
if ($wmi_available) { if ($wmi_available || $is_metaconsole) {
$typemodules[6] = __('WMI server module'); $typemodules[6] = __('WMI server module');
} }
if ($prediction_available) { if ($prediction_available || $is_metaconsole) {
$typemodules[5] = __('Prediction server module'); $typemodules[5] = __('Prediction server module');
} }
if (enterprise_installed()) { if (enterprise_installed()) {
$typemodules[7] = __('Web server module'); $typemodules[7] = __('Web server module');
if ($wux_available) { if ($wux_available || $is_metaconsole) {
$typemodules[8] = __('Wux server module'); $typemodules[8] = __('Wux server module');
} }
} }
@ -795,11 +799,11 @@ $table->data[4][0] .= __('Not condition').'&nbsp;'.ui_print_help_tip(__('If you
$table_custom_fields->style[0] = 'font-weight: bold;'; $table_custom_fields->style[0] = 'font-weight: bold;';
// Style is different in metaconsole. // Style is different in metaconsole.
if (is_metaconsole() === false) { if ($is_metaconsole === false) {
$table_custom_fields->style[0] = 'font-weight: bold; width: 150px;'; $table_custom_fields->style[0] = 'font-weight: bold; width: 150px;';
} }
if (is_metaconsole() === true) { if ($is_metaconsole === true) {
$table_custom_fields->styleTable = 'margin-left:0px; margin-top:15px;'; $table_custom_fields->styleTable = 'margin-left:0px; margin-top:15px;';
$table_custom_fields->cellpadding = '0'; $table_custom_fields->cellpadding = '0';
$table_custom_fields->cellspacing = '0'; $table_custom_fields->cellspacing = '0';

View File

@ -102,6 +102,8 @@ $default_filter = [
$fb64 = get_parameter('fb64', null); $fb64 = get_parameter('fb64', null);
if (isset($fb64)) { if (isset($fb64)) {
$filter = json_decode(base64_decode($fb64), true); $filter = json_decode(base64_decode($fb64), true);
$filter['tag_with'] = [];
$filter['tag_without'] = [];
} else { } else {
$filter = get_parameter( $filter = get_parameter(
'filter', 'filter',

View File

@ -18,7 +18,7 @@ require_once $config['homedir'].'/include/functions_reporting.php';
enterprise_include('operation/reporting/custom_reporting.php'); enterprise_include('operation/reporting/custom_reporting.php');
$searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0, 'AR'); $searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0, 'AR');
$searchUsers = $searchPolicies = check_acl($config['id_user'], 0, 'AR'); $searchUsers = $searchPolicies = (check_acl($config['id_user'], 0, 'AR') && enterprise_installed());
$searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'RR'); $searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'RR');
$searchMaps = check_acl($config['id_user'], 0, 'VR'); $searchMaps = check_acl($config['id_user'], 0, 'VR');
$searchMain = true; $searchMain = true;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.759 %define version 7.0NG.759
%define release 211227 %define release 220105
# 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.759 %define version 7.0NG.759
%define release 211227 %define release 220105
# 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.759 %define version 7.0NG.759
%define release 211227 %define release 220105
%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

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.759-211227 Version: 7.0NG.759-220105
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.759-211227" pandora_version="7.0NG.759-220105"
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.759"; my $pandora_version = "7.0NG.759";
my $pandora_build = "211227"; my $pandora_build = "220105";
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.759"; my $pandora_version = "7.0NG.759";
my $pandora_build = "211227"; my $pandora_build = "220105";
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.759 %define version 7.0NG.759
%define release 211227 %define release 220105
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.759 %define version 7.0NG.759
%define release 211227 %define release 220105
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.759" PI_VERSION="7.0NG.759"
PI_BUILD="211227" PI_BUILD="220105"
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.759 Build 211227"; my $version = "7.0NG.759 Build 220105";
# 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.759 Build 211227"; my $version = "7.0NG.759 Build 220105";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);