Merge branch 'develop' into 125-Gestión-recolección-y-correlación-de-logs-dev

This commit is contained in:
fbsanchez 2017-09-06 16:23:02 +02:00
commit 6b6ca75d90
30 changed files with 95 additions and 37 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.711-170905
Version: 7.0NG.711-170906
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.711-170905"
pandora_version="7.0NG.711-170906"
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

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.711';
use constant AGENT_BUILD => '170905';
use constant AGENT_BUILD => '170906';
# 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.711
%define release 170905
%define release 170906
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.711"
PI_BUILD="170905"
PI_BUILD="170906"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{170905}
{170906}
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.711(Build 170905)")
#define PANDORA_VERSION ("7.0NG.711(Build 170906)")
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.711(Build 170905))"
VALUE "ProductVersion", "(7.0NG.711(Build 170906))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.711-170905
Version: 7.0NG.711-170906
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.711-170905"
pandora_version="7.0NG.711-170906"
package_pear=0
package_pandora=1

View File

@ -14,7 +14,7 @@ ALTER TABLE tserver ADD COLUMN exec_proxy tinyint(1) UNSIGNED NOT NULL default 0
ALTER TABLE tevent_response ADD COLUMN server_to_exec int(10) unsigned NOT NULL DEFAULT 0;
INSERT INTO tmodule VALUES (8, 'Wux module');
INSERT INTO tmodule VALUES (8, 'Wux module');
INSERT INTO ttipo_modulo VALUES (25,'web_analysis', 8, 'Web analysis data', 'module-wux.png');

View File

@ -1431,7 +1431,7 @@ ALTER TABLE tevent_response ADD COLUMN server_to_exec int(10) unsigned NOT NULL
-- Table `tmodule`
-- ---------------------------------------------------------------------
INSERT INTO tmodule VALUES (8, 'Wux module');
INSERT INTO tmodule VALUES (8, 'Wux module');
-- ---------------------------------------------------------------------
-- Table `ttipo_modulo`

View File

@ -263,6 +263,7 @@ $params['hidden_input_idagent_value'] = $id_parent;
$params['value'] = db_get_value ("alias","tagente","id_agente",$id_parent);
$params['selectbox_id'] = 'cascade_protection_module';
$params['javascript_is_function_select'] = true;
$params['cascade_protection'] = true;
$table->data[3][1] = ui_print_agent_autocomplete_input($params);

View File

