Merge remote-tracking branch 'origin/develop' into ent-3013-ipam-modo-configuracion-de-vlan

Former-commit-id: a23fffb984a6edd4ef7eefe871814ea0120c615a
This commit is contained in:
daniel 2019-01-23 11:08:48 +01:00
commit 841a9cf60b
26 changed files with 81 additions and 49 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.730-190122
Version: 7.0NG.730-190123
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.730';
use constant AGENT_BUILD => '190122';
use constant AGENT_BUILD => '190123';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.730"
PI_BUILD="190122"
PI_BUILD="190123"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{190122}
{190123}
ViewReadme
{Yes}

View File

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

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.730(Build 190122))"
VALUE "ProductVersion", "(7.0NG.730(Build 190123))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.730-190122
Version: 7.0NG.730-190123
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC190122';
$build_version = 'PC190123';
$pandora_version = 'v7.0NG.730';
// Do not overwrite default timezone set if defined.

View File

@ -2710,7 +2710,7 @@ function events_clean_tags ($tags) {
*/
function events_get_count_events_by_agent ($id_group, $period, $date,
$filter_event_severity = false, $filter_event_type = false,
$filter_event_status = false, $filter_event_filter_search = false) {
$filter_event_status = false, $filter_event_filter_search = false, $dbmeta = false) {
global $config;
@ -2802,16 +2802,22 @@ function events_get_count_events_by_agent ($id_group, $period, $date,
' OR id_evento LIKE "%' . io_safe_input($filter_event_filter_search) . '%")';
}
$tagente = 'tagente';
$tevento = 'tevento';
if($dbmeta){
$tagente = 'tmetaconsole_agent';
$tevento = 'tmetaconsole_event';
}
$sql = sprintf ('SELECT id_agente,
(SELECT t2.alias
FROM tagente t2
FROM %s t2
WHERE t2.id_agente = t3.id_agente) AS agent_name,
COUNT(*) AS count
FROM tevento t3
FROM %s t3
WHERE utimestamp > %d AND utimestamp <= %d
AND id_grupo IN (%s) %s
GROUP BY id_agente',
$datelimit, $date, implode (",", $id_group), $sql_where);
$tagente, $tevento, $datelimit, $date, implode (",", $id_group), $sql_where);
$rows = db_get_all_rows_sql ($sql);
@ -2843,7 +2849,7 @@ function events_get_count_events_by_agent ($id_group, $period, $date,
*/
function events_get_count_events_validated_by_user ($filter, $period, $date,
$filter_event_severity = false, $filter_event_type = false,
$filter_event_status = false, $filter_event_filter_search = false) {
$filter_event_status = false, $filter_event_filter_search = false, $dbmeta = false) {
global $config;
//group
$sql_filter = ' AND 1=1 ';
@ -2949,16 +2955,20 @@ function events_get_count_events_validated_by_user ($filter, $period, $date,
' OR id_evento LIKE "%' . io_safe_input($filter_event_filter_search) . '%")';
}
$tevento = 'tevento';
if($dbmeta)
$tevento = 'tmetaconsole_event';
$sql = sprintf ('SELECT id_usuario,
(SELECT t2.fullname
FROM tusuario t2
WHERE t2.id_user = t3.id_usuario) AS user_name,
COUNT(*) AS count
FROM tevento t3
FROM %s t3
WHERE utimestamp > %d AND utimestamp <= %d
%s %s
GROUP BY id_usuario',
$datelimit, $date, $sql_filter, $sql_where);
$tevento, $datelimit, $date, $sql_filter, $sql_where);
$rows = db_get_all_rows_sql ($sql);
if ($rows == false)
@ -2988,7 +2998,7 @@ function events_get_count_events_validated_by_user ($filter, $period, $date,
*/
function events_get_count_events_by_criticity ($filter, $period, $date,
$filter_event_severity = false, $filter_event_type = false,
$filter_event_status = false, $filter_event_filter_search = false) {
$filter_event_status = false, $filter_event_filter_search = false, $dbmeta = false) {
global $config;
@ -3094,13 +3104,16 @@ function events_get_count_events_by_criticity ($filter, $period, $date,
' OR id_evento LIKE "%' . io_safe_input($filter_event_filter_search) . '%")';
}
$tevento = 'tevento';
if ($dbmeta)
$tevento = 'tmetaconsole_event';
$sql = sprintf ('SELECT criticity,
COUNT(*) AS count
FROM tevento
FROM %s
WHERE utimestamp > %d AND utimestamp <= %d
%s %s
GROUP BY criticity',
$datelimit, $date, $sql_filter, $sql_where);
$tevento, $datelimit, $date, $sql_filter, $sql_where);
$rows = db_get_all_rows_sql ($sql);
@ -3128,7 +3141,7 @@ function events_get_count_events_by_criticity ($filter, $period, $date,
*/
function events_get_count_events_validated ($filter, $period = null, $date = null,
$filter_event_severity = false, $filter_event_type = false,
$filter_event_status = false, $filter_event_filter_search = false) {
$filter_event_status = false, $filter_event_filter_search = false, $dbmeta = false) {
global $config;
@ -3252,7 +3265,10 @@ function events_get_count_events_validated ($filter, $period = null, $date = nul
' OR id_evento LIKE "%' . io_safe_input($filter_event_filter_search) . '%")';
}
$sql = sprintf ("SELECT estado, COUNT(*) AS count FROM tevento WHERE %s %s GROUP BY estado", $sql_filter, $sql_where);
$tevento = 'tevento';
if ($dbmeta)
$tevento = 'tmetaconsole_event';
$sql = sprintf ("SELECT estado, COUNT(*) AS count FROM %s WHERE %s %s GROUP BY estado", $tevento, $sql_filter, $sql_where);
$rows = db_get_all_rows_sql ($sql);

View File

@ -1532,12 +1532,17 @@ function reporting_event_report_group($report, $content,
$return['chart']['by_user_validator'] = null;
$return['chart']['by_criticity'] = null;
$return['chart']['validated_vs_unvalidated'] = null;
$server_name = $content['server_name'];
if (is_metaconsole() && $server_name != '')
$metaconsole_dbtable = true;
else
$metaconsole_dbtable = false;
if ($event_graph_by_agent) {
$data_graph = events_get_count_events_by_agent(
$content['id_group'], $content['period'], $report["datetime"],
$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$return['chart']['by_agent']= pie_graph(
$data_graph,
@ -1556,7 +1561,7 @@ function reporting_event_report_group($report, $content,
$data_graph = events_get_count_events_validated_by_user(
array('id_group' => $content['id_group']), $content['period'],
$report["datetime"],$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$return['chart']['by_user_validator'] = pie_graph(
$data_graph,
@ -1575,7 +1580,7 @@ function reporting_event_report_group($report, $content,
$data_graph = events_get_count_events_by_criticity(
array('id_group' => $content['id_group']), $content['period'],
$report["datetime"],$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$colors = get_criticity_pie_colors($data_graph);
@ -1598,7 +1603,7 @@ function reporting_event_report_group($report, $content,
$data_graph = events_get_count_events_validated(
array('id_group' => $content['id_group']), $content['period'],
$report["datetime"],$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$return['chart']['validated_vs_unvalidated'] = pie_graph(
$data_graph,
@ -1679,13 +1684,19 @@ function reporting_event_report_module($report, $content,
$event_graph_by_criticity = $event_filter['event_graph_by_criticity'];
$event_graph_validated_vs_unvalidated = $event_filter['event_graph_validated_vs_unvalidated'];
$server_name = $content['server_name'];
if (is_metaconsole() && $server_name != '')
$metaconsole_dbtable = true;
else
$metaconsole_dbtable = false;
//data events
$data = reporting_get_module_detailed_event (
$content['id_agent_module'], $content['period'], $report["datetime"],
$show_summary_group, $filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search, $force_width_chart,
$event_graph_by_user_validator, $event_graph_by_criticity,
$event_graph_validated_vs_unvalidated, $ttl, $id_server);
$event_graph_validated_vs_unvalidated, $ttl, $id_server, $metaconsole_dbtable);
if (empty($data)) {
$return['failed'] = __('No events');
@ -2449,11 +2460,16 @@ function reporting_event_report_agent($report, $content,
$return["chart"]["by_criticity"] = null;
$return["chart"]["validated_vs_unvalidated"] = null;
$server_name = $content['server_name'];
if (is_metaconsole() && $server_name != '')
$metaconsole_dbtable = true;
else
$metaconsole_dbtable = false;
if ($event_graph_by_user_validator) {
$data_graph = events_get_count_events_validated_by_user(
array('id_agent' => $content['id_agent']), $content['period'],
$report["datetime"],$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$return["chart"]["by_user_validator"] = pie_graph(
$data_graph,
@ -2472,7 +2488,7 @@ function reporting_event_report_agent($report, $content,
$data_graph = events_get_count_events_by_criticity(
array('id_agent' => $content['id_agent']), $content['period'],
$report["datetime"],$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$colors = get_criticity_pie_colors($data_graph);
@ -2495,7 +2511,7 @@ function reporting_event_report_agent($report, $content,
$data_graph = events_get_count_events_validated(
array('id_agent' => $content['id_agent']), $content['period'],
$report["datetime"],$filter_event_severity, $filter_event_type,
$filter_event_status, $filter_event_filter_search);
$filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$return["chart"]["validated_vs_unvalidated"] = pie_graph(
$data_graph,
@ -6681,7 +6697,7 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
$filter_event_type = false, $filter_event_status = false,
$filter_event_filter_search = false, $force_width_chart = false,
$event_graph_by_user_validator = false, $event_graph_by_criticity = false,
$event_graph_validated_vs_unvalidated = false, $ttl = 1, $id_server = false) {
$event_graph_validated_vs_unvalidated = false, $ttl = 1, $id_server = false, $metaconsole_dbtable = false) {
global $config;
@ -6726,7 +6742,7 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
if ($event_graph_by_user_validator) {
$data_graph = events_get_count_events_validated_by_user(
array('id_agentmodule' => $id_module), $period, $date, $filter_event_severity,
$filter_event_type, $filter_event_status, $filter_event_filter_search);
$filter_event_type, $filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$event['chart']['by_user_validator'] = pie_graph(
$data_graph,
@ -6744,7 +6760,7 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
if ($event_graph_by_criticity) {
$data_graph = events_get_count_events_by_criticity(
array('id_agentmodule' => $id_module), $period, $date, $filter_event_severity,
$filter_event_type, $filter_event_status, $filter_event_filter_search);
$filter_event_type, $filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$colors = get_criticity_pie_colors($data_graph);
@ -6766,7 +6782,7 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
if ($event_graph_validated_vs_unvalidated) {
$data_graph = events_get_count_events_validated(
array('id_agentmodule' => $id_module), $period, $date, $filter_event_severity,
$filter_event_type, $filter_event_status, $filter_event_filter_search);
$filter_event_type, $filter_event_status, $filter_event_filter_search, $metaconsole_dbtable);
$event['chart']['validated_vs_unvalidated'] = pie_graph(
$data_graph,

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.730-190122
Version: 7.0NG.730-190123
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.730 PS190122";
my $version = "7.0NG.730 PS190123";
# Pandora server configuration
my %conf;

View File

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