Merge branch 'develop' into '805-change-tip-icon-in-trap-editor-dev'

# Conflicts:
#   pandora_console/operation/snmpconsole/snmp_view.php
This commit is contained in:
artu30 2017-05-17 17:37:10 +02:00
commit e54eb93ea8
96 changed files with 591 additions and 226 deletions

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, AIX version
# Version 7.0NG.703, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, FreeBSD Version
# Version 7.0NG.703, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, HP-UX Version
# Version 7.0NG.703, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, GNU/Linux
# Version 7.0NG.703, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, GNU/Linux
# Version 7.0NG.703, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, Solaris Version
# Version 7.0NG.703, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
# Version 7.0NG.702
# Version 7.0NG.703
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.702, AIX version
# Version 7.0NG.703, AIX version
# General Parameters
# ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.702
# Version 7.0NG.703
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.702, HPUX Version
# Version 7.0NG.703, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702
# Version 7.0NG.703
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702
# Version 7.0NG.703
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702
# Version 7.0NG.703
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.702, Solaris version
# Version 7.0NG.703, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, AIX version
# Version 7.0NG.703, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

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

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, GNU/Linux
# Version 7.0NG.703, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, FreeBSD Version
# Version 7.0NG.703, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, HP-UX Version
# Version 7.0NG.703, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, GNU/Linux
# Version 7.0NG.703, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@ -46,6 +46,12 @@ agent_name_cmd __rand__
#Parent agent_name
#parent_agent_name caprica
# By default, agent takes machine alias
#agent_alias
# To define agent alias by specific command, define 'agent_alias_cmd'.
#agent_alias_cmd
# Agent description
#description This is a demo agent for Linux

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, GNU/Linux
# Version 7.0NG.703, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, NetBSD Version
# Version 7.0NG.703, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, Solaris Version
# Version 7.0NG.703, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -40,8 +40,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.702';
use constant AGENT_BUILD => '170508';
use constant AGENT_VERSION => '7.0NG.703';
use constant AGENT_BUILD => '170517';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@ -135,9 +135,10 @@ my %DefaultConf = (
'interval' => 300,
'debug' => 0,
'agent_name' => '',
'agent_alias' => hostname(),
'agent_alias' => '',
'ehorus_conf' => undef,
'agent_name_cmd' => '',
'agent_alias_cmd' => '',
'description' => '',
'group' => '',
'group_id' => undef,
@ -802,6 +803,23 @@ sub read_config (;$) {
# Module, plugin and collection definitions
parse_conf_modules(\@file);
# If agent_alias_cmd is defined, agent_alias is set by command result.
if ($Conf{'agent_alias'} eq '') {
if ($Conf{'agent_alias_cmd'} ne '') {
my $result = `$Conf{'agent_alias_cmd'}`;
# Use only the first line.
my ($temp_agent_alias, $remain2) = split(/\n/, $result);
chomp ($temp_agent_alias);
# Remove white spaces of the first and last.
$temp_agent_alias =~ s/^ *(.*?) *$/$1/;
$Conf{'agent_alias'} = $temp_agent_alias if ($temp_agent_alias ne '');
} else {
$Conf{'agent_alias'} = hostname();
}
}
# If agent_name_cmd is defined, agent_name is set by command result.
if ($Conf{'agent_name'} eq '') {

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.702
%define release 170508
%define version 7.0NG.703
%define release 1
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.702
%define release 170508
%define version 7.0NG.703
%define release 1
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.702"
PI_BUILD="170508"
PI_VERSION="7.0NG.703"
PI_BUILD="170517"
OS_NAME=`uname -s`
FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2014 Artica Soluciones Tecnologicas
# Version 7.0NG.702
# Version 7.0NG.703
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
{Pandora FMS Windows Agent v7.0NG.702}
{Pandora FMS Windows Agent v7.0NG.703}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{170508}
{170517}
ViewReadme
{Yes}
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
{No}
Windows,Executable
{<%AppName%>-<%Version%>-Setup<%Ext%>}
{<%AppName%>-Setup<%Ext%>}
Windows,FileDescription
{<%AppName%> <%Version%> Setup}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.702(Build 170508)")
#define PANDORA_VERSION ("7.0NG.703(Build 170517)")
string pandora_path;
string pandora_dir;

View File

@ -228,6 +228,15 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
key_values->push_back (kv);
continue;
}
/*Check if is a agent_alias_cmd"*/
pos = buffer.find("agent_alias_cmd");
if (pos != string::npos){
Key_Value kv;
kv.parseLineByPosition(buffer, 15);
key_values->push_back (kv);
continue;
}
/*Check if is a collection*/
pos = buffer.find("file_collection");

View File

@ -257,7 +257,36 @@ Pandora_Windows_Service::pandora_init () {
// Read modules
this->modules = new Pandora_Module_List (conf_file);
delete []all_conf;
// Get the agent alias.
agent_alias = conf->getValue ("agent_alias");
if (agent_alias == "") {
agent_alias_cmd = conf->getValue ("agent_alias_cmd");
if (agent_alias_cmd != "") {
agent_alias_cmd = "cmd.exe /c \"" + agent_alias_cmd + "\"";
static string temp_agent_alias = getAgentNameFromCmdExec(agent_alias_cmd);
// Delete new line and carriage return.
pos = temp_agent_alias.find("\n");
if(pos != string::npos) {
temp_agent_alias.erase(pos, temp_agent_alias.size () - pos);
}
pos = temp_agent_alias.find("\r");
if(pos != string::npos) {
temp_agent_alias.erase(pos, temp_agent_alias.size () - pos);
}
// Remove leading and trailing white spaces.
temp_agent_alias = trim(temp_agent_alias);
if (temp_agent_alias != "") {
agent_alias = temp_agent_alias;
}
} else {
agent_alias = Pandora_Windows_Info::getSystemName ();
}
}
this->conf->setValue("agent_alias", agent_alias);
// Get the agent name.
agent_name = conf->getValue ("agent_name");
if (agent_name == "") {
@ -299,13 +328,6 @@ Pandora_Windows_Service::pandora_init () {
this->conf->setValue("agent_name", agent_name);
}
// Get the agent alias.
agent_alias = conf->getValue ("agent_alias");
if (agent_alias == "") {
agent_alias = Pandora_Windows_Info::getSystemName ();
this->conf->setValue("agent_alias", agent_alias);
}
pandora_agent = "PANDORA_AGENT=" + agent_name;
putenv(pandora_agent.c_str());

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.702(Build 170508))"
VALUE "ProductVersion", "(7.0NG.703(Build 170517))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

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

View File

@ -15,7 +15,7 @@ if(!enterprise_installed()){
$open=true;
}
$tipo = $_GET['message'];
$tipo = $_POST['message'];
echo "
<div class='modalheader'>

View File

@ -83,12 +83,19 @@ echo '<div id="header_login">';
echo '<img src="images/custom_logo/pandora_logo_head_3.png" alt="pandora_console">';
}
echo '</div>';
echo '<div id="list_icon_docs_support"><ul>';
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank"><img src="images/icono_docs.png" alt="docs pandora"></a></li>';
echo '<li>' . __('Docs') . '</li>';
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
echo '<li>' . __('Support') . '</li>';
echo '</ul></div>';
echo '<div id="list_icon_docs_support"><ul>';
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank"><img src="images/icono_docs.png" alt="docs pandora"></a></li>';
echo '<li>' . __('Docs') . '</li>';
if (defined ('PANDORA_ENTERPRISE')) {
echo '<li id="li_margin_left"><a href="https://support.artica.es" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
} else {
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
}
echo '<li>' . __('Support') . '</li>';
echo '</ul></div>';
echo '</div>';
echo '<div class="container_login">';

View File

@ -31,13 +31,14 @@ require_once ("../include/functions_html.php");
<?php
$id = get_parameter ('id');
$id_user = get_parameter ('id_user');
if (! isset($_SESSION['id_usuario'])) {
session_start();
session_write_close();
}
$user_language = get_user_language ($_SESSION['id_usuario']);
$user_language = get_user_language ($id_user);
if (file_exists ('../include/languages/'.$user_language.'.mo')) {
$l10n = new gettext_reader (new CachedFileReader ('../include/languages/'.$user_language.'.mo'));

View File

@ -159,8 +159,7 @@ if ($create_agent) {
$intervalo = (string) get_parameter_post ("intervalo", SECONDS_5MINUTES);
$comentarios = (string) get_parameter_post ("comentarios", '');
$modo = (int) get_parameter_post ("modo");
$id_parent = (string) get_parameter_post ("id_parent",'');
$id_parent = (int) agents_get_agent_id ($id_parent);
$id_parent = (int) get_parameter_post ("id_agent_parent");
$server_name = (string) get_parameter_post ("server_name");
$id_os = (int) get_parameter_post ("id_os");
$disabled = (int) get_parameter_post ("disabled");
@ -690,8 +689,7 @@ if ($update_agent) { // if modified some agent paramenter
$id_os = (int) get_parameter_post ("id_os");
$disabled = (bool) get_parameter_post ("disabled");
$server_name = (string) get_parameter_post ("server_name", "");
$parent_name = (string) get_parameter_post ("id_parent");
$id_parent = (int) agents_get_agent_id ($parent_name);
$id_parent = (int) get_parameter_post ("id_agent_parent");
$custom_id = (string) get_parameter_post ("custom_id", "");
$cascade_protection = (int) get_parameter_post ("cascade_protection", 0);
$cascade_protection_module = (int) get_parameter ("cascade_protection_module", 0);

View File

@ -99,6 +99,7 @@ if ($agent_to_delete) {
if ($enable_agent) {
$result = db_process_sql_update('tagente', array('disabled' => 0), array('id_agente' => $enable_agent));
$alias = agents_get_alias($enable_agent);
if ($result) {
// Update the agent from the metaconsole cache
@ -106,10 +107,10 @@ if ($enable_agent) {
$values = array('disabled' => 0);
enterprise_hook ('agent_update_from_cache', array($enable_agent, $values));
db_pandora_audit("Agent management", 'Enable ' . $enable_agent);
db_pandora_audit("Agent management", 'Enable ' . $alias);
}
else {
db_pandora_audit("Agent management", 'Fail to enable ' . $enable_agent);
db_pandora_audit("Agent management", 'Fail to enable ' . $alias);
}
ui_print_result_message ($result,
@ -118,6 +119,7 @@ if ($enable_agent) {
if ($disable_agent) {
$result = db_process_sql_update('tagente', array('disabled' => 1), array('id_agente' => $disable_agent));
$alias = agents_get_alias($disable_agent);
if ($result) {
// Update the agent from the metaconsole cache
@ -125,10 +127,10 @@ if ($disable_agent) {
$values = array('disabled' => 1);
enterprise_hook ('agent_update_from_cache', array($disable_agent, $values));
db_pandora_audit("Agent management", 'Disable ' . $disable_agent);
db_pandora_audit("Agent management", 'Disable ' . $alias);
}
else {
db_pandora_audit("Agent management", 'Fail to disable ' . $disable_agent);
db_pandora_audit("Agent management", 'Fail to disable ' . $alias);
}
ui_print_result_message ($result,

View File

@ -882,6 +882,9 @@ $(document).ready (function () {
$('#dynamic_interval_select').change (function() {
disabled_status(disabledBecauseInPolicy);
});
$('#dynamic_interval').change (function() {
disabled_status(disabledBecauseInPolicy);
});
disabled_two_tailed(disabledBecauseInPolicy);
$('#checkbox-dynamic_two_tailed').change (function() {
@ -929,7 +932,7 @@ $(document).ready (function () {
//readonly and add class input
function disabled_status (disabledBecauseInPolicy) {
if($('#dynamic_interval_select').val() != 0){
if($('#dynamic_interval_select').val() != 0 && $('#dynamic_interval').val() != 0){
$('#text-min_warning').prop('readonly', true);
$('#text-min_warning').addClass('readonly');
$('#text-max_warning').prop('readonly', true);

View File

@ -633,8 +633,6 @@ echo '</form>';
if ($id_downtime > 0) {
echo "<td valign=top style='width:300px;padding-left:20px;'>";
// Show available agents to include into downtime
echo '<h4>' . __('Available agents') . ':</h4>';
$filter_group = (int) get_parameter("filter_group", 0);
@ -707,7 +705,8 @@ if ($id_downtime > 0) {
echo "<br /><br />";
html_print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false);
echo "</form>";
// Show available agents to include into downtime
echo '<h4>' . __('Available agents') . ':</h4>';
echo "<form method=post action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime.editor&insert_downtime_agent=1&id_downtime=$id_downtime'>";
echo html_print_select ($agents, "id_agents[]", -1, '', _("Any"), -2, false, true, true, '', false, 'width: 180px;');

View File

@ -129,7 +129,8 @@ if (!$delete_template) {
alerts_meta_print_header ();
}
else {
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true);
//~ ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true);
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "", true);
}
}

View File

@ -265,7 +265,7 @@ $(document).ready (function () {
name: "id",
value: this.value});
jQuery.get (<?php echo "'" . ui_get_full_url("ajax.php", false, false, false) . "'"; ?>,
jQuery.post (<?php echo "'" . ui_get_full_url("ajax.php", false, false, false) . "'"; ?>,
values,
function (data, status) {
original_command = js_html_entity_decode (data["command"]);
@ -274,6 +274,7 @@ $(document).ready (function () {
render_command_description(command_description);
var max_fields = parseInt('<?php echo $config["max_macro_fields"]; ?>');
for (i = 1; i <= max_fields; i++) {
var old_value = '';
var old_recovery_value = '';

View File

@ -59,9 +59,12 @@ if ($a_template !== false) {
alerts_meta_print_header();
}
else {
//~ ui_print_page_header (__('Alerts') .
//~ ' &raquo; ' . __('Configure alert template'), "",
//~ false, "alerts_config", true);
ui_print_page_header (__('Alerts') .
' &raquo; ' . __('Configure alert template'), "",
false, "alerts_config", true);
false, "", true);
}
}
else {

View File

@ -1394,10 +1394,7 @@ $(document).ready (function () {
name: "get_recovery_fields",
value: "0"
});
jQuery.get (
<?php
echo "'" . ui_get_full_url("ajax.php", false, false, false) . "'";
?>,
jQuery.post (<?php echo "'" . ui_get_full_url("ajax.php", false, false, false) . "'"; ?>,
values,
function (data, status) {
var max_fields = parseInt('<?php echo $config["max_macro_fields"]; ?>');

View File

@ -41,7 +41,7 @@ $baseurl = ui_get_full_url(false, false, false, false);
var click_on_the_file_below_to_begin = "<?php echo __('Click on the file below to begin.'); ?>\n";
var updating = "<?php echo __('Updating'); ?>\n";
var package_updated_successfully = "<?php echo __('Package updated successfully.'); ?>\n";
var if_there_are_any_database_change = "<?php echo __('If there are any database change, it will be applied on the next login.'); ?>\n";
var if_there_are_any_database_change = "<?php echo __('If there are any database change, it will be applied.'); ?>\n";
var mr_available = "<?php echo __('Minor release available'); ?>\n";
var package_available = "<?php echo __('New package available'); ?>\n";
var mr_not_accepted = "<?php echo __('Minor release rejected. Changes will not apply.'); ?>\n";
@ -54,8 +54,9 @@ $baseurl = ui_get_full_url(false, false, false, false);
var package_success = "<?php echo __('Package updated successfully'); ?>\n";
var package_error = "<?php echo __('Error in package updated'); ?>\n";
var bad_mr_file = "<?php echo __('Database MR version is inconsistent, do you want to apply the package?'); ?>\n";
var text1_mr_file = "<?php echo __('There are a new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launch a '); ?>\n";
var mr_available_header = "<?php echo __('There are db changes'); ?>\n";
var text1_mr_file = "<?php echo __('There are new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launching '); ?>\n";
var text3_mr_file = "<?php echo __('planned downtime'); ?>\n";
var text4_mr_file = "<?php echo __(' to this process'); ?>\n";
var text1_package_file = "<?php echo __('There is a new update available'); ?>\n";

View File

@ -82,7 +82,7 @@ echo "<span class='loading' style='font-size:18pt;'>";
echo "<img src='images/wait.gif' />";
echo "</span><br><br>";
echo "<div><b>" . __('The last version of package installed is:') . "</b></div><br>";
echo "<div><b>" . __('The latest version of package installed is:') . "</b></div><br>";
echo "<div id='pkg_version' style='color:#82b92e;font-size:40pt;font-weight:bold;'>" . $current_package . "</div>";
echo "<div class='checking_package' style='font-size:18pt;width:100%; text-align: center; display: none;'>";

View File

@ -36,7 +36,7 @@ $buttons = array(
'offline' => array(
'active' => ($tab == 'offline') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">' .
html_print_image ("images/box.disabled.png", true, array ("title" => __('Offline update manager'))) .'</a>'),
html_print_image ("images/box.png", true, array ("title" => __('Offline update manager'))) .'</a>'),
'online' => array(
'active' => ($tab == 'online') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">' .

View File

@ -23,6 +23,7 @@ enterprise_hook('open_meta_frame');
include_once($config['homedir'] . "/include/functions_profile.php");
include_once($config['homedir'] . '/include/functions_users.php');
include_once ($config['homedir'] . '/include/functions_groups.php');
include_once ($config['homedir'] . '/include/functions_visual_map.php');
$meta = false;
if(enterprise_installed() && defined("METACONSOLE")) {
@ -30,6 +31,7 @@ if(enterprise_installed() && defined("METACONSOLE")) {
}
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
enterprise_include_once ('include/functions_dashboard.php');
//Add the columns for the enterprise Pandora edition.
$enterprise_include = false;
@ -129,6 +131,9 @@ if ($new_user && $config['admin_can_add_user']) {
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$user_info['id_skin'] = '';
}
$user_info['section'] = '';
$user_info['data_section'] = '';
//This attributes are inherited from global configuration
$user_info['block_size'] = $config["block_size"];
$user_info['flash_chart'] = $config["flash_charts"];
@ -158,12 +163,25 @@ if ($create_user) {
$values['comments'] = (string) get_parameter ('comments');
$values['is_admin'] = (int) get_parameter ('is_admin', 0);
$values['language'] = get_parameter ('language', 'default');
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$values['id_skin'] = (int) get_parameter ('skin', 0);
}
$values['block_size'] = (int) get_parameter ('block_size', $config["block_size"]);
$values['flash_chart'] = (int) get_parameter ('flash_charts', $config["flash_charts"]);
$values['section'] = get_parameter ('section');
if (($values['section'] == 'Event list') || ($values['section'] == 'Group view') || ($values['section'] == 'Alert detail') || ($values['section'] == 'Tactical view') || ($values['section'] == 'Default')) {
$values["data_section"] = '';
} else if ($values['section'] == 'Dashboard') {
$values["data_section"] = $dashboard;
} else if (io_safe_output($values['section']) == 'Visual console') {
$values["data_section"] = $visual_console;
} else if ($values['section'] == 'Other'){
$values["data_section"] = get_parameter ('data_section');
}
if (enterprise_installed()) {
$values['force_change_pass'] = 1;
$values['last_pass_change'] = date ("Y/m/d H:i:s", get_system_time());
@ -266,12 +284,27 @@ if ($update_user) {
$values['comments'] = (string) get_parameter ('comments');
$values['is_admin'] = get_parameter ('is_admin', 0 );
$values['language'] = (string) get_parameter ('language');
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$values['id_skin'] = get_parameter ('skin', 0);
}
$values['block_size'] = get_parameter ('block_size', $config["block_size"]);
$values['flash_chart'] = get_parameter ('flash_charts', $config["flash_charts"]);
$values['section'] = get_parameter ('section');
if (($values['section'] == 'Event list') || ($values['section'] == 'Group view') || ($values['section'] == 'Alert detail') || ($values['section'] == 'Tactical view') || ($values['section'] == 'Default')) {
$values["data_section"] = '';
} else if ($values['section'] == 'Dashboard') {
$values["data_section"] = $dashboard;
} else if (io_safe_output($values['section']) == 'Visual console') {
$values["data_section"] = $visual_console;
} else if ($values['section'] == 'Other'){
$values["data_section"] = get_parameter ('data_section');
}
if(enterprise_installed() && defined('METACONSOLE')) {
$values['metaconsole_access'] = get_parameter ('metaconsole_access');
$values['metaconsole_agents_manager'] = get_parameter ('metaconsole_agents_manager', '0');
@ -282,6 +315,7 @@ if ($update_user) {
$values["strict_acl"] = (bool)get_parameter ('strict_acl', false);
$values["session_time"] = (int)get_parameter('session_time', 0);
$res1 = update_user ($id, $values);
if ($config['user_can_update_password']) {
@ -324,7 +358,8 @@ if ($update_user) {
' Phone: ' . $values['phone'] . ' Comments: ' . $values['comments'] .
' Is_admin: ' . $values['is_admin'] .
' Language: ' . $values['language'] .
' Block size: ' . $values['block_size'] . ' Flash Chats: ' . $values['flash_chart'];
' Block size: ' . $values['block_size'] . ' Flash Chats: ' . $values['flash_chart'] .
' Section: ' . $values['section'];
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$info .= ' Skin: ' . $values['id_skin'];
@ -512,15 +547,59 @@ if (!$meta) {
}
}
$table->data[11][0] = __('Interactive charts'). ' ' .ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true) ;
$table->data[11][0] = __('Interactive charts').' '.ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true) ;
$values = array(-1 => __('Use global conf'), 1 => __('Yes'), 0 => __('No'));
$table->data[11][1] = html_print_select($values, 'flash_charts',
$user_info["flash_chart"], '', '', -1, true, false, false);
$table->data[12][0] = __('Block size for pagination');
$table->data[12][1] = html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true);
$table->data[12][0] = __('Home screen').
ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true);
$values = array (
'Default' =>__('Default'),
'Visual console'=>__('Visual console'),
'Event list'=>__('Event list'),
'Group view'=>__('Group view'),
'Tactical view'=>__('Tactical view'),
'Alert detail' => __('Alert detail'),
'Other'=>__('Other'));
if (enterprise_installed()) {
$values['Dashboard'] = __('Dashboard');
}
$table->data[12][1] = html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false);
if (enterprise_installed()) {
$dashboards = dashboard_get_dashboards();
$dashboards_aux = array();
if ($dashboards === false) {
$dashboards = array('None'=>'None');
}
else {
foreach ($dashboards as $key => $dashboard) {
$dashboards_aux[$dashboard['name']] = $dashboard['name'];
}
}
$table->data[12][1] .= html_print_select ($dashboards_aux, 'dashboard', $user_info["data_section"], '', '', '', true);
}
$layouts = visual_map_get_user_layouts ($config['id_user'], true);
$layouts_aux = array();
if ($layouts === false) {
$layouts_aux = array('None'=>'None');
}
else {
foreach ($layouts as $layout) {
$layouts_aux[$layout] = $layout;
}
}
$table->data[12][1] .= html_print_select ($layouts_aux, 'visual_console', $user_info["data_section"], '', '', '', true);
$table->data[12][1] .= html_print_input_text ('data_section', $user_info["data_section"], '', 60, 255, true, false);
$table->data[13][0] = __('Block size for pagination');
$table->data[13][1] = html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true);
if ($id == $config['id_user']) {
$table->data[12][1] .= html_print_input_hidden('quick_language_change', 1, true);
$table->data[13][1] .= html_print_input_hidden('quick_language_change', 1, true);
}
if (enterprise_installed() && defined('METACONSOLE')) {
@ -528,25 +607,25 @@ if (enterprise_installed() && defined('METACONSOLE')) {
if (isset($user_info["metaconsole_access"])) {
$user_info_metaconsole_access = $user_info["metaconsole_access"];
}
$table->data[12][0] = __('Metaconsole access'). ' ' .ui_print_help_icon ('meta_access', true);
$table->data[13][0] = __('Metaconsole access'). ' ' .ui_print_help_icon ('meta_access', true);
$metaconsole_accesses = array('basic' => __('Basic'),
'advanced' => __('Advanced'));
$table->data[12][1] = html_print_select($metaconsole_accesses,
$table->data[13][1] = html_print_select($metaconsole_accesses,
'metaconsole_access', $user_info_metaconsole_access,
'','',-1,true, false, false);
}
$table->data[13][0] = __('Not Login');
$table->data[13][0] .= ui_print_help_tip(__('The user with not login set only can access to API.'), true);
$table->data[13][1] = html_print_checkbox('not_login', 1, $user_info["not_login"], true);
$table->data[14][0] = __('Not Login');
$table->data[14][0] .= ui_print_help_tip(__('The user with not login set only can access to API.'), true);
$table->data[14][1] = html_print_checkbox('not_login', 1, $user_info["not_login"], true);
$table->data[14][0] = __('Strict ACL');
$table->data[14][0] .= ui_print_help_tip(__('With this option enabled, the user will can access to accurate information. It is not recommended for admin users because performance could be affected'), true);
$table->data[14][1] = html_print_checkbox('strict_acl', 1, $user_info["strict_acl"], true);
$table->data[15][0] = __('Strict ACL');
$table->data[15][0] .= ui_print_help_tip(__('With this option enabled, the user will can access to accurate information. It is not recommended for admin users because performance could be affected'), true);
$table->data[15][1] = html_print_checkbox('strict_acl', 1, $user_info["strict_acl"], true);
$table->data[15][0] = __('Session Time');
$table->data[15][0] .= ui_print_help_tip(__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), true);
$table->data[15][1] = html_print_input_text ('session_time', $user_info["session_time"], '', 5, 5, true);
$table->data[16][0] = __('Session Time');
$table->data[16][0] .= ui_print_help_tip(__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), true);
$table->data[16][1] = html_print_input_text ('session_time', $user_info["session_time"], '', 5, 5, true);
if($meta) {
enterprise_include('include/functions_metaconsole.php');
@ -738,6 +817,56 @@ $(document).ready (function () {
$('input:radio[name="is_admin"]').trigger('change');
$('#checkbox-metaconsole_agents_manager').trigger('change');
show_data_section();
});
function show_data_section () {
section = $("#section").val();
switch (section) {
case <?php echo "'" . 'Dashboard' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Visual console' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "");
break;
case <?php echo "'" . 'Event list' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Group view' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Tactical view' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Alert detail' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Other' . "'"; ?>:
$("#text-data_section").css("display", "");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Default' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
}
}
/* ]]> */
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -22,8 +22,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC170508';
$pandora_version = 'v7.0NG.702';
$build_version = 'PC170517';
$pandora_version = 'v7.0NG.703';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -1990,9 +1990,32 @@ function get_os_name ($id_os) {
* @return array Dashboard name of the given user.
*/
function get_user_dashboards ($id_user) {
$sql = "SELECT name
FROM tdashboard
WHERE id_user="."'".$id_user."'";
if (users_is_admin($id_user)) {
$sql = "SELECT name
FROM tdashboard WHERE id_user = '" . $id_user ."' OR id_user = ''";
}
else {
$user_can_manage_all = users_can_manage_group_all('RR');
if ($user_can_manage_all) {
$sql = "SELECT name
FROM tdashboard WHERE id_user = '" . $id_user ."' OR id_user = ''";
}
else {
$user_groups = users_get_groups($id_user, "RR", false);
if (empty($user_groups)) {
return false;
}
$u_groups = array();
foreach ($user_groups as $id => $group_name) {
$u_groups[] = $id;
}
$sql = "SELECT name
FROM tdashboard
WHERE id_group IN (" . implode(",", $u_groups) . ") AND (id_user = '" . $id_user ."' OR id_user = '')";
}
}
return db_get_all_rows_sql ($sql);
}

View File

@ -1836,6 +1836,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
continue;
$agent_name = agents_get_name($id_agent, "");
$agent_alias = io_safe_output(agents_get_alias($id_agent));
/* Check for deletion permissions */
$id_group = agents_get_agent_group ($id_agent);
@ -1943,6 +1944,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
if (enterprise_hook('config_agents_has_remote_configuration', array($id_agent))) {
$agent_name = agents_get_name($id_agent);
$agent_name = io_safe_output($agent_name);
$agent_alias = io_safe_output(agents_get_alias($id_agent));
$agent_md5 = md5 ($agent_name, false);
// Agent remote configuration editor
@ -1957,7 +1959,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
if ($error) {
db_pandora_audit( "Agent management",
"Error: Deleted agent '$agent_name', the error is in the delete conf or md5.");
"Error: Deleted agent '$agent_alias', the error is in the delete conf or md5.");
}
}
}
@ -1969,7 +1971,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
db_process_sql ("delete from ttag_module where id_agente_modulo in (select id_agente_modulo from tagente_modulo where id_agente = ".$id_agent.")");
db_pandora_audit( "Agent management",
"Deleted agent '$agent_name'");
"Deleted agent '$agent_alias'");
// Delete the agent from the metaconsole cache
enterprise_include_once('include/functions_agents.php');

View File

@ -353,9 +353,12 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
elseif ($period < SECONDS_1MONTH) {
$time_format = "M \nd H\h";
}
else {
elseif ($period < SECONDS_6MONTHS) {
$time_format = "M \nd H\h";
}
else {
$time_format = "M Y";
}
}
else {
// Set the title and time format
@ -371,9 +374,12 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
elseif ($period < SECONDS_1MONTH) {
$time_format = "M d H\h";
}
else {
elseif ($period < SECONDS_6MONTHS) {
$time_format = "M d H\h";
}
else {
$time_format = "M Y";
}
}
$timestamp_short = date($time_format, $timestamp);
@ -2304,10 +2310,9 @@ function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value
require_once("include_graph_dependencies.php");
include_graphs_dependencies($config['homedir'].'/');
$src = ui_get_full_url(
"/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbar" .
"&width=".$width."&height=".$height."&progress=".$progress.
"&width=".$width."&homedir=".$config['homedir']."&height=".$height."&progress=".$progress.
"&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str .
"&title=".$title."&font=".$config['fontpath']."&value_text=". $value_text .
"&colorRGB=". $colorRGB, false, false, false

View File

@ -737,7 +737,7 @@ function html_print_extended_select_for_time ($name, $selected = '',
if (!is_user_admin($config['id_user'])) {
unset($fields[-1]);
$returnString = html_print_select ($fields, $name, $selected,"" . $script,
$returnString = html_print_select ($fields, $name . '_select', $selected,"" . $script,
$nothing, $nothing_value, true, false, false, '', false, 'font-size: xx-small;'.$select_style);
if ($return) {

View File

@ -49,6 +49,9 @@ function menu_print_menu (&$menu) {
'') .
'>';
// Use $config because a global var is required because normal
// and godmode menu are painted separately
if (!isset($config['count_main_menu'])) $config['count_main_menu'] = 0;
foreach ($menu as $mainsec => $main) {
$extensionInMenuParameter = (string) get_parameter ('extension_in_menu','');
@ -369,6 +372,12 @@ function menu_print_menu (&$menu) {
$sub_title = '';
}
// Added a top on inline styles
$top = menu_calculate_top($config['count_main_menu'], $count_sub, $count_sub2);
if ($top !== 0) {
$display = rtrim($display, "'");
$display .= "top: " . $top . "px;'";
}
//Add submenu2 to submenu string
$submenu_output .= "<ul id='sub" . str_replace(' ','_',$sub["id"]) . "' class=submenu2 $display>";
$submenu_output .= $submenu2_list;
@ -419,10 +428,12 @@ function menu_print_menu (&$menu) {
$visible = false;
}
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">';
$top = menu_calculate_top($config["count_main_menu"], $count_sub);
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'" style="top: ' . $top . 'px">';
$output .= $submenu_output;
$output .= '</ul>';
}
$config["count_main_menu"]++;
$output .= '</li>';
echo $output;
$menu_selected = false;
@ -718,4 +729,31 @@ function menu_sec3_in_sec2($sec,$sec2,$sec3) {
return false;
}
// Positionate the menu element. Added a negative top.
// 35px is the height of a menu item
function menu_calculate_top($level1, $level2, $level3 = false) {
$level2--;
if ($level3 !== false) {
// If level3 is set, the position is calculated like box is in the center.
// wiouth considering level2 box can be moved.
$level3--;
$total = $level1 + $level3;
$comp = $level3;
} else {
$total = $level1 + $level2;
$comp = $level2;
}
// Positionate in the middle
if ($total > 12 && (($total < 18) || (($level1 - $comp) <= 4))) {
return - ( floor($comp/2) * 35);
}
// Positionate in the bottom
if ($total >= 18) {
return - $comp * 35;
}
// return 0 by default
return 0;
}
?>

View File

@ -1068,6 +1068,8 @@ function ui_print_alert_template_example ($id_alert_template, $return = false, $
* @return string The help tip
*/
function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image = "images/help.png") {
global $config;
if (empty($home_url))
$home_url = "";
@ -1078,7 +1080,7 @@ function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image =
$output = html_print_image ($image, true,
array ("class" => "img_help",
"title" => __('Help'),
"onclick" => "open_help ('" . $help_id . "','" . $home_url . "')"));
"onclick" => "open_help ('" . $help_id . "','" . $home_url . "','" . $config['id_user'] . "')"));
if (!$return)
echo $output;

View File

@ -354,8 +354,9 @@ function update_manager_check_online_free_packages ($is_ajax=true) {
var package_success = "<?php echo __('Package updated successfully'); ?>\n";
var package_error = "<?php echo __('Error in package updated'); ?>\n";
var bad_mr_file = "<?php echo __('Database MR version is inconsistent, do you want to apply the package?'); ?>\n";
var text1_mr_file = "<?php echo __('There are a new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launch a '); ?>\n";
var mr_available_header = "<?php echo __('There are db changes'); ?>\n";
var text1_mr_file = "<?php echo __('There are new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launching '); ?>\n";
var text3_mr_file = "<?php echo __('planned downtime'); ?>\n";
var text4_mr_file = "<?php echo __(' to this process'); ?>\n";
var text1_package_file = "<?php echo __('There is a new update available'); ?>\n";

View File

@ -40,6 +40,11 @@ else $graph_type = '';
ob_start ();
if (!empty($graph_type)) {
$homedir = $_GET['homedir'];
if ($homedir != null) {
$config['homedir'] = $homedir;
}
include_once($homeurl . 'include/functions.php');
include_once($homeurl . 'include/functions_html.php');

View File

@ -36,9 +36,11 @@ function clippy_extension_cron_send_email() {
'intro' => '<table>' .
'<tr>' .
'<td class="context_help_body">' .
'<div style="word-break: break-word;">' .
__('The configuration of email for the task email is in the file:') . '<br />' .
'&lt;www&gt;/pandora_console/enterprise/extensions/cron/email_config.php <br />' .
__('Please check if the email configuration is correct.') .
'</div>' .
'</td>' .
'</tr>' .
'</table>'

View File

@ -61,6 +61,7 @@ Besides the defined module macros, the following macros are available:
<li>_moduletags_: URLs associated to the modules tags.</li>
<li>_alert_critical_instructions_: Instructions for CRITICAL status contained in the module.</li>
<li>_alert_warning_instructions_: Instructions for WARNING status contained in the module.</li>
<li>_alert_unknown_instructions_: Instructions for UNKNOWN status contained in the module.</li>
<li>_modulegraph_<i>n</i>h_: (>=6.0) (Only for alerts that use the command <i>eMail</i>)
Returns an image encoded in base64 of a modules graph with a period of <i>n</i> hours (eg. _modulegraph_24h_).
A correct setup of the connection between the server and the console's API is required.

View File

@ -1,11 +1,31 @@
<h1>Cascade protection</h1>
<h1 style='text-align:center;'>Cascade protection</h1>
<br>
<?php html_print_image("images/help/cascade_protection_ilustration.png", false); ?>
<h2>Agent cascade protection</h2>
<hr>
<div style='text-align:center;'>
<?php html_print_image("images/help/cascade_protection_agent.png", false); ?>
</div>
<br>
<p>
This option should be assigned to avoid an “alert storm” that can come in because a group of agents are unreachable. This type of behaviour occurs when an intermediary device, like for example a router, is down and all devices behind it, therefore, cannot be reached. Probably these devices arent down and chances indicate that theyre working with another router in HA mode. But, if nothing is done, its likely for Pandora FMS to think that theyre down since they cant be tested using a Remote ICMP Proc test (a Ping check).
<br><br>
When you enable <i>cascade protection</i> for an agent, this means that if any of its parents has a CRITICAL alert fired, then the agents alerts WILL NOT BE fired. If the agent's parent has a module in CRITICAL or several alerts with less criticality than CRITICAL, alerts from the agent will be fired as normal if needed. Cascade protection checks parent alerts with CRITICAL priority, including the correlated alerts assigned to the parent.
When you enable <i>cascade protection</i> for an agent, this means that if any of its parents has a CRITICAL alert fired, then the agents alerts <strong>WILL NOT BE</strong> fired. If the agent's parent has a module in CRITICAL or several alerts with less criticality than CRITICAL, alerts from the agent will be fired as normal if needed. Cascade protection checks parent alerts with CRITICAL priority, including the correlated alerts assigned to the parent.
<br><br>
If you want to use an advanced cascade protection system, just use correlation among successive parents, and just enable Cascade Protection for the children.
</p>
<br>
<h2>Module cascade protection</h2>
<hr>
<div style='text-align:center;'>
<?php html_print_image("images/help/cascade_protection_module.png", false); ?>
<br>
</div>
<p>
This option should be assigned to avoid an “alert storm” that can come in because a group of agents are unreachable. This type of behaviour occurs when an intermediary device, like for example a router, is down and all devices behind it, therefore, cannot be reached. Probably these devices arent down and chances indicate that theyre working with another router in HA mode. But, if nothing is done, its likely for Pandora FMS to think that theyre down since they cant be tested using a Remote ICMP Proc test (a Ping check).
<br><br>
When you enable <i>cascade protection</i> for an module, this means that if this parent agent module has a CRITICAL alert fired, then agent alerts <strong>WILL NOT BE</strong> fired.
<br><br>
If you want to use an advanced cascade protection system, just use correlation among successive parents, and just enable Cascade Protection for the children.
</p>

View File

@ -61,6 +61,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
<li>_moduletags_: URLs asociadas a los tags de módulos.</li>
<li>_alert_critical_instructions_: Instrucciones contenidas en el módulo para un estado CRITICAL.</li>
<li>_alert_warning_instructions_: Instrucciones contenidas en el módulo para un estado WARNING.</li>
<li>_alert_unknown_instructions_: Instrucciones contenidas en el módulo para un estado UNKNOWN.</li>
<li>_modulegraph_<i>n</i>h_: (>=6.0) (Solo para alertas que usen el comando <i>eMail</i>)
Devuelve una imagen codificada en base64 de una gráfica del módulo con un período de <i>n</i> horas (eg. _modulegraph_24h_).
Requiere de una configuración correcta de la conexión del servidor a la consola vía api,

View File

@ -1,17 +1,31 @@
<h1>Protección en Cascada</h1>
<h1 style='text-align:center;'>Protección en Cascada</h1>
<br>
<?php html_print_image("images/help/cascade_protection_ilustration.png", false); ?>
<h2>Protección en cascada por agente</h2>
<hr>
<div style='text-align:center;'>
<?php html_print_image("images/help/cascade_protection_agent.png", false); ?>
</div>
<br>
<p>
Esta opción se designa para evitar una "tormenta" de alertas que entren porque un grupo de agentes son inalcanzables. Este tipo de comportamiento ocurre cuando un dispositivo intermedio, como por ejemplo un router, está caido, y todos los dispositivos que están tras él no se pueden alcanzar. Probablemente estos dispositivos no estén caídos e incluso estos dispositivos estén trabajando junto con otro router, en modo HA. Pero si no hace nada, probablemente Pandora FMS piense que estén caídos porque no los pueden testar con un Remote ICMP Proc Test (un ping).
<br><br>
Cuando habilite <i>cascade protection</i> en un agente, esto significa que si cualquiera de sus padres tiene una alerta CRÍTICA disparada, entonces las alertas del agente NO SERÁN disparadas. Si el padre del agente tiene un módulo en CRITICAL o varias alertas con menor criticidad que CRITICAL, las alertas del agente serán disparadas si deben hacerlo. La protección en cascada comprueba las alertas padre con criticidad CRITICAL, incluyendo las alertas de correlación asignadas al padre.
Cuando habilite <i>cascade protection</i> en un agente, esto significa que si cualquiera de sus padres tiene una alerta CRÍTICA disparada, entonces las alertas del agente <strong>NO SERÁN</strong> disparadas. Si el padre del agente tiene un módulo en CRITICAL o varias alertas con menor criticidad que CRITICAL, las alertas del agente serán disparadas si deben hacerlo. La protección en cascada comprueba las alertas padre con criticidad CRITICAL, incluyendo las alertas de correlación asignadas al padre.
<br><br>
Si quiere usar un sistema avanzado de protección en cascada, sólo tiene que usar correlación entre padres sucesivos, y que sólo habilite la Protección en Cascada en los hijos.
</p>
<br>
<h2>Protección en cascada por módulo</h2>
<hr>
<div style='text-align:center;'>
<?php html_print_image("images/help/cascade_protection_module.png", false); ?>
</div>
<br>
<p>
Esta opción se designa para evitar una "tormenta" de alertas que entren porque un grupo de agentes son inalcanzables. Este tipo de comportamiento ocurre cuando un dispositivo intermedio, como por ejemplo un router, está caido, y todos los dispositivos que están tras él no se pueden alcanzar. Probablemente estos dispositivos no estén caídos e incluso estos dispositivos estén trabajando junto con otro router, en modo HA. Pero si no hace nada, probablemente Pandora FMS piense que estén caídos porque no los pueden testar con un Remote ICMP Proc Test (un ping).
<br><br>
Cuando habilite <i>cascade protection</i> en un módulo de un agente, esto significa que si este módulo del agente padre tiene una alerta CRÍTICA disparada, entonces las alertas del agente <strong>NO SERÁN</strong> disparadas.
<br><br>
Si quiere usar un sistema avanzado de protección en cascada, sólo tiene que usar correlación entre padres sucesivos, y que sólo habilite la Protección en Cascada en los hijos.
</p>

View File

@ -60,6 +60,7 @@
<li>_moduletags_ : モジュールタグに関連付けられた URL。</li>
<li>_alert_critical_instructions_: モジュールの障害状態時手順。</li>
<li>_alert_warning_instructions_: モジュールの警告状態時手順。</li>
<li>_alert_unknown_instructions_: Instructions for UNKNOWN status contained in the module.</li>
<li>_modulegraph_<i>n</i>h_: (>=6.0) (<i>eMail</i>コマンドを使うアラートのみ)
n で示す期間の base64 でエンコードされたモジュールグラフを返します。(: _modulegraph_24h_) サーバとコンソールの API の設定が正しくできている必要があります。この設定は、サーバの設定ファイルで行います。 </li>
</ul>

View File

@ -33,7 +33,7 @@
$(document).ready (function () {
$("a#show_messages_dialog").click (function () {
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{"page": "operation/messages/message_list"},
function (data, status) {
$("#dialog_messages").hide ()
@ -60,7 +60,7 @@ $(document).ready (function () {
$("a.show_systemalert_dialog").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{"page": "operation/system_alert"},
function (data, status) {
$("#alert_messages").hide ()
@ -75,9 +75,11 @@ $(document).ready (function () {
$("a.modalpopup").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
{"page": "general/alert_enterprise",
"message":$(this).attr("id")},
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message": $(this).attr("id")
},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
@ -93,10 +95,11 @@ $(document).ready (function () {
$(".publienterprise").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message":$(this).attr("id")},
"page": "general/alert_enterprise",
"message": $(this).attr("id")
},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
@ -112,10 +115,11 @@ $(document).ready (function () {
$(".publienterprisehide").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message":$(this).attr("id")},
"page": "general/alert_enterprise",
"message": $(this).attr("id")
},
function (data, status) {
$("#alert_messages").hide ()
.empty ()

View File

@ -22,8 +22,8 @@ function winopeng_var (url, wid, width, height) {
status = wid;
}
function open_help (help_id, home_url) {
open (home_url+"general/pandora_help.php?id="+help_id, "pandorahelp", "width=650,height=500,status=0,toolbar=0,menubar=0,scrollbars=1,location=0");
function open_help (help_id, home_url, id_user) {
open (home_url+"general/pandora_help.php?id="+help_id+"&id_user="+id_user, "pandorahelp", "width=650,height=500,status=0,toolbar=0,menubar=0,scrollbars=1,location=0");
}
/**

View File

@ -201,49 +201,6 @@ li:hover ul { display: block; }
background: url(../../images/um_messages.menu.png) no-repeat 50% 50%;
}
#subicon_god-setup {
top: -140px;
}
#subBulk_operations {
top: -210px;
}
#subicon_god-servers {
top: -120px;
}
#subicon_god-alerts {
top: -70px;
}
#subicon_god-links {
top: -140px;
}
#subicon_god-extensions {
top: -180px;
}
#subicon_god-um_messages {
top: -90px;
}
#subicon_god-configuration {
top: -100px;
}
#subDB_maintenance {
top: -120px;
}
#subExtension_manager {
top: -100px;
}
#subSetup {
top: -80px;
}
#menu_container {
z-index: 3;
position: absolute;

View File

@ -1884,7 +1884,7 @@ div.warn {
/* Submenus havent borders */
.submenu_not_selected, .submenu_selected, .submenu2 {
border: 0px !important;
min-height: 0px !important;
min-height: 35px !important;
}
/* Pandora width style theme */

View File

@ -1948,7 +1948,7 @@ div.warn {
/* Submenus havent borders */
.submenu_not_selected, .submenu_selected, .submenu2 {
border: 0px !important;
min-height: 0px !important;
min-height: 35px !important;
}
/* Pandora width style theme */

View File

@ -1939,7 +1939,7 @@ div.warn {
/* Submenus havent borders */
.submenu_not_selected, .submenu_selected, .submenu2 {
border: 0px !important;
min-height: 0px !important;
min-height: 35px !important;
}
/* Pandora width style theme */

View File

@ -453,7 +453,7 @@ if (! isset ($config['id_user'])) {
db_logon ($nick_in_db, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $nick_in_db;
$config['id_user'] = $nick_in_db;
config_prepare_session();
if (is_user_admin($config['id_user'])) {
// PHP configuration values
$PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize'));

View File

@ -70,8 +70,8 @@
<body>
<div style='height: 10px'>
<?php
$version = '7.0NG.702';
$build = '170508';
$version = '7.0NG.703';
$build = '170517';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -1014,4 +1014,4 @@ echo '<div style="clear:both;">&nbsp;</div>';
}
}
</script>
</script>

View File

@ -288,6 +288,7 @@ if (!$meta) {
if (enterprise_installed()) {
$dashboards = get_user_dashboards ($config['id_user']);
$dashboards_aux = array();
if ($dashboards === false) {
$dashboards = array('None'=>'None');

View File

@ -84,7 +84,7 @@ if ($layout) {
//~ ob_start();
//~ // Render map
visual_map_print_visual_map($id_layout, true, true, $width, $height,
'../../', true, $graph_javascript, true);
'../../', true, true, true);
//~ return;
}
else {
@ -92,7 +92,7 @@ else {
}
// Floating menu - Start
echo '<div id="vc-controls">';
echo '<div id="vc-controls" style="z-index:300;">';
echo '<div id="menu_tab">';
echo '<ul class="mn">';
@ -191,6 +191,75 @@ $ignored_params['refr'] = '';
startCountDown(refr, false);
});
$('body').css('background-color','<?php echo $layout["background_color"]; ?>');
$('body').css('margin','0');
$('body').css('height','100%');
$('body').css('overflow','hidden');
$(".module_graph .menu_graph").css('display','none');
$(".parent_graph").each(function(){
if($(this).css('background-color') != 'rgb(255, 255, 255)'){
$(this).css('color', '#999');
}
});
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
$('.item:not(.icon) img').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
$(this).css('margin-left','');
}
else{
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$('.item > div').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2-15)+'px');
$(this).css('margin-left','');
}
else{
$(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$('.item > a > div').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2-5)+'px');
$(this).css('margin-left','');
}
else{
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$(".graph:not([class~='noresizevc'])").each(function(){
height = parseInt($(this).css("height")) - 30;
$(this).css('height', height);
});
// Start the map fetch
//~ fetchMap();
});

View File

@ -230,6 +230,11 @@ $ignored_params['refr'] = '';
}
});
$(".graph:not([class~='noresizevc'])").each(function(){
height = parseInt($(this).css("height")) - 30;
$(this).css('height', height);
});
});
</script>

View File

@ -198,6 +198,9 @@ if ($config['pure']) {
/* Avoid the main_pure container 1000px height */
body.pure {
min-height: 100px;
margin: 0px;
overflow: hidden;
height: 100%;
<?php
echo "background-color: ".$layout['background_color'].";";
?>

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.702
%define release 170508
%define version 7.0NG.703
%define release 1
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.702
%define release 170508
%define version 7.0NG.703
%define release 1
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -9,7 +9,7 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.702"
PI_VERSION="7.0NG.703"
FORCE=0
DESTDIR=""
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`

View File

@ -112,7 +112,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('MR', 0),
('identification_reminder', 1),
('identification_reminder_timestamp', 0),
('current_package_enterprise', '700'),
('current_package_enterprise', '703'),
('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}');
UNLOCK TABLES;
@ -1091,7 +1091,7 @@ INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `o
-- GIS Data
INSERT INTO `tgis_map` VALUES (1,'Sample',-3.708187,40.42056,0,16,'',-3.708187,40.42056,0,0,1);
INSERT INTO `tgis_map_connection` VALUES (1,'OpenStreetMap (MapQuest Open)','OSM','{\"type\":\"OSM\",\"url\":\"http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
INSERT INTO `tgis_map_connection` VALUES (1,'OpenStreetMap (MapQuest Open)','OSM','{\"type\":\"OSM\",\"url\":\"http://tile.openstreetmap.org/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
INSERT INTO `tgis_map_connection` VALUES (2,'OpenStreetMap (Standard)','OSM','{\"type\":\"OSM\",\"url\":\"http://tile.openstreetmap.org/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
INSERT INTO `tgis_map_has_tgis_map_con` VALUES (1,1,'2010-03-01 09:46:48',1);
INSERT INTO `tgis_map_layer` VALUES (1,'Group All',1,0,1,0);

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.702-170508
Version: 7.0NG.703
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.702-170508"
pandora_version="7.0NG.703"
package_cpan=0
package_pandora=1

View File

@ -1,7 +1,7 @@
#############################################################################
# Pandora FMS Server Parameters
# Pandora FMS, the Flexible Monitoring System.
# Version 7.0NG.702
# Version 7.0NG.703
# Licensed under GPL license v2,
# (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -42,8 +42,8 @@ our @EXPORT = qw(
);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.702";
my $pandora_build = "170508";
my $pandora_version = "7.0NG.703";
my $pandora_build = "170517";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -560,6 +560,7 @@ sub pandora_process_alert ($$$$$$$$;$) {
$alert->{'critical_instructions'} = $critical_instructions;
$alert->{'warning_instructions'} = $warning_instructions;
$alert->{'unknown_instructions'} = $unknown_instructions;
# Generate an event
if ($table eq 'tevent_alert') {
@ -769,6 +770,7 @@ sub pandora_execute_alert ($$$$$$$$$;$) {
$alert->{'critical_instructions'} = $critical_instructions;
$alert->{'warning_instructions'} = $warning_instructions;
$alert->{'unknown_instructions'} = $unknown_instructions;
# Execute actions
my $event_generated = 0;
@ -995,6 +997,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
_alert_text_severity_ => get_priority_name($alert->{'priority'}),
_alert_critical_instructions_ => $alert->{'critical_instructions'},
_alert_warning_instructions_ => $alert->{'warning_instructions'},
_alert_unknown_instructions_ => $alert->{'unknown_instructions'},
_groupcontact_ => (defined ($group)) ? $group->{'contact'} : '',
_groupcustomid_ => (defined ($group)) ? $group->{'custom_id'} : '',
_groupother_ => (defined ($group)) ? $group->{'other'} : '',
@ -2681,7 +2684,7 @@ sub pandora_delete_module ($$;$) {
my $agent_name = get_agent_name($dbh, $module->{'id_agente'});
if ((defined($conf)) && (-e $conf->{incomingdir}.'/conf/'.md5($agent_name).'.conf')) {
if ((defined($conf)) && (-e $conf->{incomingdir}.'/conf/'.md5(encode_utf8(safe_output($agent_name))).'.conf')) {
enterprise_hook('pandora_delete_module_from_conf', [$conf,$agent_name,$module->{'nombre'}]);
}
@ -2979,12 +2982,11 @@ sub pandora_delete_agent ($$;$) {
if (defined $conf) {
# Delete the conf files
if (-e $conf->{incomingdir}.'/conf/'.md5($agent_name).'.conf') {
unlink($conf->{incomingdir}.'/conf/'.md5($agent_name).'.conf');
}
if (-e $conf->{incomingdir}.'/md5/'.md5($agent_name).'.md5') {
unlink($conf->{incomingdir}.'/md5/'.md5($agent_name).'.md5');
}
my $conf_fname = $conf->{incomingdir}.'/conf/'.md5(encode_utf8(safe_output($agent_name))).'.conf';
unlink($conf_fname) if (-f $conf_fname);
my $md5_fname = $conf->{incomingdir}.'/md5/'.md5(encode_utf8(safe_output($agent_name))).'.md5';
unlink($md5_fname) if (-f $md5_fname);
}
foreach my $module (@modules) {
@ -4070,17 +4072,29 @@ sub pandora_inhibit_alerts {
return 0 if ($agent->{'cascade_protection'} ne '1' || $agent->{'id_parent'} eq '0' || $depth > 1024);
# Are any of the parent's critical alerts fired?
my $count = get_db_value ($dbh, 'SELECT COUNT(*) FROM tagente_modulo, talert_template_modules, talert_templates
my $count = 0;
if ($agent->{'cascade_protection_module'} != 0) {
$count = get_db_value ($dbh, 'SELECT COUNT(*) FROM tagente_modulo, talert_template_modules, talert_templates
WHERE tagente_modulo.id_agente = ?
AND tagente_modulo.id_agente_modulo = ?
AND tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module
AND tagente_modulo.disabled = 0
AND talert_template_modules.id_alert_template = talert_templates.id
AND talert_template_modules.times_fired > 0
AND talert_templates.priority = 4', $agent->{'id_parent'}, $agent->{'cascade_protection_module'});
}
else {
$count = get_db_value ($dbh, 'SELECT COUNT(*) FROM tagente_modulo, talert_template_modules, talert_templates
WHERE tagente_modulo.id_agente = ?
AND tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module
AND tagente_modulo.disabled = 0
AND talert_template_modules.id_alert_template = talert_templates.id
AND talert_template_modules.times_fired > 0
AND talert_templates.priority = 4', $agent->{'id_parent'});
return 1 if ($count > 0);
}
return 1 if (defined($count) && $count > 0);
# Check the parent's parent next
$agent = get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE id_agente = ?', $agent->{'id_parent'});
return 0 unless defined ($agent);

View File

@ -339,8 +339,8 @@ sub pandora_snmp_get_command ($$$$$$$$$$$) {
# Makes a call to SNMP modules to get a value,
##########################################################################
sub pandora_query_snmp ($$$) {
my ($pa_config, $module, $dbh) = @_;
sub pandora_query_snmp ($$$$) {
my ($pa_config, $module, $ip_target, $dbh) = @_;
my $snmp_version = $module->{"tcp_send"}; # (1, 2, 2c or 3)
my $snmp3_privacy_method = $module->{"custom_string_1"}; # DES/AES
@ -350,7 +350,7 @@ sub pandora_query_snmp ($$$) {
my $snmp3_auth_pass = pandora_output_password($pa_config, $module->{"plugin_pass"});
my $snmp3_auth_method = $module->{"plugin_parameter"}; #MD5/SHA1
my $snmp_community = $module->{"snmp_community"};
my $snmp_target = $module->{"ip_target"};
my $snmp_target = $ip_target;
my $snmp_oid = $module->{"snmp_oid"};
my $snmp_port = $module->{"tcp_port"};
@ -493,7 +493,7 @@ sub exec_network_module ($$$$) {
($id_tipo_modulo == 16) ||
($id_tipo_modulo == 17)) {
($module_data, $module_result) = pandora_query_snmp ($pa_config, $module, $dbh);
($module_data, $module_result) = pandora_query_snmp ($pa_config, $module, $ip_target, $dbh);
if ($module_result == 0) { # A correct SNMP Query
# SNMP_DATA_PROC

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version 7.0NG.702
%define release 170508
%define version 7.0NG.703
%define release 1
Summary: Pandora FMS Server
Name: %{name}

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version 7.0NG.702
%define release 170508
%define version 7.0NG.703
%define release 1
Summary: Pandora FMS Server
Name: %{name}

View File

@ -8,8 +8,8 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.702"
PI_BUILD="170508"
PI_VERSION="7.0NG.703"
PI_BUILD="170517"
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.702 PS170508";
my $version = "7.0NG.703 PS170517";
# Pandora server configuration
my %conf;
@ -93,7 +93,7 @@ sub pandora_purgedb ($$) {
}
# Delete old inventory data
if ($conf->{'_inventory_purge'} > 0) {
if (defined($conf->{'_inventory_purge'}) && $conf->{'_inventory_purge'} > 0) {
if (enterprise_load (\%conf) != 0) {
my $ulimit_timestamp_inventory = time() - (86400 * $conf->{'_inventory_purge'});

View File

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