Merge branch 'develop' into ent-13598-item-grouped-end-of-life-al-crear-un-template-no-tiene-opciones-para-seleccionar-so-y-grupo
This commit is contained in:
commit
0362fa0afc
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.776-240430
|
||||
Version: 7.0NG.776-240506
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240430"
|
||||
pandora_version="7.0NG.776-240506"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.776';
|
||||
use constant AGENT_BUILD => '240430';
|
||||
use constant AGENT_BUILD => '240506';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.776"
|
||||
PI_BUILD="240430"
|
||||
PI_BUILD="240506"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{240430}
|
||||
{240506}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240430")
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240506")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Pandora FMS"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240430))"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240506))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.776-240430
|
||||
Version: 7.0NG.776-240506
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240430"
|
||||
pandora_version="7.0NG.776-240506"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -69,38 +69,41 @@ function api_execute(
|
|||
|
||||
if (empty($url) === true) {
|
||||
$url = 'http://'.$ip.$pandora_url.'/include/api.php?';
|
||||
} else {
|
||||
$url_schema = parse_url($url);
|
||||
$url = $url_schema['scheme'].'://'.$url_schema['host'].$pandora_url.'/include/api.php?';
|
||||
}
|
||||
|
||||
if (empty($op) === false) {
|
||||
$data['op'] = $op;
|
||||
}
|
||||
if (empty($op) === false) {
|
||||
$data['op'] = $op;
|
||||
}
|
||||
|
||||
if (empty($op2) === false) {
|
||||
$data['op2'] = $op2;
|
||||
}
|
||||
if (empty($op2) === false) {
|
||||
$data['op2'] = $op2;
|
||||
}
|
||||
|
||||
if (empty($id) === false) {
|
||||
$data['id'] = $id;
|
||||
}
|
||||
if (empty($id) === false) {
|
||||
$data['id'] = $id;
|
||||
}
|
||||
|
||||
if (empty($id2) === false) {
|
||||
$data['id2'] = $id2;
|
||||
}
|
||||
if (empty($id2) === false) {
|
||||
$data['id2'] = $id2;
|
||||
}
|
||||
|
||||
if (empty($return_type) === false) {
|
||||
$data['return_type'] = $return_type;
|
||||
}
|
||||
if (empty($return_type) === false) {
|
||||
$data['return_type'] = $return_type;
|
||||
}
|
||||
|
||||
if (empty($other) === false) {
|
||||
$data['other_mode'] = $other_mode;
|
||||
$data['other'] = $other;
|
||||
}
|
||||
if (empty($other) === false) {
|
||||
$data['other_mode'] = $other_mode;
|
||||
$data['other'] = $other;
|
||||
}
|
||||
|
||||
// If token is not reported,use old method.
|
||||
if (empty($token) === true) {
|
||||
$data['apipass'] = $apipass;
|
||||
$data['user'] = $user;
|
||||
$data['pass'] = $password;
|
||||
}
|
||||
// If token is not reported,use old method.
|
||||
if (empty($token) === true) {
|
||||
$data['apipass'] = $apipass;
|
||||
$data['user'] = $user;
|
||||
$data['pass'] = $password;
|
||||
}
|
||||
|
||||
$url_protocol = parse_url($url)['scheme'];
|
||||
|
|
|
@ -566,10 +566,10 @@ if ($search != '') {
|
|||
if ($id != '') {
|
||||
$aux = $id[0]['id_agent'];
|
||||
$search_sql = sprintf(
|
||||
' AND ( REPLACE(nombre, " ", " ") LIKE "%%%s%%"
|
||||
OR REPLACE(alias, " ", " ") LIKE "%%%s%%"
|
||||
OR REPLACE(comentarios, " ", " ") LIKE "%%%s%%"
|
||||
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND REPLACE(description, " ", " ") LIKE "%%%s%%")
|
||||
' AND ( nombre LIKE "%%%s%%"
|
||||
OR alias LIKE "%%%s%%"
|
||||
OR comentarios LIKE "%%%s%%"
|
||||
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%")
|
||||
OR tagente.id_agente = %d',
|
||||
$search,
|
||||
$search,
|
||||
|
@ -591,10 +591,10 @@ if ($search != '') {
|
|||
$search_sql .= ')';
|
||||
} else {
|
||||
$search_sql = sprintf(
|
||||
' AND ( REPLACE(nombre, " ", " ")
|
||||
LIKE "%%%s%%" OR REPLACE(alias, " ", " ")
|
||||
LIKE "%%%s%%" OR REPLACE(comentarios, " ", " ") LIKE "%%%s%%"
|
||||
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND REPLACE(description, " ", " ") LIKE "%%%s%%"))',
|
||||
' AND ( nombre
|
||||
LIKE "%%%s%%" OR alias
|
||||
LIKE "%%%s%%" OR comentarios LIKE "%%%s%%"
|
||||
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%"))',
|
||||
$search,
|
||||
$search,
|
||||
$search,
|
||||
|
|
|
@ -1459,7 +1459,7 @@ $class = 'databox filters';
|
|||
<td class="bolder">
|
||||
<?php
|
||||
echo __('Module').ui_print_help_tip(
|
||||
__('Case insensitive regular expression or string for module name. For example: if you use this field with "Module exact match" enabled then this field has to be fulfilled with the literally string of the module name, if not you can use a regular expression. Example: %s will match: cpu_usage, vram usage in matchine 1.', '.*usage.*'),
|
||||
__('Case insensitive regular expression or string for module name. For example: if you use this field with "Module exact match" enabled then this field has to be fulfilled with the literally string of the module name, if not you can use a regular expression. Example: %s will match: cpu_usage, vram usage in machine 1.', '.*usage.*'),
|
||||
true
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -362,14 +362,20 @@ if (is_ajax() === true) {
|
|||
$row['name'] = __('Admin secondary LDAP password');
|
||||
$row['control'] = html_print_input_password(
|
||||
'ldap_admin_pass_secondary',
|
||||
io_output_password($config['ldap_admin_pass_secondary']),
|
||||
(empty(io_output_password($config['ldap_admin_pass_secondary'])) === false) ? '*****' : '',
|
||||
$alt = '',
|
||||
60,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w400px-important'
|
||||
'w400px-important',
|
||||
'on',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true
|
||||
);
|
||||
$table->data['ldap_admin_pass_secondary'] = $row;
|
||||
break;
|
||||
|
|
|
@ -22,7 +22,7 @@ use DI\ContainerBuilder;
|
|||
/*
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC240430';
|
||||
$build_version = 'PC240506';
|
||||
$pandora_version = 'v7.0NG.776';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -741,8 +741,10 @@ function config_update_config()
|
|||
$error_update[] = __('Admin secondary LDAP login');
|
||||
}
|
||||
|
||||
if (config_update_value('ldap_admin_pass_secondary', get_parameter('ldap_admin_pass_secondary'), true, true) === false) {
|
||||
$error_update[] = __('Admin secondary LDAP password');
|
||||
if ((bool) get_parameter('ldap_admin_pass_secondary_password_changed', false) === true) {
|
||||
if (config_update_value('ldap_admin_pass_secondary', get_parameter('ldap_admin_pass_secondary'), true, true) === false) {
|
||||
$error_update[] = __('Admin LDAP password secondary');
|
||||
}
|
||||
}
|
||||
|
||||
if (config_update_value('fallback_local_auth', get_parameter('fallback_local_auth'), true) === false) {
|
||||
|
|
|
@ -134,11 +134,14 @@ function forecast_projection_graph(
|
|||
// 3.1 Standard deviation for X: sqrt((Sum(Xi²)/Obs) - (avg X)²)
|
||||
// 3.2 Standard deviation for Y: sqrt((Sum(Yi²)/Obs) - (avg Y)²)
|
||||
// Linear correlation coefficient:
|
||||
// Agent interval could be zero, 300 is the predefined
|
||||
// Agent interval could be zero, 300 is the predefined.
|
||||
if ($sum_obs == 0) {
|
||||
$agent_interval = SECONDS_5MINUTES;
|
||||
} else {
|
||||
$agent_interval = ($sum_diff_dates / $sum_obs);
|
||||
if ($agent_interval < 60) {
|
||||
$agent_interval = SECONDS_1MINUTE;
|
||||
}
|
||||
}
|
||||
|
||||
// Could be a inverse correlation coefficient
|
||||
|
@ -170,7 +173,7 @@ function forecast_projection_graph(
|
|||
$a = 0;
|
||||
}
|
||||
|
||||
// Data inicialization
|
||||
// Data inicialization.
|
||||
$output_data = [];
|
||||
if ($prediction_period != false) {
|
||||
$limit_timestamp = ($last_timestamp + $prediction_period);
|
||||
|
@ -199,50 +202,54 @@ function forecast_projection_graph(
|
|||
$time_format = 'M d';
|
||||
}
|
||||
|
||||
// Aplying linear regression to module data in order to do the prediction
|
||||
$idx = 0;
|
||||
// Create data in graph format like
|
||||
while ($in_range) {
|
||||
$now = time();
|
||||
try {
|
||||
// Aplying linear regression to module data in order to do the prediction.
|
||||
$idx = 0;
|
||||
// Create data in graph format like.
|
||||
while ($in_range) {
|
||||
$now = time();
|
||||
|
||||
// Check that exec time is not greater than half max exec server time
|
||||
if ($max_exec_time != false) {
|
||||
if (($begin_time + ($max_exec_time / 2)) < $now) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$timestamp_f = ($current_ts * 1000);
|
||||
|
||||
if ($csv) {
|
||||
$output_data[$idx]['date'] = $current_ts;
|
||||
$output_data[$idx]['data'] = ($a + ($b * $current_ts));
|
||||
} else {
|
||||
$output_data[$idx][0] = $timestamp_f;
|
||||
$output_data[$idx][1] = ($a + ($b * $current_ts));
|
||||
}
|
||||
|
||||
// Using this function for prediction_date
|
||||
if ($prediction_period == false) {
|
||||
// These statements stop the prediction when interval is greater than 2 years
|
||||
if (($current_ts - $last_timestamp) >= 94608000
|
||||
|| $max_value == $min_value
|
||||
) {
|
||||
return false;
|
||||
// Check that exec time is not greater than half max exec server time.
|
||||
if ($max_exec_time != false) {
|
||||
if (($begin_time + ($max_exec_time / 2)) < $now) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Found it
|
||||
if (($max_value >= $output_data[$idx][1])
|
||||
&& ($min_value <= $output_data[$idx][0])
|
||||
) {
|
||||
return ($current_ts + ($sum_diff_dates * $agent_interval));
|
||||
}
|
||||
} else if ($current_ts > $limit_timestamp) {
|
||||
$in_range = false;
|
||||
}
|
||||
$timestamp_f = ($current_ts * 1000);
|
||||
|
||||
$current_ts = ($current_ts + $agent_interval);
|
||||
$idx++;
|
||||
if ($csv) {
|
||||
$output_data[$idx]['date'] = $current_ts;
|
||||
$output_data[$idx]['data'] = ($a + ($b * $current_ts));
|
||||
} else {
|
||||
$output_data[$idx][0] = $timestamp_f;
|
||||
$output_data[$idx][1] = ($a + ($b * $current_ts));
|
||||
}
|
||||
|
||||
// Using this function for prediction_date.
|
||||
if ($prediction_period == false) {
|
||||
// These statements stop the prediction when interval is greater than 2 years.
|
||||
if (($current_ts - $last_timestamp) >= 94608000
|
||||
|| $max_value == $min_value
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Found it.
|
||||
if (($max_value >= $output_data[$idx][1])
|
||||
&& ($min_value <= $output_data[$idx][0])
|
||||
) {
|
||||
return ($current_ts + ($sum_diff_dates * $agent_interval));
|
||||
}
|
||||
} else if ($current_ts > $limit_timestamp) {
|
||||
$in_range = false;
|
||||
}
|
||||
|
||||
$current_ts = ($current_ts + $agent_interval);
|
||||
$idx++;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $output_data;
|
||||
|
|
|
@ -2662,7 +2662,20 @@ function tactical_groups_get_agents_and_monitoring($id_groups, $data='')
|
|||
$tdata[1] = '<a class="big_data" href="'.$urls['total_agents'].'">'.$tdata[1].'</a>';
|
||||
|
||||
if ($data['total_agents'] > 500 && !enterprise_installed()) {
|
||||
$tdata[2] = "<div id='agentsmodal' class='publienterprise' title='".__('Enterprise version not installed')."'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
|
||||
$tdata[2] = "<div id='agentsmodal' class='publienterprise' title='Community version' >";
|
||||
$tdata[2] .= html_print_image(
|
||||
'images/alert_enterprise.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Enterprise version not installed'),
|
||||
'class' => 'img_help'
|
||||
],
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
);
|
||||
$tdata[2] .= '</div>';
|
||||
}
|
||||
|
||||
$tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks'), 'class' => 'invert_filter'], false, false, false, true);
|
||||
|
@ -2676,7 +2689,20 @@ function tactical_groups_get_agents_and_monitoring($id_groups, $data='')
|
|||
*/
|
||||
if ($data['total_agents']) {
|
||||
if (($data['monitor_total'] / $data['total_agents'] > 100) && !enterprise_installed()) {
|
||||
$tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' ><img data-title='".__('Enterprise version not installed')."' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
|
||||
$tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' >";
|
||||
$tdata[5] .= html_print_image(
|
||||
'images/alert_enterprise.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Enterprise version not installed'),
|
||||
'class' => 'img_help'
|
||||
],
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
);
|
||||
$tdata[5] .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2728,7 +2754,20 @@ function tactical_groups_get_stats_alerts($id_groups, $data='')
|
|||
*/
|
||||
|
||||
if ($data['monitor_alerts'] > $data['total_agents'] && !enterprise_installed()) {
|
||||
$tdata[2] = "<div id='alertagentmodal' class='publienterprise' title='Community version' ><img data-title='".__('Enterprise version not installed')."' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
|
||||
$tdata[2] = "<div id='alertagentmodal' class='publienterprise' title='Community version' >";
|
||||
$tdata[2] .= html_print_image(
|
||||
'images/alert_enterprise.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Enterprise version not installed'),
|
||||
'class' => 'img_help'
|
||||
],
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
);
|
||||
$tdata[2] .= '</div>';
|
||||
}
|
||||
|
||||
$tdata[3] = html_print_image(
|
||||
|
|
|
@ -7942,6 +7942,7 @@ function html_print_select_date_range(
|
|||
$date_format_js='yy/mm/dd',
|
||||
$time_format_js='HH:mm:ss',
|
||||
$id='',
|
||||
$units_selected='1',
|
||||
) {
|
||||
global $config;
|
||||
|
||||
|
@ -8136,7 +8137,7 @@ function html_print_select_date_range(
|
|||
$output .= html_print_select(
|
||||
$units,
|
||||
$name.'_units',
|
||||
'1',
|
||||
$units_selected,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
|
|
|
@ -1712,7 +1712,7 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->head[3] = __('Name');
|
||||
$table1->head[4] = __('Agent');
|
||||
$table1->head[5] = __('Severity');
|
||||
$table1->head[6] = __('Val. by');
|
||||
$table1->head[6] = __('Validated by');
|
||||
$table1->head[7] = __('Timestamp');
|
||||
} else {
|
||||
$table1->head[0] = __('Status');
|
||||
|
@ -1720,7 +1720,7 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->head[2] = __('Name');
|
||||
$table1->head[3] = __('Agent');
|
||||
$table1->head[4] = __('Severity');
|
||||
$table1->head[5] = __('Val. by');
|
||||
$table1->head[5] = __('Validated by');
|
||||
$table1->head[6] = __('Timestamp');
|
||||
}
|
||||
|
||||
|
@ -1801,7 +1801,11 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
'id_user',
|
||||
$event['id_usuario']
|
||||
);
|
||||
$data[] = io_safe_output($user_name);
|
||||
if (isset($event['id_usuario']) === true && empty($event['id_usuario']) === false) {
|
||||
$data[] = io_safe_output($user_name).' ('.$event['id_usuario'].')';
|
||||
} else {
|
||||
$data[] = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($item['show_summary_group']) {
|
||||
|
@ -3845,7 +3849,7 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
|
||||
$table1->head[2] = __('Name');
|
||||
$table1->head[4] = __('Severity');
|
||||
$table1->head[5] = __('Val. by');
|
||||
$table1->head[5] = __('Validated by');
|
||||
$table1->head[6] = __('Timestamp');
|
||||
if ((bool) $item['show_custom_data'] === true) {
|
||||
$table1->head[7] = __('Custom data');
|
||||
|
@ -3904,7 +3908,11 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
$data[] = '<i>'.__('System').'</i>';
|
||||
} else {
|
||||
$user_name = db_get_value('fullname', 'tusuario', 'id_user', $event['validated_by']);
|
||||
$data[] = io_safe_output($user_name);
|
||||
if (isset($event['id_usuario']) === true && empty($event['id_usuario']) === false) {
|
||||
$data[] = io_safe_output($user_name).' ('.$event['id_usuario'].')';
|
||||
} else {
|
||||
$data[] = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($item['show_summary_group']) {
|
||||
|
|
|
@ -1588,7 +1588,12 @@ function snmp_browser_create_modules_snmp(
|
|||
|
||||
enterprise_include_once('include/functions_policies.php');
|
||||
foreach ($id_target as $policy) {
|
||||
$ids[] = policies_create_module($oid['oid'], $policy, 2, $values);
|
||||
$exist = db_get_row_filter('tpolicy_modules', ['name' => $oid['oid'], 'id_policy' => $policy], '*');
|
||||
if ($exist !== false) {
|
||||
$ids[] = false;
|
||||
} else {
|
||||
$ids[] = policies_create_module($oid['oid'], $policy, 2, $values);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -389,29 +389,6 @@ class Netflow extends Widget
|
|||
{
|
||||
return '
|
||||
$(document).ready(function(){
|
||||
//Limit 1 week
|
||||
$("#period_select option").each(function(key, element){
|
||||
if(element.value > 604800){
|
||||
$(element).remove();
|
||||
}
|
||||
})
|
||||
$("#period_manual option").each(function(key, element){
|
||||
if(element.value > 604800){
|
||||
$(element).remove();
|
||||
}
|
||||
});
|
||||
$("#period_manual input").on("change", function(e){
|
||||
if($("#hidden-period").val() > 604800) {
|
||||
$(this).val(1);
|
||||
$("#hidden-period").val(604800);
|
||||
$("#period_manual select option").removeAttr("selected");
|
||||
setTimeout(() => {
|
||||
$("#period_default select option[value=\'604800\']").attr("selected", "selected");
|
||||
$("#period_manual select option[value=\'604800\']").attr("selected", "selected");
|
||||
$("#period_manual select").val(604800);
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
if($("#chart_type").val() === "usage_map") {
|
||||
$("#data_to_show").show();
|
||||
$("#aggregated").hide();
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.776';
|
||||
$build = '240430';
|
||||
$build = '240506';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -1389,7 +1389,15 @@ if ($autosearch) {
|
|||
if ($result === false) {
|
||||
$result = [];
|
||||
} else {
|
||||
$tablePagination = ui_pagination($count, false, $offset, 0, true, 'offset', false);
|
||||
$tablePagination = ui_pagination(
|
||||
$count,
|
||||
'index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params,
|
||||
$offset,
|
||||
0,
|
||||
true,
|
||||
'offset',
|
||||
false
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// For each server defined and not disabled.
|
||||
|
@ -1460,7 +1468,15 @@ if ($autosearch) {
|
|||
$show_count = true;
|
||||
}
|
||||
|
||||
$tablePagination = ui_pagination($count_modules, false, $offset, 0, true, 'offset', $show_count);
|
||||
$tablePagination = ui_pagination(
|
||||
$count_modules,
|
||||
'index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params,
|
||||
$offset,
|
||||
0,
|
||||
true,
|
||||
'offset',
|
||||
$show_count
|
||||
);
|
||||
}
|
||||
|
||||
// Get number of elements of the pagination.
|
||||
|
@ -2337,7 +2353,15 @@ if (empty($result) === false) {
|
|||
$show_count = true;
|
||||
}
|
||||
|
||||
$tablePagination = ui_pagination($count_modules, false, $offset, 0, true, 'offset', $show_count);
|
||||
$tablePagination = ui_pagination(
|
||||
$count_modules,
|
||||
'index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params,
|
||||
$offset,
|
||||
0,
|
||||
true,
|
||||
'offset',
|
||||
$show_count
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (get_parameter('ag_group', false) !== false) {
|
||||
|
|
|
@ -46,6 +46,7 @@ $date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY);
|
|||
$date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less));
|
||||
$time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less));
|
||||
$datetime_init = strtotime($date_init.' '.$time_init);
|
||||
$date_units = get_parameter('utimestamp_units');
|
||||
if ($custom_date === '1') {
|
||||
if ($datetime_init >= $datetime_end) {
|
||||
$datetime_init = $date_init_less;
|
||||
|
@ -55,7 +56,6 @@ if ($custom_date === '1') {
|
|||
$date_end = date('Y/m/d H:i:s', $datetime_end);
|
||||
$period = ($datetime_end - $datetime_init);
|
||||
} else if ($custom_date === '2') {
|
||||
$date_units = get_parameter('utimestamp_units');
|
||||
$date_end = date('Y/m/d H:i:s');
|
||||
$date_init = date('Y/m/d H:i:s', (strtotime($date_end) - ((int) $date_text * (int) $date_units)));
|
||||
$period = (strtotime($date_end) - strtotime($date_init));
|
||||
|
@ -768,7 +768,14 @@ if (is_metaconsole() === false) {
|
|||
date('H:i:s', $date_init),
|
||||
date('Y/m/d', $utimestamp),
|
||||
date('H:i:s', $utimestamp),
|
||||
$date_text
|
||||
$date_text,
|
||||
'w100p',
|
||||
'Y/m/d',
|
||||
'H:i:s',
|
||||
'yy/mm/dd',
|
||||
'HH:mm:ss',
|
||||
'',
|
||||
$date_units
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -55,11 +55,12 @@ if (is_ajax()) {
|
|||
$search = io_safe_input($search_left);
|
||||
|
||||
// Agents.
|
||||
// Concatenate AW and AD permisions to get all the possible groups where the user can manage.
|
||||
// Concatenate AR, AW and AD permisions to get all the possible groups where the user can manage.
|
||||
$user_groupsAW = users_get_groups($config['id_user'], 'AW');
|
||||
$user_groupsAD = users_get_groups($config['id_user'], 'AD');
|
||||
$user_groupsAR = users_get_groups($config['id_user'], 'AR');
|
||||
|
||||
$user_groups = ($user_groupsAW + $user_groupsAD);
|
||||
$user_groups = ($user_groupsAW + $user_groupsAD + $user_groupsAR);
|
||||
$user_groups_to_sql = implode(',', array_keys($user_groups));
|
||||
|
||||
$search_sql = ' AND (nombre LIKE "%%'.$search.'%%" OR alias LIKE "%%'.$search.'%%")';
|
||||
|
@ -197,6 +198,9 @@ if (is_ajax()) {
|
|||
'graph_analytics' => true,
|
||||
];
|
||||
|
||||
// Included dependencies when is an ajax request.
|
||||
include_javascript_dependencies_flot_graph(false);
|
||||
|
||||
$graph_return = graphic_combined_module(
|
||||
$modules,
|
||||
$params,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.776-240430
|
||||
Version: 7.0NG.776-240506
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240430"
|
||||
pandora_version="7.0NG.776-240506"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -242,10 +242,8 @@ mta_address localhost
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
||||
# nmap: used to detect OS type with recon server using advanced OS fingerprint technique.
|
||||
# Nmap is also used to do TCP port scanning for host detection.
|
||||
nmap /usr/local/bin/nmap
|
||||
|
||||
# Default path is /usr/sbin/fping for installation default in distro Centos , if you are installing in other distribution,
|
||||
|
|
|
@ -238,10 +238,8 @@ mta_address localhost
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
||||
# nmap: used to detect OS type with recon server using advanced OS fingerprint technique.
|
||||
# Nmap is also used to do TCP port scanning for host detection.
|
||||
nmap /usr/pkg/bin/nmap
|
||||
|
||||
# Path to the fping binary. Used by the Enterprise ICMP Server.
|
||||
|
|
|
@ -308,10 +308,8 @@ dataserver_threads 1
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
||||
# nmap: used to detect OS type with recon server using advanced OS fingerprint technique.
|
||||
# Nmap is also used to do TCP port scanning for host detection.
|
||||
nmap /usr/bin/nmap
|
||||
|
||||
# Default path is /usr/sbin/fping for installation default in distro Centos , if you are installing in other distribution,
|
||||
|
|
|
@ -302,10 +302,8 @@ dataserver_threads 1
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
||||
# nmap: used to detect OS type with recon server using advanced OS fingerprint technique.
|
||||
# Nmap is also used to do TCP port scanning for host detection.
|
||||
nmap /usr/bin/nmap
|
||||
|
||||
# Default path is /usr/sbin/fping for installation default in distro Centos , if you are installing in other distribution,
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.776";
|
||||
my $pandora_build = "240430";
|
||||
my $pandora_build = "240506";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.776";
|
||||
my $pandora_build = "240430";
|
||||
my $pandora_build = "240506";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.776
|
||||
%define release 240430
|
||||
%define release 240506
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.776"
|
||||
PI_BUILD="240430"
|
||||
PI_BUILD="240506"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -38,7 +38,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.776 Build 240430";
|
||||
my $version = "7.0NG.776 Build 240506";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.776 Build 240430";
|
||||
my $version = "7.0NG.776 Build 240506";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue