Merge branch 'develop' into 'ent-3407-Informes-en-IPAM'
# Conflicts: # pandora_console/extras/mr/50.sql
This commit is contained in:
commit
ca46285a0e
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.757
|
||||
Version: 7.0NG.757-210923
|
||||
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.757"
|
||||
pandora_version="7.0NG.757-210923"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.757';
|
||||
use constant AGENT_BUILD => '210913';
|
||||
use constant AGENT_BUILD => '210923';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.757"
|
||||
PI_BUILD="210913"
|
||||
PI_BUILD="210923"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{210913}
|
||||
{210923}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
|
|||
{No}
|
||||
|
||||
Windows,Executable
|
||||
{<%AppName%>-Setup<%Ext%>}
|
||||
{<%AppName%>-<%Version%>-Setup<%Ext%>}
|
||||
|
||||
Windows,FileDescription
|
||||
{<%AppName%> <%Version%> Setup}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.757 Build 210913")
|
||||
#define PANDORA_VERSION ("7.0NG.757 Build 210923")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.757(Build 210913))"
|
||||
VALUE "ProductVersion", "(7.0NG.757(Build 210923))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.757
|
||||
Version: 7.0NG.757-210923
|
||||
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.757"
|
||||
pandora_version="7.0NG.757-210923"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -6,5 +6,9 @@ ALTER TABLE `treport_content` ADD COLUMN `ipam_ip_not_assigned_to_agent` TINYINT
|
|||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_network_filter` int(10) UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_alive_ips` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `ipam_ip_not_assigned_to_agent` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `time_from` TIME NULL;
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `time_to` TIME NULL;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -710,6 +710,8 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` (
|
|||
ALTER TABLE `tevent_alert` ADD COLUMN `special_days` tinyint(1) default 0;
|
||||
ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL default 86400;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_alert_action`
|
||||
|
@ -1444,13 +1446,13 @@ ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default '';
|
|||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 48);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 49);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 756);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 757);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
|
||||
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
|
||||
|
|
|
@ -991,7 +991,7 @@ $email = '<div class="label_select_simple">'.html_print_input_text_extended(
|
|||
$view_mode,
|
||||
'',
|
||||
[
|
||||
'class' => 'input input_line email_icon_input invert_filter',
|
||||
'class' => 'input input_line email_icon_input',
|
||||
'placeholder' => __('E-mail'),
|
||||
],
|
||||
true
|
||||
|
|
|
@ -252,7 +252,9 @@ if ($save_event_filter) {
|
|||
$values['filter_only_alert'] = get_parameter('filter_only_alert');
|
||||
$values['id_group_filter'] = get_parameter('id_group_filter');
|
||||
$values['date_from'] = get_parameter('date_from');
|
||||
$values['time_from'] = get_parameter('time_from');
|
||||
$values['date_to'] = get_parameter('date_to');
|
||||
$values['time_to'] = get_parameter('time_to');
|
||||
$values['source'] = get_parameter('source');
|
||||
$values['id_extra'] = get_parameter('id_extra');
|
||||
$values['user_comment'] = get_parameter('user_comment');
|
||||
|
@ -304,13 +306,15 @@ if ($update_event_filter) {
|
|||
$values['filter_only_alert'] = get_parameter('filter_only_alert');
|
||||
$values['id_group_filter'] = get_parameter('id_group_filter');
|
||||
$values['date_from'] = get_parameter('date_from');
|
||||
$values['time_from'] = get_parameter('time_from');
|
||||
$values['date_to'] = get_parameter('date_to');
|
||||
$values['time_to'] = get_parameter('time_to');
|
||||
$values['source'] = get_parameter('source');
|
||||
$values['id_extra'] = get_parameter('id_extra');
|
||||
$values['user_comment'] = get_parameter('user_comment');
|
||||
$values['id_source_event'] = get_parameter('id_source_event');
|
||||
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$values['server_id'] = get_parameter('server_id');
|
||||
}
|
||||
|
||||
|
@ -355,7 +359,9 @@ if ($get_filter_values) {
|
|||
'id_extra' => '',
|
||||
'id_user_ack' => '',
|
||||
'date_from' => '',
|
||||
'time_from' => '',
|
||||
'date_to' => '',
|
||||
'time_to' => '',
|
||||
'severity' => '',
|
||||
'event_type' => '',
|
||||
'group_rep' => 0,
|
||||
|
@ -380,7 +386,7 @@ if ($get_filter_values) {
|
|||
}
|
||||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$server_name = db_get_value('server_name', 'tmetaconsole_setup', 'id', $event_filter['server_id']);
|
||||
if ($server_name !== false) {
|
||||
$event_filter['server_name'] = $server_name;
|
||||
|
@ -543,8 +549,12 @@ function load_form_filter() {
|
|||
$("#select2-server_id-container").text(val);
|
||||
if(i == 'date_from')
|
||||
$("#text-date_from").val(val);
|
||||
if(i == 'time_from')
|
||||
$("#text-time_from").val(val);
|
||||
if(i == 'date_to')
|
||||
$("#text-date_to").val(val);
|
||||
if(i == 'time_to')
|
||||
$("#text-time_to").val(val);
|
||||
if(i == 'module_search')
|
||||
$('input[name=module_search]').val(val);
|
||||
if(i == 'group_name')
|
||||
|
@ -767,7 +777,9 @@ function save_new_filter() {
|
|||
"filter_only_alert" : $("#filter_only_alert").val(),
|
||||
"id_group_filter": $("#id_group_filter").val(),
|
||||
"date_from": $("#text-date_from").val(),
|
||||
"time_from": $("#text-time_from").val(),
|
||||
"date_to": $("#text-date_to").val(),
|
||||
"time_to": $("#text-time_to").val(),
|
||||
"source": $("#text-source").val(),
|
||||
"id_extra": $("#text-id_extra").val(),
|
||||
"user_comment": $("#text-user_comment").val(),
|
||||
|
@ -838,7 +850,9 @@ function save_update_filter() {
|
|||
"filter_only_alert" : $("#filter_only_alert").val(),
|
||||
"id_group_filter": $("#id_group_filter").val(),
|
||||
"date_from": $("#text-date_from").val(),
|
||||
"time_from": $("#text-time_from").val(),
|
||||
"date_to": $("#text-date_to").val(),
|
||||
"time_to": $("#text-time_to").val(),
|
||||
"source": $("#text-source").val(),
|
||||
"id_extra": $("#text-id_extra").val(),
|
||||
"user_comment": $("#text-user_comment").val(),
|
||||
|
@ -1783,9 +1797,11 @@ if ($get_list_events_agents) {
|
|||
$tag_without = get_parameter('tag_without');
|
||||
$filter_only_alert = get_parameter('filter_only_alert');
|
||||
$date_from = get_parameter('date_from');
|
||||
$time_from = get_parameter('time_from', '00:00:00');
|
||||
$date_to = get_parameter('date_to');
|
||||
$time_to = get_parameter('time_to', '23:59:59');
|
||||
$id_user = $config['id_user'];
|
||||
|
||||
hd('hollllaa', true);
|
||||
$returned_sql = events_sql_events_grouped_agents(
|
||||
$id_agent,
|
||||
$server_id,
|
||||
|
@ -1800,7 +1816,9 @@ if ($get_list_events_agents) {
|
|||
$tag_without,
|
||||
$filter_only_alert,
|
||||
$date_from,
|
||||
$time_from,
|
||||
$date_to,
|
||||
$time_to,
|
||||
$id_user
|
||||
);
|
||||
|
||||
|
|
|
@ -770,7 +770,7 @@ function ldap_process_user_login($login, $password)
|
|||
io_safe_output($config['ldap_base_dn']),
|
||||
$config['ldap_login_attr'],
|
||||
io_safe_output($config['ldap_admin_login']),
|
||||
$config['ldap_admin_pass'],
|
||||
io_safe_output($config['ldap_admin_pass']),
|
||||
io_safe_output($login)
|
||||
);
|
||||
|
||||
|
|
|
@ -837,8 +837,11 @@ class ModuleTemplates extends HTML
|
|||
|
||||
$penInfo = db_get_all_rows_filter('tnetwork_profile_pen', ['id_np' => $this->id_np]);
|
||||
$penList = [];
|
||||
foreach ($penInfo as $pen) {
|
||||
$penList[] = $pen['pen'];
|
||||
// Handle if list of PEN does not exist or is empty.
|
||||
if ($penInfo !== false) {
|
||||
foreach ($penInfo as $pen) {
|
||||
$penList[] = $pen['pen'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->pen = implode(',', $penList);
|
||||
|
|
|
@ -40,7 +40,8 @@ class TreeTag extends Tree
|
|||
$this->L1orderByFinal = 'tt.name';
|
||||
|
||||
$this->L2condition = 'AND ttm.id_tag = '.$this->rootID;
|
||||
$this->L2inner = $this->L1innerInside;
|
||||
$this->L2inner = 'INNER JOIN ttag_module ttm
|
||||
ON ttm.id_agente_modulo = tam.id_agente_modulo';
|
||||
|
||||
$this->L3forceTagCondition = true;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC210913';
|
||||
$build_version = 'PC210923';
|
||||
$pandora_version = 'v7.0NG.757';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -3299,8 +3299,10 @@ function extract_column($array, $column)
|
|||
|
||||
function get_percentile($percentile, $array)
|
||||
{
|
||||
global $config;
|
||||
|
||||
sort($array);
|
||||
$index = (($percentile / 100) * count($array));
|
||||
$index = (($config['percentil'] / 100) * count($array));
|
||||
|
||||
if (floor($index) == $index) {
|
||||
$result = (($array[($index - 1)] + $array[$index]) / 2);
|
||||
|
|
|
@ -5777,10 +5777,6 @@ function api_set_create_alert_template($name, $thrash1, $other, $thrash3)
|
|||
{
|
||||
global $config;
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
$headers = getallheaders();
|
||||
if (isset($headers['idk']) === false
|
||||
&& is_management_allowed($headers['idk']) === false
|
||||
|
@ -16733,9 +16729,15 @@ function api_get_group_id_by_name($thrash1, $thrash2, $other, $thrash3)
|
|||
return;
|
||||
}
|
||||
|
||||
if (is_array($other['data']) === true) {
|
||||
$group_id = $other['data'][0];
|
||||
} else {
|
||||
$group_id = $other['data'];
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'SELECT id_grupo
|
||||
FROM tgrupo WHERE nombre = "'.$other['data'].'"'
|
||||
FROM tgrupo WHERE nombre = "'.$group_id.'"'
|
||||
);
|
||||
|
||||
$group_id = db_get_all_rows_sql($sql);
|
||||
|
|
|
@ -620,7 +620,7 @@ function config_update_config()
|
|||
$error_update[] = __('Admin LDAP login');
|
||||
}
|
||||
|
||||
if (!config_update_value('ldap_admin_pass', io_input_password(get_parameter('ldap_admin_pass')))) {
|
||||
if (!config_update_value('ldap_admin_pass', get_parameter('ldap_admin_pass'))) {
|
||||
$error_update[] = __('Admin LDAP password');
|
||||
}
|
||||
|
||||
|
|
|
@ -762,7 +762,7 @@ function events_get_all(
|
|||
}
|
||||
|
||||
if (isset($filter['time_from'])) {
|
||||
$time_from = $filter['time_from'];
|
||||
$time_from = (empty($filter['time_from']) === true) ? '00:00:00' : $filter['time_from'];
|
||||
}
|
||||
|
||||
if (isset($date_from)) {
|
||||
|
@ -785,7 +785,7 @@ function events_get_all(
|
|||
}
|
||||
|
||||
if (isset($filter['time_to'])) {
|
||||
$time_to = $filter['time_to'];
|
||||
$time_to = (empty($filter['time_to']) === true) ? '23:59:59' : $filter['time_to'];
|
||||
}
|
||||
|
||||
if (isset($date_to)) {
|
||||
|
@ -6193,7 +6193,9 @@ function events_get_events_grouped_by_agent(
|
|||
* @param array $tag_without Tag_without.
|
||||
* @param boolean $filter_only_alert Filter_only_alert.
|
||||
* @param string $date_from Date_from.
|
||||
* @param string $time_from Time_from.
|
||||
* @param string $date_to Date_to.
|
||||
* @param string $time_to Time_to.
|
||||
* @param boolean $id_user Id_user.
|
||||
* @param boolean $server_id_search Server_id_search.
|
||||
*
|
||||
|
@ -6213,7 +6215,9 @@ function events_sql_events_grouped_agents(
|
|||
$tag_without=[],
|
||||
$filter_only_alert=false,
|
||||
$date_from='',
|
||||
$time_from='',
|
||||
$date_to='',
|
||||
$time_to='',
|
||||
$id_user=false,
|
||||
$server_id_search=false
|
||||
) {
|
||||
|
@ -6320,27 +6324,35 @@ function events_sql_events_grouped_agents(
|
|||
$sql_post .= " AND id_usuario = '".$id_user_ack."'";
|
||||
}
|
||||
|
||||
if (!isset($date_from)) {
|
||||
if (isset($date_from) === false) {
|
||||
$date_from = '';
|
||||
}
|
||||
|
||||
if (!isset($date_to)) {
|
||||
if (isset($time_from) === false) {
|
||||
$time_from = '00:00:00';
|
||||
}
|
||||
|
||||
if (isset($date_to) === false) {
|
||||
$date_to = '';
|
||||
}
|
||||
|
||||
if (isset($time_to) === false || empty($time_to) === true) {
|
||||
$time_to = '23:59:59';
|
||||
}
|
||||
|
||||
if (($date_from == '') && ($date_to == '')) {
|
||||
if ($event_view_hr > 0) {
|
||||
$unixtime = (get_system_time() - ($event_view_hr * SECONDS_1HOUR));
|
||||
$sql_post .= ' AND (utimestamp > '.$unixtime.')';
|
||||
}
|
||||
} else {
|
||||
if ($date_from != '') {
|
||||
$udate_from = strtotime($date_from.' 00:00:00');
|
||||
if (empty($date_from) === false) {
|
||||
$udate_from = strtotime($date_from.' '.$time_from);
|
||||
$sql_post .= ' AND (utimestamp >= '.$udate_from.')';
|
||||
}
|
||||
|
||||
if ($date_to != '') {
|
||||
$udate_to = strtotime($date_to.' 23:59:59');
|
||||
if (empty($date_to) === false) {
|
||||
$udate_to = strtotime($date_to.' '.$time_to);
|
||||
$sql_post .= ' AND (utimestamp <= '.$udate_to.')';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1935,7 +1935,7 @@ function html_print_extended_select_for_time(
|
|||
|
||||
ob_start();
|
||||
// Use the no_meta parameter because this image is only in the base console.
|
||||
echo '<div id="'.$uniq_name.'_default" class="wauto inline_line">';
|
||||
echo '<div id="'.$uniq_name.'_default" class="wauto inline_flex">';
|
||||
html_print_select(
|
||||
$fields,
|
||||
$uniq_name.'_select',
|
||||
|
@ -4814,7 +4814,11 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||
((isset($data['size']) === true) ? $data['size'] : false),
|
||||
((isset($data['return']) === true) ? $data['return'] : false),
|
||||
((isset($data['style']) === true) ? $data['selected'] : false),
|
||||
((isset($data['unique']) === true) ? $data['unique'] : false)
|
||||
((isset($data['unique']) === true) ? $data['unique'] : false),
|
||||
((isset($data['class']) === true) ? $data['class'] : ''),
|
||||
((isset($data['readonly']) === true) ? $data['readonly'] : false),
|
||||
((isset($data['custom_fields']) === true) ? $data['custom_fields'] : false),
|
||||
((isset($data['style_icon']) === true) ? $data['style_icon'] : '')
|
||||
);
|
||||
break;
|
||||
|
||||
|
|
|
@ -705,7 +705,7 @@ function tags_get_tags_formatted($tags_array, $get_url=true)
|
|||
$tags = [];
|
||||
foreach ($tags_array as $t) {
|
||||
$tag_url = explode(' ', trim($t));
|
||||
$tag = $tag_url[0];
|
||||
$tag = io_safe_output($tag_url[0]);
|
||||
if (isset($tag_url[1]) && $tag_url[1] != '' && $get_url) {
|
||||
$title = $tag_url[1];
|
||||
// $link = '<a href="'.$tag_url[1].'" target="_blank">'.html_print_image('images/zoom.png',true, array('alt' => $title, 'title' => $title)).'</a>';
|
||||
|
|
|
@ -5738,7 +5738,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||
}
|
||||
|
||||
$attrs = [];
|
||||
$attrs['style'] = 'background: url('.$icon_image.') no-repeat right; '.$text_color.'';
|
||||
$attrs['style'] = 'padding-right: 20px; background: url('.$icon_image.') no-repeat right; '.$text_color.'';
|
||||
|
||||
if (!$disabled_javascript_on_blur_function) {
|
||||
$attrs['onblur'] = $javascript_on_blur_function_name.'()';
|
||||
|
|
|
@ -354,6 +354,7 @@ class CustomGraphWidget extends Widget
|
|||
'value' => $values['period'],
|
||||
'nothing' => __('None'),
|
||||
'nothing_value' => 0,
|
||||
'style_icon' => 'flex-grow: 0',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -325,6 +325,8 @@ class GraphModuleHistogramWidget extends Widget
|
|||
'value' => $values['period'],
|
||||
'nothing' => __('None'),
|
||||
'nothing_value' => 0,
|
||||
'style_icon' => 'flex-grow: 0',
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -310,6 +310,7 @@ class SingleGraphWidget extends Widget
|
|||
'value' => $values['period'],
|
||||
'nothing' => __('None'),
|
||||
'nothing_value' => 0,
|
||||
'style_icon' => 'flex-grow: 0',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -335,6 +335,7 @@ class SLAPercentWidget extends Widget
|
|||
'value' => $values['period'],
|
||||
'nothing' => __('None'),
|
||||
'nothing_value' => 0,
|
||||
'style_icon' => 'flex-grow: 0',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -240,6 +240,7 @@ class TopNWidget extends Widget
|
|||
'value' => $values['period'],
|
||||
'nothing' => __('None'),
|
||||
'nothing_value' => 0,
|
||||
'style_icon' => 'flex-grow: 0',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -379,6 +379,11 @@ final class Percentile extends Item
|
|||
|
||||
$moduleValue = \modules_get_last_value($moduleId);
|
||||
if ($moduleValue === false) {
|
||||
// Restore connection.
|
||||
if ($nodeConnected === true) {
|
||||
\metaconsole_restore_db();
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException(
|
||||
'error fetching the module value'
|
||||
);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.query_result_view_container {
|
||||
|
|
|
@ -166,7 +166,6 @@ div.target.flex {
|
|||
text-align: center;
|
||||
}
|
||||
div#rules::after {
|
||||
content: "Drop Here";
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 2em auto;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.757';
|
||||
$build = '210913';
|
||||
$build = '210923';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -765,7 +765,7 @@ if (is_ajax()) {
|
|||
|
||||
$result = [];
|
||||
foreach ($last_modules_set as $module_name => $module_data) {
|
||||
$value = ui_print_truncate_text(io_safe_output($module_name), 'module_medium', false, true);
|
||||
$value = ui_print_truncate_text(io_safe_output($module_name), 'module_medium', false, true, false, '...');
|
||||
|
||||
$module_data_processed = array_map(
|
||||
function ($item) {
|
||||
|
@ -863,10 +863,12 @@ if (is_ajax()) {
|
|||
io_safe_output($nameModule['nombre']),
|
||||
'module_medium',
|
||||
false,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
'...'
|
||||
);
|
||||
} else {
|
||||
$result[io_safe_output($nameModule['nombre']).'$*$'.implode('|', $idAgents)] = ui_print_truncate_text(io_safe_output($nameModule['nombre']), 'module_medium', false, true);
|
||||
$result[io_safe_output($nameModule['nombre']).'$*$'.implode('|', $idAgents)] = ui_print_truncate_text(io_safe_output($nameModule['nombre']), 'module_medium', false, true, false, '...');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ $access = ($event_a == true) ? 'ER' : (($event_w == true) ? 'EW' : (($event_m ==
|
|||
|
||||
|
||||
$readonly = false;
|
||||
if (!is_metaconsole()
|
||||
if (is_metaconsole() === false
|
||||
&& isset($config['event_replication'])
|
||||
&& $config['event_replication'] == 1
|
||||
&& $config['show_events_in_local'] == 1
|
||||
|
@ -82,7 +82,7 @@ if (!is_metaconsole()
|
|||
// Load specific stylesheet.
|
||||
ui_require_css_file('events');
|
||||
ui_require_css_file('tables');
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
ui_require_css_file('tables_meta', ENTERPRISE_DIR.'/include/styles/');
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ $section = get_parameter('section', false);
|
|||
|
||||
$id_source_event = get_parameter(
|
||||
'filter[id_source_event]',
|
||||
$filter['id_source_event']
|
||||
($filter['id_source_event'] ?? '')
|
||||
);
|
||||
|
||||
$server_id = get_parameter(
|
||||
|
@ -224,7 +224,7 @@ $server_id = get_parameter(
|
|||
$filter['id_server_meta']
|
||||
);
|
||||
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
// Connect to node database.
|
||||
$id_node = $server_id;
|
||||
if ($id_node != 0) {
|
||||
|
@ -235,16 +235,16 @@ if (is_metaconsole()) {
|
|||
}
|
||||
|
||||
|
||||
if (empty($text_agent) && !empty($id_agent)) {
|
||||
if (empty($text_agent) && empty($id_agent) === false) {
|
||||
$text_agent = agents_get_alias($id_agent);
|
||||
}
|
||||
|
||||
if (empty($text_module) && !empty($id_agent_module)) {
|
||||
if (empty($text_module) && empty($id_agent_module) === false) {
|
||||
$text_module = modules_get_agentmodule_name($id_agent_module);
|
||||
$text_agent = agents_get_alias(modules_get_agentmodule_agent($id_agent_module));
|
||||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
// Return to metaconsole database.
|
||||
if ($id_node != 0) {
|
||||
metaconsole_restore_db();
|
||||
|
@ -252,7 +252,7 @@ if (is_metaconsole()) {
|
|||
}
|
||||
|
||||
// Ajax responses.
|
||||
if (is_ajax()) {
|
||||
if (is_ajax() === true) {
|
||||
$get_events = get_parameter('get_events', 0);
|
||||
// Datatables offset, limit.
|
||||
$start = get_parameter('start', 0);
|
||||
|
@ -263,7 +263,7 @@ if (is_ajax()) {
|
|||
ob_start();
|
||||
$order = get_datatable_order(true);
|
||||
|
||||
if (is_array($order) && $order['field'] == 'mini_severity') {
|
||||
if (is_array($order) === true && $order['field'] === 'mini_severity') {
|
||||
$order['field'] = 'te.criticity';
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,8 @@ if (is_ajax()) {
|
|||
'tg.nombre as group_name',
|
||||
'ta.direccion',
|
||||
];
|
||||
if (!is_metaconsole()) {
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
$fields[] = 'am.nombre as module_name';
|
||||
$fields[] = 'am.id_agente_modulo as id_agentmodule';
|
||||
$fields[] = 'am.custom_id as module_custom_id';
|
||||
|
@ -509,11 +510,13 @@ if ($loaded_filter !== false && $from_event_graph != 1) {
|
|||
$filter_only_alert = $filter['filter_only_alert'];
|
||||
$id_group_filter = $filter['id_group_filter'];
|
||||
$date_from = $filter['date_from'];
|
||||
$time_from = $filter['time_from'];
|
||||
$date_to = $filter['date_to'];
|
||||
$time_to = $filter['time_to'];
|
||||
$source = $filter['source'];
|
||||
$id_extra = $filter['id_extra'];
|
||||
$user_comment = $filter['user_comment'];
|
||||
$id_source_event = $filter['id_source_event'];
|
||||
$id_source_event = ($filter['id_source_event'] ?? '');
|
||||
$server_id = $filter['server_id'];
|
||||
}
|
||||
}
|
||||
|
@ -565,7 +568,7 @@ $tabletags_with->cellspacing = 4;
|
|||
$tabletags_with->cellpadding = 4;
|
||||
$tabletags_with->class = 'noshadow';
|
||||
$tabletags_with->styleTable = 'border: 0px;';
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$tabletags_with->class = 'nobady';
|
||||
$tabletags_with->cellspacing = 0;
|
||||
$tabletags_with->cellpadding = 0;
|
||||
|
@ -642,7 +645,7 @@ $tabletags_without->width = '100%';
|
|||
$tabletags_without->cellspacing = 4;
|
||||
$tabletags_without->cellpadding = 4;
|
||||
$tabletags_without->class = 'noshadow';
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$tabletags_without->class = 'nobady';
|
||||
$tabletags_without->cellspacing = 0;
|
||||
$tabletags_without->cellpadding = 0;
|
||||
|
@ -781,7 +784,7 @@ if ($pure) {
|
|||
// Floating menu - End.
|
||||
ui_require_jquery_file('countdown');
|
||||
} else {
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
// Load metaconsole frame.
|
||||
enterprise_hook('open_meta_frame');
|
||||
}
|
||||
|
@ -892,7 +895,7 @@ if ($pure) {
|
|||
}
|
||||
|
||||
// If the history event is not enabled, dont show the history tab.
|
||||
if (!isset($config['metaconsole_events_history']) || $config['metaconsole_events_history'] != 1) {
|
||||
if (isset($config['metaconsole_events_history']) === false || $config['metaconsole_events_history'] != 1) {
|
||||
unset($onheader['history']);
|
||||
}
|
||||
|
||||
|
@ -913,7 +916,7 @@ if ($pure) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (! defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === false) {
|
||||
unset($onheader['history']);
|
||||
ui_print_page_header(
|
||||
__('Events'),
|
||||
|
@ -974,13 +977,16 @@ if (enterprise_installed() === true) {
|
|||
}
|
||||
|
||||
// Error div for ajax messages.
|
||||
echo "<div id='show_message_error'>";
|
||||
echo '</div>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'show_message_error',
|
||||
'content' => '',
|
||||
]
|
||||
);
|
||||
|
||||
// Controls.
|
||||
if (is_metaconsole() !== true) {
|
||||
if (isset($config['event_replication'])
|
||||
if (isset($config['event_replication']) === true
|
||||
&& $config['event_replication'] == 1
|
||||
) {
|
||||
if ($config['show_events_in_local'] == 0) {
|
||||
|
@ -1095,7 +1101,7 @@ $in = '<div class="filter_input"><label>'.__('Free search').'</label>';
|
|||
$in .= $data.'</div>';
|
||||
$inputs[] = $in;
|
||||
|
||||
if (empty($severity) && $severity !== '0') {
|
||||
if (empty($severity) === true && $severity !== '0') {
|
||||
$severity = -1;
|
||||
}
|
||||
|
||||
|
@ -1207,7 +1213,7 @@ $in .= $data.'</div>';
|
|||
$adv_inputs[] = $in;
|
||||
|
||||
// Mixed. Metaconsole => server, Console => module.
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$title = __('Server');
|
||||
$data = html_print_select_from_sql(
|
||||
'SELECT id, server_name FROM tmetaconsole_setup',
|
||||
|
@ -1270,16 +1276,20 @@ $data = html_print_select(
|
|||
-1,
|
||||
true
|
||||
);
|
||||
$in = '<div class="filter_input"><label>'.__('Alert events').'</label>';
|
||||
$in .= $data.'</div>';
|
||||
$adv_inputs[] = $in;
|
||||
|
||||
if (is_metaconsole()) {
|
||||
if (empty($id_source_event) === true) {
|
||||
$id_source_event = '';
|
||||
}
|
||||
$adv_inputs[] = html_print_div(
|
||||
[
|
||||
'class' => 'filter_input',
|
||||
'content' => sprintf(
|
||||
'<label>%s</label>%s',
|
||||
__('Alert events'),
|
||||
$data
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$input_id_source_event = (empty($id_source_event) === true) ? '' : $id_source_event;
|
||||
if (is_metaconsole() === true) {
|
||||
$data = html_print_input_text(
|
||||
'id_source_event',
|
||||
$id_source_event,
|
||||
|
@ -1288,19 +1298,24 @@ if (is_metaconsole()) {
|
|||
255,
|
||||
true
|
||||
);
|
||||
$in = '<div class="filter_input"><label>'.__('Id source event').'</label>';
|
||||
$in .= $data.'</div>';
|
||||
$adv_inputs[] = $in;
|
||||
}
|
||||
|
||||
if ($date_from === '0000-00-00') {
|
||||
$date_from = '';
|
||||
$adv_inputs[] = html_print_div(
|
||||
[
|
||||
'class' => 'filter_input',
|
||||
'content' => sprintf(
|
||||
'<label>%s</label>%s',
|
||||
__('Id source event'),
|
||||
$data
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Date from.
|
||||
$data = html_print_input_text(
|
||||
$inputDateFrom = html_print_input_text(
|
||||
'date_from',
|
||||
$date_from,
|
||||
($date_from === '0000-00-00') ? '' : $date_from,
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
|
@ -1318,22 +1333,69 @@ $data = html_print_input_text(
|
|||
// Autocomplete.
|
||||
'off'
|
||||
);
|
||||
$in = '<div class="filter_input">';
|
||||
$in .= '<div class="filter_input_little"><label>'.__('Date from').'</label>';
|
||||
$in .= $data.'</div>';
|
||||
|
||||
$data = '';
|
||||
$in .= $data.'</div>';
|
||||
$adv_inputs[] = $in;
|
||||
// Time from.
|
||||
$inputTimeFrom = html_print_input_text(
|
||||
'time_from',
|
||||
$time_from,
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
true,
|
||||
// Disabled.
|
||||
false,
|
||||
// Required.
|
||||
false,
|
||||
// Function.
|
||||
'',
|
||||
// Class.
|
||||
'',
|
||||
// OnChange.
|
||||
'',
|
||||
// Autocomplete.
|
||||
'off'
|
||||
);
|
||||
|
||||
if ($date_to === '0000-00-00') {
|
||||
$date_to = '';
|
||||
}
|
||||
// Date and Time From.
|
||||
$adv_inputs[] = html_print_div(
|
||||
[
|
||||
'class' => 'filter_input',
|
||||
'content' => sprintf(
|
||||
'<label>%s</label>%s<span>:</span>%s',
|
||||
__('From (date:time)'),
|
||||
$inputDateFrom,
|
||||
$inputTimeFrom
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Time to.
|
||||
$inputTimeTo = html_print_input_text(
|
||||
'time_to',
|
||||
$time_to,
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
true,
|
||||
// Disabled.
|
||||
false,
|
||||
// Required.
|
||||
false,
|
||||
// Function.
|
||||
'',
|
||||
// Class.
|
||||
'',
|
||||
// OnChange.
|
||||
'',
|
||||
// Autocomplete.
|
||||
'off'
|
||||
);
|
||||
|
||||
// Date to.
|
||||
$data = html_print_input_text(
|
||||
$inputDateTo = html_print_input_text(
|
||||
'date_to',
|
||||
$date_to,
|
||||
($date_to === '0000-00-00') ? '' : $date_to,
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
|
@ -1351,16 +1413,23 @@ $data = html_print_input_text(
|
|||
// Autocomplete.
|
||||
'off'
|
||||
);
|
||||
$in = '<div class="filter_input">';
|
||||
$in .= '<div class="filter_input_little"><label>'.__('Date to').'</label>';
|
||||
$in .= $data.'</div>';
|
||||
|
||||
$data = '';
|
||||
$in .= $data.'</div>';
|
||||
$adv_inputs[] = $in;
|
||||
// Date and Time To.
|
||||
$adv_inputs[] = html_print_div(
|
||||
[
|
||||
'class' => 'filter_input',
|
||||
'content' => sprintf(
|
||||
'<label>%s</label>%s<span>:</span>%s',
|
||||
__('To (date:time)'),
|
||||
$inputDateTo,
|
||||
$inputTimeTo
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Tags.
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$data = '<fieldset><legend class="pdd_0px">'.__('Events with following tags').'</legend>'.html_print_table($tabletags_with, true).'</fieldset>';
|
||||
$data .= '<fieldset><legend class="pdd_0px">'.__('Events without following tags').'</legend>'.html_print_table($tabletags_without, true).'</fieldset>';
|
||||
} else {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -3015,6 +3015,8 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` (
|
|||
`group_by` enum ('','id_agente','id_agentmodule','id_alert_am','id_grupo') default '',
|
||||
`special_days` tinyint(1) default 0,
|
||||
`disable_event` tinyint(1) default 0,
|
||||
`id_template_conditions` int(10) unsigned NOT NULL default 0,
|
||||
`id_template_fields` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('MR', 49),
|
||||
('identification_reminder', 1),
|
||||
('identification_reminder_timestamp', 0),
|
||||
('current_package', 756),
|
||||
('current_package', 757),
|
||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||
('custom_docs_logo', 'default_docs.png'),
|
||||
('custom_support_logo', 'default_support.png'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.757
|
||||
Version: 7.0NG.757-210923
|
||||
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.757"
|
||||
pandora_version="7.0NG.757-210923"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -540,11 +540,6 @@ dataserver_lifo 0
|
|||
|
||||
policy_manager 1
|
||||
|
||||
# If set to 1, the event replicate process is enabled. 0 by default. (PANDORA FMS ENTERPRISE ONLY)
|
||||
# WARNING: This process doesn't do anything if is not properly configured from the console setup
|
||||
|
||||
event_replication 0
|
||||
|
||||
# If set to 1, new events validate older event for the same module. This will
|
||||
# affect the performance of the server. This was the "normal behaviour" on previous (4.x) versions.
|
||||
# disable only if you really know what you are doing !!.
|
||||
|
|
|
@ -446,11 +446,6 @@ dataserver_lifo 0
|
|||
|
||||
policy_manager 1
|
||||
|
||||
# If set to 1, the event replicate process is enabled. 0 by default. (PANDORA FMS ENTERPRISE ONLY)
|
||||
# WARNING: This process doesn't do anything if is not properly configured from the console setup
|
||||
|
||||
event_replication 0
|
||||
|
||||
# If set to 1, new events validate older event for the same module. This will
|
||||
# affect the performance of the server. This was the "normal behaviour" on previous (4.x) versions.
|
||||
# disable only if you really know what you are doing !!.
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.757";
|
||||
my $pandora_build = "210913";
|
||||
my $pandora_build = "210923";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -172,6 +172,8 @@ sub pandora_get_sharedconfig ($$) {
|
|||
|
||||
$pa_config->{"use_custom_encoding"} = pandora_get_tconfig_token ($dbh, 'use_custom_encoding', 0);
|
||||
|
||||
$pa_config->{"event_replication"} = pandora_get_tconfig_token ($dbh, 'event_replication', 0);
|
||||
|
||||
if ($pa_config->{'include_agents'} eq '') {
|
||||
$pa_config->{'include_agents'} = 0;
|
||||
}
|
||||
|
@ -1043,9 +1045,6 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^policy_manager\s+([0-1])/i) {
|
||||
$pa_config->{'policy_manager'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^event_replication\s+([0-1])/i) {
|
||||
$pa_config->{'event_replication'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^event_auto_validation\s+([0-1])/i) {
|
||||
$pa_config->{'event_auto_validation'}= clean_blank($1);
|
||||
}
|
||||
|
|
|
@ -1381,6 +1381,13 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||
|
||||
# Address
|
||||
$field1 = subst_alert_macros ($field1, \%macros, $pa_config, $dbh, $agent, $module, $alert);
|
||||
|
||||
# Simple email address validation. Prevents connections to the SMTP server when no address is provided.
|
||||
if (index($field1, '@') == -1) {
|
||||
logger($pa_config, "No valid email address provided for action '" . $action->{'name'} . "' alert '". $alert->{'name'} . "' agent '" . (defined ($agent) ? $agent->{'alias'} : 'N/A') . "'.", 10);
|
||||
return;
|
||||
}
|
||||
|
||||
# Subject
|
||||
$field2 = subst_alert_macros ($field2, \%macros, $pa_config, $dbh, $agent, $module, $alert);
|
||||
# Message
|
||||
|
@ -4828,23 +4835,23 @@ sub generate_status_event ($$$$$$$$) {
|
|||
}
|
||||
|
||||
($event_type, $severity) = ('going_down_normal', 2);
|
||||
$description = $pa_config->{"text_going_down_normal"};
|
||||
$description = safe_output($pa_config->{"text_going_down_normal"});
|
||||
# Critical
|
||||
} elsif ($status == 1) {
|
||||
($event_type, $severity) = ('going_up_critical', 4);
|
||||
$description = $pa_config->{"text_going_up_critical"};
|
||||
$description = safe_output($pa_config->{"text_going_up_critical"});
|
||||
# Warning
|
||||
} elsif ($status == 2) {
|
||||
|
||||
# From critical
|
||||
if ($known_status == 1) {
|
||||
($event_type, $severity) = ('going_down_warning', 3);
|
||||
$description = $pa_config->{"text_going_down_warning"};
|
||||
$description = safe_output($pa_config->{"text_going_down_warning"});
|
||||
}
|
||||
# From normal or warning (after becoming unknown)
|
||||
else {
|
||||
($event_type, $severity) = ('going_up_warning', 3);
|
||||
$description = $pa_config->{"text_going_up_warning"};
|
||||
$description = safe_output($pa_config->{"text_going_up_warning"});
|
||||
}
|
||||
} else {
|
||||
# Unknown status
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.757";
|
||||
my $pandora_build = "210913";
|
||||
my $pandora_build = "210923";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.757
|
||||
%define release 1
|
||||
%define release 210923
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.757"
|
||||
PI_BUILD="210913"
|
||||
PI_BUILD="210923"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.757 Build 210913";
|
||||
my $version = "7.0NG.757 Build 210923";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.757 Build 210913";
|
||||
my $version = "7.0NG.757 Build 210923";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
|
@ -567,6 +567,10 @@ export default class VisualConsole {
|
|||
|
||||
Object.keys(this.lineLinks[item.id]).forEach(i => {
|
||||
let lineId = parseInt(i);
|
||||
const found = this.elementIds.indexOf(lineId);
|
||||
if (found === -1) {
|
||||
return;
|
||||
}
|
||||
let line = this.elementsById[lineId] as Line;
|
||||
if (line.props) {
|
||||
let startX = line.props.startPosition.x;
|
||||
|
|
Loading…
Reference in New Issue