Merge remote-tracking branch 'origin/develop' into ent-8075-Informe-de-acciones-de-alerta
This commit is contained in:
commit
75354a97d9
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.758.1-211126
|
Version: 7.0NG.758.1-211129
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.758.1-211126"
|
pandora_version="7.0NG.758.1-211129"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
|
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.758.1';
|
use constant AGENT_VERSION => '7.0NG.758.1';
|
||||||
use constant AGENT_BUILD => '211126';
|
use constant AGENT_BUILD => '211129';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758.1"
|
PI_VERSION="7.0NG.758.1"
|
||||||
PI_BUILD="211126"
|
PI_BUILD="211129"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{211126}
|
{211129}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.758.1 Build 211126")
|
#define PANDORA_VERSION ("7.0NG.758.1 Build 211129")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.758.1(Build 211126))"
|
VALUE "ProductVersion", "(7.0NG.758.1(Build 211129))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.758.1-211126
|
Version: 7.0NG.758.1-211129
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.758.1-211126"
|
pandora_version="7.0NG.758.1-211129"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -131,7 +131,7 @@ if (!empty($files)) {
|
||||||
$config_url = ui_get_full_url(
|
$config_url = ui_get_full_url(
|
||||||
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id
|
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id
|
||||||
);
|
);
|
||||||
$data[4] .= '<a href=\"$config_url\">';
|
$data[4] .= "<a href=\"$config_url\">";
|
||||||
$data[4] .= html_print_image(
|
$data[4] .= html_print_image(
|
||||||
'images/config.png',
|
'images/config.png',
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -1078,8 +1078,11 @@ if ($update_agent) {
|
||||||
// If IP is set for deletion, delete first.
|
// If IP is set for deletion, delete first.
|
||||||
if ($action_delete_ip) {
|
if ($action_delete_ip) {
|
||||||
$delete_ip = get_parameter_post('address_list');
|
$delete_ip = get_parameter_post('address_list');
|
||||||
|
if (empty($direccion_agente) === true) {
|
||||||
$direccion_agente = agents_delete_address($id_agente, $delete_ip);
|
$direccideon_agente = agents_delete_address($id_agente, $delete_ip);
|
||||||
|
} else {
|
||||||
|
agents_delete_address($id_agente, $delete_ip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = [
|
$values = [
|
||||||
|
|
|
@ -144,7 +144,7 @@ if ($prediction_available) {
|
||||||
$modules['predictionserver'] = __('Create a new prediction server module');
|
$modules['predictionserver'] = __('Create a new prediction server module');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($web_available) {
|
if (is_metaconsole() === true || $web_available === '1') {
|
||||||
$modules['webserver'] = __('Create a new web Server module');
|
$modules['webserver'] = __('Create a new web Server module');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,9 @@ html_print_div(
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/ajax/web_server_module_debug.php';
|
if (is_int($id_agent_module) && $id_agent_module !== 0) {
|
||||||
|
include_once $config['homedir'].'/include/ajax/web_server_module_debug.php';
|
||||||
|
}
|
||||||
|
|
||||||
define('ID_NETWORK_COMPONENT_TYPE', 7);
|
define('ID_NETWORK_COMPONENT_TYPE', 7);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ require_once $config['homedir'].'/include/functions_modules.php';
|
||||||
require_once $config['homedir'].'/include/functions_users.php';
|
require_once $config['homedir'].'/include/functions_users.php';
|
||||||
|
|
||||||
$pure = get_parameter('pure', 0);
|
$pure = get_parameter('pure', 0);
|
||||||
|
$agent_id = get_parameter('agent_id', 0);
|
||||||
|
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
$sec = 'advanced';
|
$sec = 'advanced';
|
||||||
|
@ -74,6 +75,11 @@ $params['input_name'] = 'agent_name';
|
||||||
$params['value'] = $agentName;
|
$params['value'] = $agentName;
|
||||||
$params['size'] = 24;
|
$params['size'] = 24;
|
||||||
$params['metaconsole_enabled'] = false;
|
$params['metaconsole_enabled'] = false;
|
||||||
|
$params['use_hidden_input_idagent'] = true;
|
||||||
|
$params['print_hidden_input_idagent'] = true;
|
||||||
|
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
|
||||||
|
$params['hidden_input_idagent_name'] = 'agent_id';
|
||||||
|
$params['hidden_input_idagent_value'] = $agent_id;
|
||||||
|
|
||||||
$form_filter .= ui_print_agent_autocomplete_input($params);
|
$form_filter .= ui_print_agent_autocomplete_input($params);
|
||||||
|
|
||||||
|
@ -234,7 +240,7 @@ if ($searchFlag) {
|
||||||
$id_agents = array_keys($agents);
|
$id_agents = array_keys($agents);
|
||||||
|
|
||||||
$total = agents_get_alerts_simple(
|
$total = agents_get_alerts_simple(
|
||||||
$id_agents,
|
(empty($agent_id) === false) ? ['0' => $agent_id] : $id_agents,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
$where,
|
$where,
|
||||||
|
@ -412,7 +418,7 @@ if ($id_agente) {
|
||||||
|
|
||||||
$offset = (int) get_parameter('offset');
|
$offset = (int) get_parameter('offset');
|
||||||
$simple_alerts = agents_get_alerts_simple(
|
$simple_alerts = agents_get_alerts_simple(
|
||||||
$id_agents,
|
(empty($agent_id) === false) ? ['0' => $agent_id] : $id_agents,
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
|
|
|
@ -290,7 +290,7 @@ if (is_array($config) === true
|
||||||
$config['history_db_host'],
|
$config['history_db_host'],
|
||||||
$config['history_db_name'],
|
$config['history_db_name'],
|
||||||
$config['history_db_user'],
|
$config['history_db_user'],
|
||||||
$config['history_db_pass'],
|
io_output_password($config['history_db_pass']),
|
||||||
$config['history_db_port']
|
$config['history_db_port']
|
||||||
);
|
);
|
||||||
ob_get_clean();
|
ob_get_clean();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC211126';
|
$build_version = 'PC211129';
|
||||||
$pandora_version = 'v7.0NG.758.1';
|
$pandora_version = 'v7.0NG.758.1';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
|
|
@ -421,12 +421,13 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
|
||||||
INNER JOIN tagente_modulo t2
|
INNER JOIN tagente_modulo t2
|
||||||
ON talert_template_modules.id_agent_module = t2.id_agente_modulo
|
ON talert_template_modules.id_agent_module = t2.id_agente_modulo
|
||||||
INNER JOIN tagente t3
|
INNER JOIN tagente t3
|
||||||
ON t2.id_agente = t3.id_agente
|
ON t2.id_agente = t3.id_agente %s
|
||||||
%s
|
%s
|
||||||
INNER JOIN talert_templates t4
|
INNER JOIN talert_templates t4
|
||||||
ON talert_template_modules.id_alert_template = t4.id
|
ON talert_template_modules.id_alert_template = t4.id
|
||||||
WHERE id_agent_module in (%s) %s %s %s',
|
WHERE id_agent_module in (%s) %s %s %s',
|
||||||
$selectText,
|
$selectText,
|
||||||
|
($id_agent !== false && is_array($id_agent)) ? 'AND t3.id_agente IN ('.implode(',', $id_agent).')' : '',
|
||||||
$secondary_join,
|
$secondary_join,
|
||||||
$subQuery,
|
$subQuery,
|
||||||
$where,
|
$where,
|
||||||
|
@ -434,8 +435,6 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
|
||||||
$orderbyText
|
$orderbyText
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case 'mysql':
|
|
||||||
$limit_sql = '';
|
$limit_sql = '';
|
||||||
if (isset($offset) && isset($limit)) {
|
if (isset($offset) && isset($limit)) {
|
||||||
$limit_sql = " LIMIT $offset, $limit ";
|
$limit_sql = " LIMIT $offset, $limit ";
|
||||||
|
@ -443,30 +442,6 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
|
||||||
|
|
||||||
$sql = sprintf('%s %s', $sql, $limit_sql);
|
$sql = sprintf('%s %s', $sql, $limit_sql);
|
||||||
$alerts = db_get_all_rows_sql($sql);
|
$alerts = db_get_all_rows_sql($sql);
|
||||||
break;
|
|
||||||
|
|
||||||
case 'postgresql':
|
|
||||||
$limit_sql = '';
|
|
||||||
if (isset($offset) && isset($limit)) {
|
|
||||||
$limit_sql = " OFFSET $offset LIMIT $limit ";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = sprintf('%s %s', $sql, $limit_sql);
|
|
||||||
|
|
||||||
$alerts = db_get_all_rows_sql($sql);
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'oracle':
|
|
||||||
$set = [];
|
|
||||||
if (isset($offset) && isset($limit)) {
|
|
||||||
$set['limit'] = $limit;
|
|
||||||
$set['offset'] = $offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
$alerts = oracle_recode_query($sql, $set, 'AND', false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($alerts === false) {
|
if ($alerts === false) {
|
||||||
return [];
|
return [];
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.758.1';
|
$version = '7.0NG.758.1';
|
||||||
$build = '211126';
|
$build = '211129';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -993,8 +993,14 @@ function install_step4()
|
||||||
|
|
||||||
$step5 = mysqli_query(
|
$step5 = mysqli_query(
|
||||||
$connection,
|
$connection,
|
||||||
"CREATE USER pandora@$host IDENTIFIED BY '".$random_password."'"
|
"CREATE USER IF NOT EXISTS pandora@$host"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
mysqli_query(
|
||||||
|
$connection,
|
||||||
|
"SET PASSWORD FOR 'pandora'@'".$host."' = '".$random_password."'"
|
||||||
|
);
|
||||||
|
|
||||||
$step5 |= mysqli_query(
|
$step5 |= mysqli_query(
|
||||||
$connection,
|
$connection,
|
||||||
"GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host"
|
"GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.758.1-211126
|
Version: 7.0NG.758.1-211129
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.758.1-211126"
|
pandora_version="7.0NG.758.1-211129"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.758.1";
|
my $pandora_version = "7.0NG.758.1";
|
||||||
my $pandora_build = "211126";
|
my $pandora_build = "211129";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.758.1";
|
my $pandora_version = "7.0NG.758.1";
|
||||||
my $pandora_build = "211126";
|
my $pandora_build = "211129";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.758.1
|
%define version 7.0NG.758.1
|
||||||
%define release 211126
|
%define release 211129
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758.1"
|
PI_VERSION="7.0NG.758.1"
|
||||||
PI_BUILD="211126"
|
PI_BUILD="211129"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.758.1 Build 211126";
|
my $version = "7.0NG.758.1 Build 211129";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.758.1 Build 211126";
|
my $version = "7.0NG.758.1 Build 211129";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
|
Loading…
Reference in New Issue