@ -204,6 +204,7 @@ if ($create_modules) {
$ifPhysAddress = $interfaces[$id]['ifPhysAddress']['value'];
$ifPhysAddress = strtoupper($ifPhysAddress);
}
foreach ($modules as $module) {
$oid_array = explode('.', $module);
$oid_array[count($oid_array) - 1] = $id;
@ -212,7 +213,7 @@ if ($create_modules) {
// Get the name
$name_array = explode('::', $oid_array[0]);
$name = $ifname . "_" . $name_array[1];
// Clean the name
$name = str_replace ( "\"" , "" , $name);
@ -262,18 +263,50 @@ if ($create_modules) {
$row = db_get_row_sql ($sql);
if ($row['server_type'] == 13) {
if (preg_match ("/Status/", $name_array[1])) {
if (preg_match ("/ifPhysAddress/", $name_array[1])) {
$module_type = 3;
}
elseif (preg_match ("/ifSpecific/", $name_array[1])) {
$module_type = 3;
}
elseif (preg_match("/ifType/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifSpeed/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifPromiscuousMode/", $name_array[1])) {
$module_type = 2;
}
elseif (preg_match ("/Present/", $name_array[1])) {
elseif (preg_match("/ifOutQLen/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifName/", $name_array[1])) {
$module_type = 3;
}
elseif (preg_match("/ifMtu/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifLinkUpDownTrapEnable/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifLastChange/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifIndex/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifDescr/", $name_array[1])) {
$module_type = 3;
}
elseif (preg_match("/ifCounterDiscontinuityTime/", $name_array[1])) {
$module_type = 1;
}
elseif (preg_match("/ifConnectorPresent/", $name_array[1])) {
$module_type = 2;
}
elseif (preg_match("/PromiscuousMode/", $name_array[1])) {
elseif (preg_match("/ifAdminStatus/", $name_array[1])) {
$module_type = 2;
}
// Specific counters (ends in s)
elseif (preg_match("/s$/", $name_array[1])) {
$module_type = 4;
}
else {
$module_type = 4;
@ -281,10 +314,12 @@ if ($create_modules) {
$module_server = 1;
$output_oid = "";
exec("ssh pandora_exec_proxy@" . $row['ip_address'] . " snmptranslate -On " . $oid, $output_oid, $rc);
$conf_iod = $output_oid[0];
$oid = $conf_iod;
$conf_oid = $output_oid[0];
$oid = $conf_oid;
}
}
@ -322,7 +357,7 @@ if ($create_modules) {
if ($row['server_type'] == 13) {
$module_type_name = db_get_value_filter("nombre", "ttipo_modulo", array("id_tipo" => $values['id_tipo_modulo']));
$new_module_configuration_data = "module_begin\nmodule_name " . io_safe_input($name) . "\nmodule_description " . $values['descripcion'] . "\nmodule_type " . $module_type_name . "\nmodule_snmp\nmodule_oid " . $conf_iod . "\nmodule_community " . $values['snmp_community'] . "\nmodule_end";
$new_module_configuration_data = "module_begin\nmodule_name " . io_safe_input($name) . "\nmodule_description " . io_safe_output($values['descripcion']) . "\nmodule_type " . $module_type_name . "\nmodule_snmp\nmodule_oid " . $conf_oid . "\nmodule_community " . $values['snmp_community'] . "\nmodule_end";
config_agents_add_module_in_conf($id_agent, $new_module_configuration_data);
}

View File

@ -196,6 +196,15 @@ if ($create_modules) {
'plugin_pass' => $plugin_pass,
'id_modulo' => MODULE_WMI);
if ($server_to_exec != 0) {
$sql = sprintf("SELECT server_type FROM tserver WHERE id_server = %d", $server_to_exec);
$row = db_get_row_sql ($sql);
if ($row['server_type'] == 13) {
$values['id_modulo'] = 1;
}
}
// Create Service modules
$services_values = $values;

View File

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

View File

@ -2951,6 +2951,11 @@ function ui_print_agent_autocomplete_input($parameters) {
if (isset($parameters['from_wux'])) {
$from_wux_transaction = $parameters['from_wux'];
}
$cascade_protection = false; //Default value
if (isset($parameters['cascade_protection'])) {
$cascade_protection = $parameters['cascade_protection'];
}
$metaconsole_enabled = false; //Default value
if (isset($parameters['metaconsole_enabled'])) {
@ -3149,7 +3154,9 @@ function ui_print_agent_autocomplete_input($parameters) {
.append ($("<option></option>")
.attr("value", val["id_agente_modulo"]).text (s));
});
if('. (int)$cascade_protection .' == 0){
$("#' . $selectbox_id . '").enable();
}
$("#' . $selectbox_id . '").fadeIn ("normal");
}
});

View File

@ -75,6 +75,9 @@ function wmi_create_wizard_modules($id_agent, $names, $wizard_mode, $values, $id
$values['snmp_oid'] = io_safe_input($wmi_query);
if($id_police != 0){
$new_module_configuration_data = "module_begin\nmodule_name " . $name . "\nmodule_type generic_data_string\nmodule_wmi " . $values['ip_target'] . "\nmodule_wmiquery " . $wmi_query . "\nmodule_wmiauth " . $values['plugin_user'] . "%" . $values['plugin_pass'] . "\nmodule_end";
$values['configuration_data'] = $new_module_configuration_data;
$return = policies_create_module ($name, $id_police, $module_id, $values);
}
else{
@ -161,6 +164,9 @@ function wmi_create_module_from_components($components, $values, $id_police=0, $
$id_agente_modulo = modules_create_agent_module($nc["id_agente"], $nc["nombre"], $nc);
}
else{
$new_module_configuration_data = "module_begin\nmodule_name " . $nc['nombre'] . "\nmodule_type generic_data_string\nmodule_wmi " . $values['ip_target'] . "\nmodule_wmiquery " . io_safe_output($nc['snmp_oid']) . "\nmodule_wmiauth " . $values['plugin_user'] . "%" . $values['plugin_pass'] . "\nmodule_end";
$nc['configuration_data'] = $new_module_configuration_data;
$id_agente_modulo = policies_create_module ($nc["name"], $id_police, $module_id, $nc);
}

View File

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

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.711
%define release 170905
%define release 170906
# 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.711
%define release 170905
%define release 170906
%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.711-170905
Version: 7.0NG.711-170906
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.711-170905"
pandora_version="7.0NG.711-170906"
package_cpan=0
package_pandora=1

View File

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

View File

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

View File

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

View File

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

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.711 PS170905";
my $version = "7.0NG.711 PS170906";
# Pandora server configuration
my %conf;

View File

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