mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge remote-tracking branch 'origin/develop' into ent-5527-cambio-discovery-sap-para-hacerlo-personalizable
This commit is contained in:
commit
c9457b2df3
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.746-200615
|
Version: 7.0NG.746-200616
|
||||||
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.746-200615"
|
pandora_version="7.0NG.746-200616"
|
||||||
|
|
||||||
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
|
||||||
|
@ -55,7 +55,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.746';
|
use constant AGENT_VERSION => '7.0NG.746';
|
||||||
use constant AGENT_BUILD => '200615';
|
use constant AGENT_BUILD => '200616';
|
||||||
|
|
||||||
# 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.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
|
|
||||||
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.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
|
|
||||||
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.746"
|
PI_VERSION="7.0NG.746"
|
||||||
PI_BUILD="200615"
|
PI_BUILD="200616"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{200615}
|
{200616}
|
||||||
|
|
||||||
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.746(Build 200615)")
|
#define PANDORA_VERSION ("7.0NG.746(Build 200616)")
|
||||||
|
|
||||||
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.746(Build 200615))"
|
VALUE "ProductVersion", "(7.0NG.746(Build 200616))"
|
||||||
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.746-200615
|
Version: 7.0NG.746-200616
|
||||||
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.746-200615"
|
pandora_version="7.0NG.746-200616"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -261,6 +261,13 @@ if ($correctLogin) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'event':
|
||||||
|
// Preventive check for users if not available write events
|
||||||
|
if (! check_acl($config['id_user'], $event['id_grupo'], 'EW')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Ignore.
|
// Ignore.
|
||||||
break;
|
break;
|
||||||
|
@ -277,7 +277,8 @@ if (file_exists('languages/'.$user_language.'.mo') === true) {
|
|||||||
$params['ttl'],
|
$params['ttl'],
|
||||||
$params['sizeForTicks'],
|
$params['sizeForTicks'],
|
||||||
$params['show'],
|
$params['show'],
|
||||||
$params['date_to']
|
$params['date_to'],
|
||||||
|
$params['server_id']
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC200615';
|
$build_version = 'PC200616';
|
||||||
$pandora_version = 'v7.0NG.746';
|
$pandora_version = 'v7.0NG.746';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -2142,7 +2142,7 @@ function check_sql($sql)
|
|||||||
{
|
{
|
||||||
// We remove "*" to avoid things like SELECT * FROM tusuario
|
// We remove "*" to avoid things like SELECT * FROM tusuario
|
||||||
// Check that it not delete_ as "delete_pending" (this is a common field in pandora tables).
|
// Check that it not delete_ as "delete_pending" (this is a common field in pandora tables).
|
||||||
if (preg_match('/\*|delete[^_]|drop|alter|modify|password|pass|insert|update/i', $sql)) {
|
if (preg_match('/([ ]*(delete|drop|alter|modify|password|pass|insert|update)\b[ \\]+)/i', $sql)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8796,6 +8796,11 @@ function otherParameter2Filter($other, $return_as_array=false, $use_agent_name=f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Esto es extraño, hablar con Tati
|
||||||
|
/*
|
||||||
|
$filter['1'] = $filter['sql'];
|
||||||
|
unset($filter['sql']); */
|
||||||
|
|
||||||
if (isset($other['data'][4]) && $other['data'][4] != '') {
|
if (isset($other['data'][4]) && $other['data'][4] != '') {
|
||||||
$idTemplate = db_get_value_filter('id', 'talert_templates', ['name' => $other['data'][4]]);
|
$idTemplate = db_get_value_filter('id', 'talert_templates', ['name' => $other['data'][4]]);
|
||||||
if ($idTemplate !== false) {
|
if ($idTemplate !== false) {
|
||||||
@ -10727,6 +10732,83 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update an event
|
||||||
|
*
|
||||||
|
* @param string $id_event Id of the event for change.
|
||||||
|
* @param string $unused1 Without use.
|
||||||
|
* @param array $params Dictionary with field,value format with the data for update.
|
||||||
|
* @param string $unused2 Without use.
|
||||||
|
* @param string $unused3 Without use.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function api_set_event($id_event, $unused1, $params, $unused2, $unused3)
|
||||||
|
{
|
||||||
|
// Get the event
|
||||||
|
$event = events_get_event($id_event, false, is_metaconsole());
|
||||||
|
// If event not exists, end the execution.
|
||||||
|
if ($event === false) {
|
||||||
|
returnError(
|
||||||
|
'event_not_exists',
|
||||||
|
'Event not exists'
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$paramsSerialize = [];
|
||||||
|
// Serialize the data for update
|
||||||
|
if ($params['type'] === 'array') {
|
||||||
|
// Keys that is not available to change
|
||||||
|
$invalidKeys = [
|
||||||
|
'id_evento',
|
||||||
|
'id_agente',
|
||||||
|
'id_grupo',
|
||||||
|
'timestamp',
|
||||||
|
'utimestamp',
|
||||||
|
'id_agentmodule',
|
||||||
|
'ack_utimestamp',
|
||||||
|
'data',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($params['data'] as $key_value) {
|
||||||
|
list($key, $value) = explode(',', $key_value, 2);
|
||||||
|
if (in_array($key, $invalidKeys) == false) {
|
||||||
|
$paramsSerialize[$key] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// In meta or node.
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$table = 'tmetaconsole_event';
|
||||||
|
} else {
|
||||||
|
$table = 'tevento';
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO. Stablish security for prevent sql injection?
|
||||||
|
// Update the row
|
||||||
|
$result = db_process_sql_update(
|
||||||
|
$table,
|
||||||
|
$paramsSerialize,
|
||||||
|
[ 'id_evento' => $id_event ]
|
||||||
|
);
|
||||||
|
|
||||||
|
// If update results failed
|
||||||
|
if (empty($result) === true || $result === false) {
|
||||||
|
returnError(
|
||||||
|
'failed_event_update',
|
||||||
|
__('Failed event update')
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
returnData('string', ['data' => 'Event updated']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param $trash1
|
* @param $trash1
|
||||||
|
@ -699,6 +699,7 @@ function flot_slicesbar_graph(
|
|||||||
'show' => $show,
|
'show' => $show,
|
||||||
'return_img_base_64' => true,
|
'return_img_base_64' => true,
|
||||||
'date_to' => $date_to,
|
'date_to' => $date_to,
|
||||||
|
'server_id' => $server_id,
|
||||||
];
|
];
|
||||||
|
|
||||||
$graph = '<img src="data:image/jpg;base64,';
|
$graph = '<img src="data:image/jpg;base64,';
|
||||||
@ -738,7 +739,7 @@ function flot_slicesbar_graph(
|
|||||||
|
|
||||||
$maxticks = (int) 20;
|
$maxticks = (int) 20;
|
||||||
if ($sizeForTicks === false) {
|
if ($sizeForTicks === false) {
|
||||||
$maxticks = (int) 20;
|
$maxticks = (int) 12;
|
||||||
} else if ($sizeForTicks < 300) {
|
} else if ($sizeForTicks < 300) {
|
||||||
$maxticks = (int) 3;
|
$maxticks = (int) 3;
|
||||||
} else if ($sizeForTicks < 600) {
|
} else if ($sizeForTicks < 600) {
|
||||||
@ -808,7 +809,23 @@ function flot_slicesbar_graph(
|
|||||||
// Javascript code.
|
// Javascript code.
|
||||||
$return .= "<script type='text/javascript'>";
|
$return .= "<script type='text/javascript'>";
|
||||||
$return .= "//<![CDATA[\n";
|
$return .= "//<![CDATA[\n";
|
||||||
$return .= "pandoraFlotSlicebar('$graph_id','$values','$datacolor','$legend',$intervaltick,'$fontpath',$fontsize,'$separator','$separator2',$id_agent,'$full_legend_date',$not_interactive, '$show', $datelimit, $server_id)";
|
$return .= "pandoraFlotSlicebar(
|
||||||
|
'$graph_id',
|
||||||
|
'$values',
|
||||||
|
'$datacolor',
|
||||||
|
'$legend',
|
||||||
|
$intervaltick,
|
||||||
|
'$fontpath',
|
||||||
|
$fontsize,
|
||||||
|
'$separator',
|
||||||
|
'$separator2',
|
||||||
|
$id_agent,
|
||||||
|
'$full_legend_date',
|
||||||
|
$not_interactive,
|
||||||
|
'$show',
|
||||||
|
$datelimit,
|
||||||
|
'$server_id'
|
||||||
|
)";
|
||||||
$return .= "\n//]]>";
|
$return .= "\n//]]>";
|
||||||
$return .= '</script>';
|
$return .= '</script>';
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.746';
|
$version = '7.0NG.746';
|
||||||
$build = '200615';
|
$build = '200616';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
|
|
||||||
# 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.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
|
|
||||||
# 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.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
%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.746-200615
|
Version: 7.0NG.746-200616
|
||||||
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.746-200615"
|
pandora_version="7.0NG.746-200616"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -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.746";
|
my $pandora_version = "7.0NG.746";
|
||||||
my $pandora_build = "200615";
|
my $pandora_build = "200616";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -33,7 +33,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.746";
|
my $pandora_version = "7.0NG.746";
|
||||||
my $pandora_build = "200615";
|
my $pandora_build = "200616";
|
||||||
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.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
|
|
||||||
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.746
|
%define version 7.0NG.746
|
||||||
%define release 200615
|
%define release 200616
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.746"
|
PI_VERSION="7.0NG.746"
|
||||||
PI_BUILD="200615"
|
PI_BUILD="200616"
|
||||||
|
|
||||||
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.746 PS200615";
|
my $version = "7.0NG.746 PS200616";
|
||||||
|
|
||||||
# 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.746 PS200615";
|
my $version = "7.0NG.746 PS200616";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user