This commit is contained in:
marcos.alconada 2019-06-17 10:02:11 +02:00
commit b627636863
33 changed files with 107 additions and 90 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.735-190614 Version: 7.0NG.735-190617
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.735-190614" pandora_version="7.0NG.735-190617"
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

View File

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.735'; use constant AGENT_VERSION => '7.0NG.735';
use constant AGENT_BUILD => '190614'; use constant AGENT_BUILD => '190617';
# 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;

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.735" PI_VERSION="7.0NG.735"
PI_BUILD="190614" PI_BUILD="190617"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190614} {190617}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -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.735(Build 190614)") #define PANDORA_VERSION ("7.0NG.735(Build 190617)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -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.735(Build 190614))" VALUE "ProductVersion", "(7.0NG.735(Build 190617))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.735-190614 Version: 7.0NG.735-190617
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.735-190614" pandora_version="7.0NG.735-190617"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -221,7 +221,7 @@ switch ($action) {
$server_name = $item['server_name']; $server_name = $item['server_name'];
// Metaconsole db connection. // Metaconsole db connection.
if ($meta && $server_name != '') { if ($meta && !empty($server_name)) {
$connection = metaconsole_get_connection($server_name); $connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) { if (metaconsole_load_external_db($connection) != NOERR) {
continue; continue;
@ -547,8 +547,43 @@ switch ($action) {
break; break;
case 'event_report_agent': case 'event_report_agent':
case 'event_report_group': $description = $item['description'];
$period = $item['period'];
$group = $item['id_group'];
$recursion = $item['recursion']; $recursion = $item['recursion'];
$idAgent = $item['id_agent'];
$idAgentModule = $item['id_agent_module'];
$show_summary_group = $style['show_summary_group'];
$filter_event_severity = json_decode($style['filter_event_severity'], true);
$filter_event_status = json_decode($style['filter_event_status'], true);
$filter_event_type = json_decode($style['filter_event_type'], true);
$event_graph_by_user_validator = $style['event_graph_by_user_validator'];
$event_graph_by_criticity = $style['event_graph_by_criticity'];
$event_graph_validated_vs_unvalidated = $style['event_graph_validated_vs_unvalidated'];
$include_extended_events = $item['show_extended_events'];
$filter_search = $style['event_filter_search'];
break;
case 'event_report_group':
$description = $item['description'];
$period = $item['period'];
$group = $item['id_group'];
$recursion = $item['recursion'];
$event_graph_by_agent = $style['event_graph_by_agent'];
$event_graph_by_user_validator = $style['event_graph_by_user_validator'];
$event_graph_by_criticity = $style['event_graph_by_criticity'];
$event_graph_validated_vs_unvalidated = $style['event_graph_validated_vs_unvalidated'];
$filter_search = $style['event_filter_search'];
$include_extended_events = $item['show_extended_events']; $include_extended_events = $item['show_extended_events'];
break; break;
@ -2805,7 +2840,7 @@ function print_SLA_list($width, $action, $idItem=null)
foreach ($itemsSLA as $item) { foreach ($itemsSLA as $item) {
$server_name = $item['server_name']; $server_name = $item['server_name'];
// Metaconsole db connection. // Metaconsole db connection.
if ($meta && $server_name != '') { if ($meta && !empty($server_name)) {
$connection = metaconsole_get_connection( $connection = metaconsole_get_connection(
$server_name $server_name
); );
@ -3133,7 +3168,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
foreach ($itemsGeneral as $item) { foreach ($itemsGeneral as $item) {
$server_name = $item['server_name']; $server_name = $item['server_name'];
// Metaconsole db connection. // Metaconsole db connection.
if ($meta && $server_name != '') { if ($meta && !empty($server_name)) {
$connection = metaconsole_get_connection( $connection = metaconsole_get_connection(
$server_name $server_name
); );

View File

@ -1348,6 +1348,8 @@ switch ($action) {
$values['description'] = get_parameter('description'); $values['description'] = get_parameter('description');
$values['type'] = get_parameter('type', null); $values['type'] = get_parameter('type', null);
$values['recursion'] = get_parameter('recursion', null); $values['recursion'] = get_parameter('recursion', null);
$values['show_extended_events'] = get_parameter('include_extended_events', null);
$label = get_parameter('label', ''); $label = get_parameter('label', '');
// Add macros name. // Add macros name.
@ -1903,8 +1905,8 @@ switch ($action) {
$style['event_graph_by_user_validator'] = $event_graph_by_user_validator; $style['event_graph_by_user_validator'] = $event_graph_by_user_validator;
$style['event_graph_by_criticity'] = $event_graph_by_criticity; $style['event_graph_by_criticity'] = $event_graph_by_criticity;
$style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated; $style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated;
$style['event_filter_search'] = $event_filter_search; $style['event_filter_search'] = $event_filter_search;
if ($label != '') { if ($label != '') {
$style['label'] = $label; $style['label'] = $label;
} else { } else {
@ -2010,6 +2012,7 @@ switch ($action) {
); );
$name_it = (string) get_parameter('name'); $name_it = (string) get_parameter('name');
$values['recursion'] = get_parameter('recursion', null); $values['recursion'] = get_parameter('recursion', null);
$values['show_extended_events'] = get_parameter('include_extended_events', null);
$values['name'] = reporting_label_macro( $values['name'] = reporting_label_macro(
$items_label, $items_label,
$name_it $name_it
@ -2421,6 +2424,7 @@ switch ($action) {
case 'event_report_agent': case 'event_report_agent':
case 'event_report_group': case 'event_report_group':
case 'event_report_module': case 'event_report_module':
$show_summary_group = get_parameter( $show_summary_group = get_parameter(
'show_summary_group', 'show_summary_group',
0 0
@ -2476,11 +2480,6 @@ switch ($action) {
$style['event_graph_by_user_validator'] = $event_graph_by_user_validator; $style['event_graph_by_user_validator'] = $event_graph_by_user_validator;
$style['event_graph_by_criticity'] = $event_graph_by_criticity; $style['event_graph_by_criticity'] = $event_graph_by_criticity;
$style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated; $style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated;
switch ($values['type']) {
case 'event_report_group':
case 'event_report_agent':
$style['event_filter_search'] = $event_filter_search; $style['event_filter_search'] = $event_filter_search;
if ($label != '') { if ($label != '') {
$style['label'] = $label; $style['label'] = $label;
@ -2489,12 +2488,6 @@ switch ($action) {
} }
break; break;
default:
// Default.
break;
}
break;
case 'simple_graph': case 'simple_graph':
// Warning. We are using this column to hold // Warning. We are using this column to hold
// this value to avoid the modification // this value to avoid the modification

View File

@ -659,18 +659,18 @@ class Wizard
if ($input['arguments']['inline'] != 'true') { if ($input['arguments']['inline'] != 'true') {
$output .= '<div class="edit_discovery_input">'; $output .= '<div class="edit_discovery_input">';
} else { } else {
$output .= '<div style="display: flex; margin-bottom: 25px;">'; $output .= '<div style="display: flex; margin-bottom: 25px; flex-wrap: wrap;">';
if (!isset($input['extra'])) { if (!isset($input['extra'])) {
$output .= '<div style="width: 50%;">'; $output .= '<div style="width: 50%;">';
} }
if (isset($input['extra'])) { if (isset($input['extra'])) {
$output .= '<div style="width: 50%; display: flex;">'; $output .= '<div style="display: flex; margin-right:10px;">';
} }
} }
if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) { if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) {
$output .= '<div style="width: 50%">'; $output .= '<div style="margin-right:10px;">';
} }
$output .= '<div class="label_select">'; $output .= '<div class="label_select">';
@ -690,11 +690,11 @@ class Wizard
$output .= $this->printInput($input['arguments']); $output .= $this->printInput($input['arguments']);
$output .= '</div>'; $output .= '</div>';
} else if ($input['arguments']['inline'] == 'true') { } else if ($input['arguments']['inline'] == 'true') {
$output .= '<div style="width: 50%;">';
if (isset($input['extra'])) { if (isset($input['extra'])) {
$output .= '<div style="float: center;">'; $output .= '<div style="">';
$output .= '<div style="float: left;">';
} else { } else {
$output .= '<div style="width:50%;">';
$output .= '<div style="float: right;">'; $output .= '<div style="float: right;">';
} }

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC190614'; $build_version = 'PC190617';
$pandora_version = 'v7.0NG.735'; $pandora_version = 'v7.0NG.735';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -11519,7 +11519,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
if ($other['data'][18] != '') { if ($other['data'][18] != '') {
$values['id_extra'] = $other['data'][18]; $values['id_extra'] = $other['data'][18];
$sql_validation = 'SELECT id_evento FROM tevento where estado=0 and id_extra ="'.$other['data'][18].'";'; $sql_validation = 'SELECT id_evento FROM tevento where estado IN (0,2) and id_extra ="'.$other['data'][18].'";';
$validation = db_get_all_rows_sql($sql_validation); $validation = db_get_all_rows_sql($sql_validation);
if ($validation) { if ($validation) {
foreach ($validation as $val) { foreach ($validation as $val) {

View File

@ -180,7 +180,7 @@ function config_update_config()
$error_update[] = __('Automatic check for updates'); $error_update[] = __('Automatic check for updates');
} }
if (!config_update_value('cert_path', (bool) get_parameter('cert_path'))) { if (!config_update_value('cert_path', get_parameter('cert_path'))) {
$error_update[] = __('SSL cert path'); $error_update[] = __('SSL cert path');
} }

View File

@ -1383,7 +1383,7 @@ function reporting_event_top_n(
foreach ($tops as $key => $row) { foreach ($tops as $key => $row) {
// Metaconsole connection. // Metaconsole connection.
$server_name = $row['server_name']; $server_name = $row['server_name'];
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
$connection = metaconsole_get_connection($server_name); $connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) { if (metaconsole_load_external_db($connection) != NOERR) {
// ui_print_error_message ("Error connecting to ".$server_name); // ui_print_error_message ("Error connecting to ".$server_name);
@ -1426,7 +1426,7 @@ function reporting_event_top_n(
} }
// Restore dbconnection. // Restore dbconnection.
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
} }
@ -2330,7 +2330,7 @@ function reporting_exception(
do { do {
// Metaconsole connection. // Metaconsole connection.
$server_name = $exceptions[$i]['server_name']; $server_name = $exceptions[$i]['server_name'];
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
$connection = metaconsole_get_connection($server_name); $connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) { if (metaconsole_load_external_db($connection) != NOERR) {
// ui_print_error_message ("Error connecting to ".$server_name); // ui_print_error_message ("Error connecting to ".$server_name);
@ -2372,7 +2372,7 @@ function reporting_exception(
$i++; $i++;
// Restore dbconnection. // Restore dbconnection.
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
} while ($min === false && $i < count($exceptions)); } while ($min === false && $i < count($exceptions));
@ -2385,7 +2385,7 @@ function reporting_exception(
foreach ($exceptions as $exc) { foreach ($exceptions as $exc) {
// Metaconsole connection. // Metaconsole connection.
$server_name = $exc['server_name']; $server_name = $exc['server_name'];
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
$connection = metaconsole_get_connection($server_name); $connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) { if (metaconsole_load_external_db($connection) != NOERR) {
// ui_print_error_message ("Error connecting to ".$server_name); // ui_print_error_message ("Error connecting to ".$server_name);
@ -2499,7 +2499,7 @@ function reporting_exception(
} }
// Restore dbconnection // Restore dbconnection
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
} }
@ -2693,7 +2693,7 @@ function reporting_group_report($report, $content)
{ {
global $config; global $config;
$metaconsole_on = ($config['metaconsole'] == 1) && defined('METACONSOLE'); $metaconsole_on = ($config['metaconsole'] == 1) && is_metaconsole();
$return['type'] = 'group_report'; $return['type'] = 'group_report';
@ -6173,7 +6173,7 @@ function reporting_availability($report, $content, $date=false, $time=false)
foreach ($items as $item) { foreach ($items as $item) {
// aaMetaconsole connection // aaMetaconsole connection
$server_name = $item['server_name']; $server_name = $item['server_name'];
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
$connection = metaconsole_get_connection($server_name); $connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) { if (metaconsole_load_external_db($connection) != NOERR) {
// ui_print_error_message ("Error connecting to ".$server_name); // ui_print_error_message ("Error connecting to ".$server_name);
@ -6185,7 +6185,7 @@ function reporting_availability($report, $content, $date=false, $time=false)
|| modules_is_not_init($item['id_agent_module']) || modules_is_not_init($item['id_agent_module'])
) { ) {
// Restore dbconnection // Restore dbconnection
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
@ -6242,7 +6242,7 @@ function reporting_availability($report, $content, $date=false, $time=false)
$text = $row['data']['agent'].' ('.$text.')'; $text = $row['data']['agent'].' ('.$text.')';
// Restore dbconnection // Restore dbconnection
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
@ -6807,7 +6807,7 @@ function reporting_increment($report, $content)
$return['data'] = []; $return['data'] = [];
if (defined('METACONSOLE')) { if (is_metaconsole()) {
$sql1 = 'SELECT datos FROM tagente_datos WHERE id_agente_modulo = '.$id_agent_module.' $sql1 = 'SELECT datos FROM tagente_datos WHERE id_agente_modulo = '.$id_agent_module.'
AND utimestamp <= '.(time() - $period).' ORDER BY utimestamp DESC'; AND utimestamp <= '.(time() - $period).' ORDER BY utimestamp DESC';
$sql2 = 'SELECT datos FROM tagente_datos WHERE id_agente_modulo = '.$id_agent_module.' ORDER BY utimestamp DESC'; $sql2 = 'SELECT datos FROM tagente_datos WHERE id_agente_modulo = '.$id_agent_module.' ORDER BY utimestamp DESC';
@ -6845,7 +6845,7 @@ function reporting_increment($report, $content)
$last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = '.$id_agent_module.' ORDER BY utimestamp DESC'); $last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = '.$id_agent_module.' ORDER BY utimestamp DESC');
} }
if (!defined('METACONSOLE')) { if (!is_metaconsole()) {
} }
if ($old_data === false || $last_data === false) { if ($old_data === false || $last_data === false) {
@ -6934,7 +6934,7 @@ function reporting_general($report, $content)
foreach ($generals as $row) { foreach ($generals as $row) {
// Metaconsole connection // Metaconsole connection
$server_name = $row['server_name']; $server_name = $row['server_name'];
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
$connection = metaconsole_get_connection($server_name); $connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) { if (metaconsole_load_external_db($connection) != NOERR) {
// ui_print_error_message ("Error connecting to ".$server_name); // ui_print_error_message ("Error connecting to ".$server_name);
@ -7085,7 +7085,7 @@ function reporting_general($report, $content)
$i++; $i++;
// Restore dbconnection // Restore dbconnection
if (($config['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
} }

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.735 %define version 7.0NG.735
%define release 190614 %define release 190617
%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

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.735-190614 Version: 7.0NG.735-190617
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.735-190614" pandora_version="7.0NG.735-190617"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -45,7 +45,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.735"; my $pandora_version = "7.0NG.735";
my $pandora_build = "190614"; my $pandora_build = "190617";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -3352,7 +3352,7 @@ sub pandora_event ($$$$$$$$$$;$$$$$$$$$$$) {
# Validate events with the same event id # Validate events with the same event id
if (defined ($id_extra) && $id_extra ne '') { if (defined ($id_extra) && $id_extra ne '') {
logger($pa_config, "Updating events with extended id '$id_extra'.", 10); logger($pa_config, "Updating events with extended id '$id_extra'.", 10);
db_do ($dbh, 'UPDATE ' . $event_table . ' SET estado = 1, ack_utimestamp = ? WHERE estado = 0 AND id_extra=?', $utimestamp, $id_extra); db_do ($dbh, 'UPDATE ' . $event_table . ' SET estado = 1, ack_utimestamp = ? WHERE estado IN (0,2) AND id_extra=?', $utimestamp, $id_extra);
} }
# Create the event # Create the event

View File

@ -32,7 +32,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.735"; my $pandora_version = "7.0NG.735";
my $pandora_build = "190614"; my $pandora_build = "190617";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

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

View File

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

View File

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

View File

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

View File

@ -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.735 PS190614"; my $version = "7.0NG.735 PS190617";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);

View File

@ -68,27 +68,16 @@ then
help help
fi fi
TMPFILE=/tmp/dns_$DNS_CHECK.tmp
dig @$DNS_CHECK $DOMAIN_CHECK > $TMPFILE results=`dig @$DNS_CHECK +nocmd $DOMAIN_CHECK +multiline +noall +answer A`
RETURN_IP=`cat $TMPFILE | grep "^$DOMAIN_CHECK" | awk '{print $5}'` targets=`echo "$results"| awk '{print $5}'`
RETURN_TIMEOUT=`cat $TMPFILE | grep "Query time" | grep -o "[0-9]*"`
rm $TMPFILE 2> /dev/null for x in $targets; do
if [ "$x" == "$IP_CHECK" ]; then
if [ $TIMEOUT_CHECK == 1 ]
then
echo $RETURN_TIMEOUT
exit 0
fi
if [ "$RETURN_IP" != "$IP_CHECK" ]
then
echo 0
exit 1
else
echo 1 echo 1
exit 0 exit 0
fi fi
done
echo 0
exit 0