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 push pandorafms/pandorafms-open-base-el8
FROM centos:8
FROM rockylinux:8
RUN dnf install -y --setopt=tsflags=nodocs \
epel-release \
dnf-utils \
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
# 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
Version: 7.0NG.759-211227
Version: 7.0NG.759-220105
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
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
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.759"
PI_BUILD="211227"
PI_BUILD="220105"
OS_NAME=`uname -s`
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
{211227}
{220105}
ViewReadme
{Yes}

View File

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

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
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"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.759-211227
Version: 7.0NG.759-220105
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -116,4 +116,5 @@ mobile/include/javascript/jquery.mobile-1.3.1.js
mobile/include/style/jquery.mobile-1.3.1.css
godmode/alerts/configure_alert_special_days.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'];
}
if ($id_module_type == 25) {
if ($id_module_type === 25) {
// 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);
} else {
$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_names = (array) get_parameter('macro_name', []);
if (!empty($macros)) {
if (empty($macros) === false) {
$macros = json_decode(base64_decode($macros), true);
foreach ($macros as $k => $m) {

View File

@ -250,6 +250,7 @@ if ($create_downtime || $update_downtime) {
} else if ($type_execution == 'periodically'
&& $type_periodicity == 'monthly'
&& $periodically_day_from == $periodically_day_to
&& $periodically_time_from >= $periodically_time_to
) {
ui_print_error_message(
__('Not created. Error inserting data').'. '.__('The end time must be higher than the start time')
@ -627,20 +628,20 @@ $table->data[5][1] = "
<tr><td>".ui_get_using_system_timezone_warning().'</td></tr>
<tr>
<td>'.__('Type Periodicity:').'&nbsp;'.html_print_select(
[
'weekly' => __('Weekly'),
'monthly' => __('Monthly'),
],
'type_periodicity',
$type_periodicity,
'change_type_periodicity();',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
[
'weekly' => __('Weekly'),
'monthly' => __('Monthly'),
],
'type_periodicity',
$type_periodicity,
'change_type_periodicity();',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
)."</td>
</tr>
<tr>
@ -660,31 +661,31 @@ $table->data[5][1] = "
<tr>
<td>".__('From day:').'</td>
<td>'.html_print_select(
$days,
'periodically_day_from',
$periodically_day_from,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
$days,
'periodically_day_from',
$periodically_day_from,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).'</td>
<td>'.__('To day:').'</td>
<td>'.html_print_select(
$days,
'periodically_day_to',
$periodically_day_to,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
$days,
'periodically_day_to',
$periodically_day_to,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).'</td>
<td>'.ui_print_help_tip(__('The end day must be higher than the start day'), true).'</td>
</tr>
@ -693,26 +694,26 @@ $table->data[5][1] = "
<tr>
<td>'.__('From hour:').'</td>
<td>'.html_print_input_text(
'periodically_time_from',
$periodically_time_from,
'',
7,
7,
true,
$disabled_in_execution
'periodically_time_from',
$periodically_time_from,
'',
7,
7,
true,
$disabled_in_execution
).ui_print_help_tip(
__('The end time must be higher than the start time'),
true
).'</td>
<td>'.__('To hour:').'</td>
<td>'.html_print_input_text(
'periodically_time_to',
$periodically_time_to,
'',
7,
7,
true,
$disabled_in_execution
'periodically_time_to',
$periodically_time_to,
'',
7,
7,
true,
$disabled_in_execution
).ui_print_help_tip(
__('The end time must be higher than the start time'),
true
@ -998,13 +999,13 @@ $table->data['module'][1] = "
<td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete"
onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;"
href="">'.html_print_image(
'images/cross.png',
true,
[
'border' => '0',
'alt' => __('Delete'),
'class' => 'invert_filter',
]
'images/cross.png',
true,
[
'border' => '0',
'alt' => __('Delete'),
'class' => 'invert_filter',
]
).'</a>'."</td>
</tr>
<tr class='datos2' id='add_modules_row'>

View File

@ -1389,7 +1389,10 @@ class AgentWizard extends HTML
foreach (array_keys($data) as $k) {
foreach ($modulesActivated as $key => $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) {
$result[$value]['name'] = $data[$k];
} else if (empty(preg_match('/module-description-set/', $k)) === false) {
@ -1417,6 +1420,42 @@ class AgentWizard extends HTML
continue;
} else if (empty(preg_match('/module-unit/', $k)) === false) {
$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;
}
@ -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) {
$result[$value]['warningMin'] = $data[$k];
} 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) {
$result[$value]['criticalMax'] = $data[$k];
} 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) {
$result[$value]['warningInv'] = $data[$k];
$result[$value]['warningInv'] = $data[$k.'_sent'];
} else if (empty(preg_match('/module-warning-perc/', $k)) === false) {
$result[$value]['warningPerc'] = $data[$k.'_sent'];
} 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
FROM tserver
WHERE
unix_timestamp() - unix_timestamp(keepalive) > server_keepalive
OR status = 0'
unix_timestamp() - unix_timestamp(keepalive) > server_keepalive'
);
if ($servers === false) {
@ -1298,13 +1297,12 @@ class ConsoleSupervisor
FROM tserver
WHERE
unix_timestamp() - unix_timestamp(keepalive) <= server_keepalive
OR status != 0'
AND status = 1'
);
if (is_array($servers_working) === true) {
foreach ($servers_working as $server) {
$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
*/
$build_version = 'PC211227';
$build_version = 'PC220105';
$pandora_version = 'v7.0NG.759';
// 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 style="display:none">';
$output .= html_print_input(
[
'style' => 'display:none;',
@ -1190,6 +1191,7 @@ function html_print_select_multiple_filtered(
'return' => true,
]
);
$output .= '</div>';
$f = "filterAvailableItems(this.value,'".$rid."','".__('None')."')";
$output .= html_print_input(
@ -1312,7 +1314,7 @@ function html_print_select_multiple_filtered(
'input_class' => 'flex-row-vcenter',
'label' => __('Group recursion'),
'name' => 'id-group-recursion-selected-select-'.$rid,
'type' => 'checkbox',
'type' => 'switch',
'script' => $reload_content,
'return' => true,
]
@ -1329,6 +1331,8 @@ function html_print_select_multiple_filtered(
) {
$output .= '<div class="item-filter flex-row-vcenter">';
$output .= '<div style="display:none">';
$output .= html_print_input(
[
'style' => 'display:none;',
@ -1338,6 +1342,7 @@ function html_print_select_multiple_filtered(
'return' => true,
]
);
$output .= '</div>';
$f = "filterSelectedItems(this.value,'".$rid."','".__('None')."')";
$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[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[3] = '';

View File

@ -2850,9 +2850,6 @@ function get_donut_module_data($id_module)
foreach ($values as $val) {
if ($index < $max_elements) {
$data = explode(',', $val);
if ($data[1] == 0) {
$data[1] = __('No data');
}
if ($no_data_to_show) {
$values_to_return[$index]['tag_name'] = $data[0];
@ -2865,10 +2862,6 @@ function get_donut_module_data($id_module)
$total += (int) $data[1];
$index++;
} else {
if ($data[1] == 0) {
$data[1] = __('No data');
}
$data = explode(',', $val);
$values_to_return[$index]['tag_name'] = __('Others').': '.$data[1];
$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);
}
// sort array
$new_values_to_return = [];
while (!empty($values_to_return)) {
$first = true;

View File

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

View File

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

View File

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

View File

@ -1357,7 +1357,7 @@ td.datos2f9 {
font-weight: bold;
}
.blue {
color: #5ab7e5;
color: #4a83f3;
font-weight: bold;
}
.black {
@ -2506,7 +2506,7 @@ tr.group_view_ok,
tr.group_view_not_init,
.group_view_not_init {
background-color: #5bb6e5;
background-color: #4a83f3;
color: #fff;
}
@ -7301,6 +7301,10 @@ div.graph div.legend table {
background-color: #5bb6e5;
}
.bg_4a83f3 {
background-color: #4a83f3;
}
.bg_aaaaaa {
background-color: #aaaaaa;
}
@ -8436,3 +8440,18 @@ div.stat-win-spinner img {
#backups_list > tbody > tr > td:last-child {
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;
padding: 7pt;
margin-left: 10px;
background-color: transparent;
}
.dt-button.buttons-csv.buttons-html5 span {
font-size: 0;

View File

@ -1121,6 +1121,63 @@ if ($config['pure'] == 0) {
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!
* 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.
require 'include/php_to_js_values.php';
?>
<script type="text/javascript" language="javascript">

View File

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

View File

@ -175,7 +175,7 @@ tr.group_view_crit,
.group_view_not_init,
.group_view_not_init * {
background-color: #5ab7e5 !important;
background-color: #4a83f3 !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='green_background'>".$total_agent_ok.'%</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 align='center'>";
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='green_background'>".$total_ok.'%</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 '</tr>';
echo '</table>';

View File

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

View File

@ -168,7 +168,9 @@ if ($ag_freestring !== '' || $moduletype !== '' || $datatype !== ''
$autosearch = true;
}
if (!is_metaconsole()) {
$is_metaconsole = is_metaconsole();
if (!$is_metaconsole) {
$ag_group = (int) get_parameter('ag_group', 0);
} else {
$ag_group = get_parameter('ag_group', 0);
@ -219,7 +221,7 @@ if (is_numeric($ag_group)) {
}
// Agent group selector.
if (!is_metaconsole()) {
if (!$is_metaconsole) {
if ($ag_group > 0 && check_acl($config['id_user'], $ag_group, 'AR')) {
if ($recursion) {
$all_groups = groups_get_children_ids($ag_group, true);
@ -272,7 +274,7 @@ if (!is_metaconsole()) {
}
// Module group.
if (is_metaconsole()) {
if ($is_metaconsole) {
if ($modulegroup != '-1') {
$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.
if ($tag_filter !== 0) {
if (is_metaconsole()) {
if ($is_metaconsole) {
$sql_conditions .= ' AND tagente_modulo.id_agente_modulo IN (
SELECT ttag_module.id_agente_modulo
FROM ttag_module
@ -415,7 +417,7 @@ if (!defined('METACONSOLE')) {
}
// 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.
$inferior_limit = $offset;
$superior_limit = ($config['block_size'] + $offset);
@ -514,7 +516,7 @@ $table->data[0][3] = html_print_select(
$rows_select = [];
$table->data[0][4] = __('Module group');
$rows_select[0] = __('Not assigned');
if (!is_metaconsole()) {
if (!$is_metaconsole) {
$rows = db_get_all_rows_sql(
'SELECT *
FROM tmodule_group ORDER BY name'
@ -617,27 +619,29 @@ if ($develop_bypass) {
$prediction_available = 1;
}
$typemodules = [];
$typemodules[1] = __('Data server module');
if ($network_available) {
$typemodules = [];
$typemodules[1] = __('Data server module');
if ($network_available || $is_metaconsole) {
$typemodules[2] = __('Network server module');
}
if ($plugin_available) {
if ($plugin_available || $is_metaconsole) {
$typemodules[4] = __('Plugin server module');
}
if ($wmi_available) {
if ($wmi_available || $is_metaconsole) {
$typemodules[6] = __('WMI server module');
}
if ($prediction_available) {
if ($prediction_available || $is_metaconsole) {
$typemodules[5] = __('Prediction server module');
}
if (enterprise_installed()) {
$typemodules[7] = __('Web server module');
if ($wux_available) {
if ($wux_available || $is_metaconsole) {
$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;';
// Style is different in metaconsole.
if (is_metaconsole() === false) {
if ($is_metaconsole === false) {
$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->cellpadding = '0';
$table_custom_fields->cellspacing = '0';

View File

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

View File

@ -18,7 +18,7 @@ require_once $config['homedir'].'/include/functions_reporting.php';
enterprise_include('operation/reporting/custom_reporting.php');
$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');
$searchMaps = check_acl($config['id_user'], 0, 'VR');
$searchMain = true;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.759
%define release 211227
%define release 220105
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.759
%define release 211227
%define release 220105
# User and Group under which Apache is running
%define httpd_name httpd

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.759-211227
Version: 7.0NG.759-220105
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.759 Build 211227";
my $version = "7.0NG.759 Build 220105";
# Pandora server configuration
my %conf;

View File

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