Merge remote-tracking branch 'origin/develop' into feature#new-iface-names

This commit is contained in:
Ramon Novoa 2017-03-10 10:32:46 +01:00
commit 4a739775c9
62 changed files with 112 additions and 599 deletions

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version NG_BETA, AIX version
# Version 7.0NG_BETA, 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 NG_BETA, FreeBSD Version
# Version 7.0NG_BETA, 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 NG_BETA, HP-UX Version
# Version 7.0NG_BETA, 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 NG_BETA, GNU/Linux
# Version 7.0NG_BETA, 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 NG_BETA, GNU/Linux
# Version 7.0NG_BETA, 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 NG_BETA, Solaris Version
# Version 7.0NG_BETA, 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 NG_BETA
# Version 7.0NG_BETA
# 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 NG_BETA, AIX version
# Version 7.0NG_BETA, 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 NG_BETA
# Version 7.0NG_BETA
# 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 NG_BETA, HPUX Version
# Version 7.0NG_BETA, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version NG_BETA
# Version 7.0NG_BETA
# 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 NG_BETA
# Version 7.0NG_BETA
# 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 NG_BETA
# Version 7.0NG_BETA
# 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 NG_BETA, Solaris version
# Version 7.0NG_BETA, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version NG_BETA, AIX version
# Version 7.0NG_BETA, 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: NG_BETA-170308
Version: 7.0NG_BETA-170310
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="NG_BETA-170308"
pandora_version="7.0NG_BETA-170310"
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 NG_BETA, GNU/Linux
# Version 7.0NG_BETA, 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 NG_BETA, FreeBSD Version
# Version 7.0NG_BETA, 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 NG_BETA, HP-UX Version
# Version 7.0NG_BETA, 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 NG_BETA, GNU/Linux
# Version 7.0NG_BETA, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version NG_BETA, GNU/Linux
# Version 7.0NG_BETA, 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 NG_BETA, NetBSD Version
# Version 7.0NG_BETA, 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 NG_BETA, Solaris Version
# Version 7.0NG_BETA, 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 => 'NG_BETA';
use constant AGENT_BUILD => '170308';
use constant AGENT_VERSION => '7.0NG_BETA';
use constant AGENT_BUILD => '170310';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version NG_BETA
%define release 170308
%define version 7.0NG_BETA
%define release 170310
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 NG_BETA
%define release 170308
%define version 7.0NG_BETA
%define release 170310
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="NG_BETA"
PI_BUILD="170308"
PI_VERSION="7.0NG_BETA"
PI_BUILD="170310"
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 NG_BETA
# Version 7.0NG_BETA
# 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 vNG_BETA}
{Pandora FMS Windows Agent v7.0NG_BETA}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -75,7 +75,7 @@ InstallPassword
{}
InstallVersion
{NG_BETA.0.0}
{7.0.0.0}
Language,ca
{No}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{170308}
{170310}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("NG_BETA(Build 170308)")
#define PANDORA_VERSION ("7.0NG_BETA(Build 170310)")
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", "(NG_BETA(Build 170308))"
VALUE "ProductVersion", "(7.0NG_BETA(Build 170310))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: NG_BETA-170308
Version: 7.0NG_BETA-170310
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="NG_BETA-170308"
pandora_version="7.0NG_BETA-170310"
package_pear=0
package_pandora=1

View File

@ -20,7 +20,7 @@ $id_agente = get_parameter ("id_agente");
$address = agents_get_address($id_agente);
if (!empty($address) || empty($id_agente)) {
extensions_add_opemode_tab_agent ('network_tools','Network Tools','extensions/net_tools/nettool.png',"main_net_tools", "v1r1");
extensions_add_opemode_tab_agent ('network_tools','Network Tools','extensions/net_tools/nettool.png',"main_net_tools", "v1r1", 'AW');
}
function whereis_the_command ($command) {

View File

@ -242,8 +242,6 @@ config_check();
set_pandora_error_for_header('There are one or more minor releases waiting for update, there are required administrator permissions', 'minor release/s available');
}
echo '<div id="alert_messages" style="display: none"></div>';
if ($config["alert_cnt"] > 0) {
$maintenance_link = 'javascript:';
$maintenance_title = __("System alerts detected - Please fix as soon as possible");

View File

@ -142,9 +142,9 @@ $table->style[0] = 'font-weight: bold; vertical-align:top';
$table->style[2] = 'font-weight: bold; vertical-align:top';
$table->size = array ();
$table->size[0] = '15%';
$table->size[1] = '40%';
$table->size[1] = '25%';
$table->size[2] = '15%';
$table->size[3] = '40%';
$table->size[3] = '30%';
$table->data = array ();

View File

@ -234,7 +234,7 @@ class Tree {
// Agent name filter
$agent_search_filter = "";
if (!empty($this->filter['searchAgent'])) {
$agent_search_filter = " AND LOWER(ta.nombre) LIKE LOWER('%".$this->filter['searchAgent']."%') OR ta.alias LIKE '%".$this->filter['searchAgent']."%'";
$agent_search_filter = " AND LOWER(ta.alias) LIKE LOWER('%".$this->filter['searchAgent']."%')";
}
// Agent status filter

View File

@ -22,8 +22,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC170308';
$pandora_version = 'vNG_BETA';
$build_version = 'PC170310';
$pandora_version = 'v7.0NG_BETA';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -1,508 +0,0 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2012 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/**
* @package Include
* @subpackage Constants
*/
/* Enterprise hook constant */
define ('ENTERPRISE_NOT_HOOK', -1);
/**/
define('DATE_FORMAT', 'Y/m/d');
define('DATE_FORMAT_JS', 'yy/mm/dd');
define('TIME_FORMAT', 'H:i:s');
define('TIME_FORMAT_JS', 'HH:mm:ss');
/* Events state constants */
define ('EVENT_NEW', 0);
define ('EVENT_VALIDATE', 1);
define ('EVENT_PROCESS', 2);
/* Agents disabled status */
define ('AGENT_ENABLED', 0);
define ('AGENT_DISABLED', 1);
/* Error report codes */
define ('NOERR', 11111);
define ('ERR_GENERIC', -10000);
define ('ERR_EXIST', -20000);
define ('ERR_INCOMPLETE', -30000);
define ('ERR_DB', -40000);
define ('ERR_DB_HOST', -40001);
define ('ERR_DB_DB', -40002);
define ('ERR_FILE', -50000);
define ('ERR_NOCHANGES', -60000);
define ('ERR_NODATA', -70000);
define ('ERR_CONNECTION', -80000);
define ('ERR_DISABLED', -90000);
define ('ERR_WRONG', -100000);
define ('ERR_WRONG_NAME', -100001);
define ('ERR_WRONG_PARAMETERS', -100002);
define ('ERR_ACL', -110000);
define ('ERR_AUTH', -120000);
define ('ERR_COULDNT_RESOLVE_HOST', -130000);
/* Event status code */
define ('EVENT_STATUS_NEW', 0);
define ('EVENT_STATUS_INPROCESS', 2);
define ('EVENT_STATUS_VALIDATED', 1);
/* Seconds in a time unit constants */
define('SECONDS_1MINUTE', 60);
define('SECONDS_2MINUTES', 120);
define('SECONDS_5MINUTES', 300);
define('SECONDS_10MINUTES', 600);
define('SECONDS_15MINUTES', 900);
define('SECONDS_30MINUTES', 1800);
define('SECONDS_1HOUR', 3600);
define('SECONDS_2HOUR', 7200);
define('SECONDS_3HOUR', 10800);
define('SECONDS_5HOUR', 18000);
define('SECONDS_6HOURS', 21600);
define('SECONDS_12HOURS', 43200);
define('SECONDS_1DAY', 86400);
define('SECONDS_2DAY', 172800);
define('SECONDS_4DAY', 345600);
define('SECONDS_5DAY', 432000);
define('SECONDS_1WEEK', 604800);
define('SECONDS_10DAY', 864000);
define('SECONDS_2WEEK', 1209600);
define('SECONDS_15DAYS', 1296000);
define('SECONDS_1MONTH', 2592000);
define('SECONDS_2MONTHS', 5184000);
define('SECONDS_3MONTHS', 7776000);
define('SECONDS_6MONTHS', 15552000);
define('SECONDS_1YEAR', 31104000);
define('SECONDS_2YEARS', 62208000);
define('SECONDS_3YEARS', 93312000);
/* Separator constats */
define('SEPARATOR_COLUMN', ';');
define('SEPARATOR_ROW', chr(10)); //chr(10) = '\n'
define('SEPARATOR_COLUMN_CSV', "#");
define('SEPARATOR_ROW_CSV', "@\n");
/* Backup paths */
switch ($config["dbtype"]) {
case "mysql":
case "postgresql":
define ('BACKUP_DIR', 'attachment/backups');
define ('BACKUP_FULLPATH', $config['homedir'] . '/' . BACKUP_DIR);
break;
case "oracle":
define ('BACKUP_DIR', 'DATA_PUMP_DIR');
define ('BACKUP_FULLPATH', 'DATA_PUMP_DIR');
break;
}
/* Color constants */
define('COL_CRITICAL', '#FC4444');
define('COL_WARNING', '#FAD403');
define('COL_WARNING_DARK', '#FFB900');
define('COL_NORMAL', '#80BA27');
define('COL_NOTINIT', '#3BA0FF');
define('COL_UNKNOWN', '#B2B2B2');
define('COL_ALERTFIRED', '#FFA631');
define('COL_MINOR', '#F099A2');
define('COL_MAJOR', '#C97A4A');
define('COL_INFORMATIONAL', '#E4E4E4');
define('COL_MAINTENANCE', '#3BA0FF');
define('COL_GRAPH1', '#C397F2');
define('COL_GRAPH2', '#FFE66C');
define('COL_GRAPH3', '#92CCA3');
define('COL_GRAPH4', '#EA6D5B');
define('COL_GRAPH5', '#6BD8DD');
define('COL_GRAPH6', '#F49B31');
define('COL_GRAPH7', '#999999');
define('COL_GRAPH8', '#F2B8C1');
define('COL_GRAPH9', '#C4E8C1');
define('COL_GRAPH10', '#C1DBE5');
define('COL_GRAPH11', '#C9C1e0');
define('COL_GRAPH12', '#F45B95');
define('COL_GRAPH13', '#E83128');
/* The styles */
/* Size of text in characters for truncate */
define('GENERIC_SIZE_TEXT', 25);
/* Agent module status */
define('AGENT_MODULE_STATUS_ALL', -1);
define('AGENT_MODULE_STATUS_CRITICAL_BAD', 1);
define('AGENT_MODULE_STATUS_CRITICAL_ALERT', 100);
define('AGENT_MODULE_STATUS_NO_DATA', 4);
define('AGENT_MODULE_STATUS_NORMAL', 0);
define('AGENT_MODULE_STATUS_NORMAL_ALERT', 300);
define('AGENT_MODULE_STATUS_NOT_NORMAL', 6);
define('AGENT_MODULE_STATUS_WARNING', 2);
define('AGENT_MODULE_STATUS_WARNING_ALERT', 200);
define('AGENT_MODULE_STATUS_UNKNOWN', 3);
define('AGENT_MODULE_STATUS_NOT_INIT', 5);
/* Agent status */
define('AGENT_STATUS_ALL', -1);
define('AGENT_STATUS_CRITICAL', 1);
define('AGENT_STATUS_NORMAL', 0);
define('AGENT_STATUS_NOT_INIT', 5);
define('AGENT_STATUS_NOT_NORMAL', 6);
define('AGENT_STATUS_UNKNOWN', 3);
define('AGENT_STATUS_ALERT_FIRED', 4);
define('AGENT_STATUS_WARNING', 2);
/* Visual maps contants */
//The items kind
define('STATIC_GRAPH', 0);
define('PERCENTILE_BAR', 3);
define('MODULE_GRAPH', 1);
define('SIMPLE_VALUE', 2);
define('LABEL', 4);
define('ICON', 5);
define('SIMPLE_VALUE_MAX', 6);
define('SIMPLE_VALUE_MIN', 7);
define('SIMPLE_VALUE_AVG', 8);
define('PERCENTILE_BUBBLE', 9);
define('SERVICE', 10); //Enterprise Item.
define('GROUP_ITEM', 11);
define('BOX_ITEM', 12);
define('LINE_ITEM', 13);
//Some styles
define('MIN_WIDTH', 300);
define('MIN_HEIGHT', 120);
define('MIN_WIDTH_CAPTION', 420);
//The process for simple value
define('PROCESS_VALUE_NONE', 0);
define('PROCESS_VALUE_MIN', 1);
define('PROCESS_VALUE_MAX', 2);
define('PROCESS_VALUE_AVG', 3);
//Status
define('VISUAL_MAP_STATUS_CRITICAL_BAD', 1);
define('VISUAL_MAP_STATUS_CRITICAL_ALERT', 4);
define('VISUAL_MAP_STATUS_NORMAL', 0);
define('VISUAL_MAP_STATUS_WARNING', 2);
define('VISUAL_MAP_STATUS_UNKNOWN', 3);
define('VISUAL_MAP_STATUS_WARNING_ALERT', 10);
//Wizard
define('VISUAL_MAP_WIZARD_PARENTS_NONE', 0);
define('VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP', 1);
define('VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP', 2);
/* Service constants */
//Status
define('SERVICE_STATUS_UNKNOWN', -1);
define('SERVICE_STATUS_NORMAL', 0);
define('SERVICE_STATUS_CRITICAL', 1);
define('SERVICE_STATUS_WARNING', 2);
define('SERVICE_STATUS_ALERT', 4);
//Default weights
define('SERVICE_WEIGHT_CRITICAL', 1);
define('SERVICE_WEIGHT_WARNING', 0.5);
define('SERVICE_ELEMENT_WEIGHT_CRITICAL', 1);
define('SERVICE_ELEMENT_WEIGHT_WARNING', 0.5);
define('SERVICE_ELEMENT_WEIGHT_OK', 0);
define('SERVICE_ELEMENT_WEIGHT_UNKNOWN', 0);
//Modes
define('SERVICE_MODE_MANUAL', 0);
define('SERVICE_MODE_AUTO', 1);
define('SERVICE_MODE_SIMPLE', 2);
/* Status images */
//For modules
define ('STATUS_MODULE_OK', 'module_ok.png');
define ('STATUS_MODULE_CRITICAL', 'module_critical.png');
define ('STATUS_MODULE_WARNING', 'module_warning.png');
define ('STATUS_MODULE_NO_DATA', 'module_no_data.png');
define ('STATUS_MODULE_UNKNOWN', 'module_unknown.png');
//For agents
define ('STATUS_AGENT_CRITICAL', 'agent_critical.png');
define ('STATUS_AGENT_WARNING', 'agent_warning.png');
define ('STATUS_AGENT_DOWN', 'agent_down.png');
define ('STATUS_AGENT_UNKNOWN', 'agent_unknown.png');
define ('STATUS_AGENT_OK', 'agent_ok.png');
define ('STATUS_AGENT_NO_DATA', 'agent_no_data.png');
define ('STATUS_AGENT_NO_MONITORS', 'agent_no_monitors.png');
define ('STATUS_AGENT_NOT_INIT', 'agent_notinit.png');
//For alerts
define ('STATUS_ALERT_FIRED', 'alert_fired.png');
define ('STATUS_ALERT_NOT_FIRED', 'alert_not_fired.png');
define ('STATUS_ALERT_DISABLED', 'alert_disabled.png');
//For servers
define ('STATUS_SERVER_OK', 'server_ok.png');
define ('STATUS_SERVER_DOWN', 'server_down.png');
/* Status images (ball) */
//For modules
define ('STATUS_MODULE_OK_BALL', 'module_ok_ball.png');
define ('STATUS_MODULE_CRITICAL_BALL', 'module_critical_ball.png');
define ('STATUS_MODULE_WARNING_BALL', 'module_warning_ball.png');
define ('STATUS_MODULE_NO_DATA_BALL', 'module_no_data_ball.png');
define ('STATUS_MODULE_UNKNOWN_BALL', 'module_unknown_ball.png');
//For agents
define ('STATUS_AGENT_CRITICAL_BALL', 'agent_critical_ball.png');
define ('STATUS_AGENT_WARNING_BALL', 'agent_warning_ball.png');
define ('STATUS_AGENT_DOWN_BALL', 'agent_down_ball.png');
define ('STATUS_AGENT_UNKNOWN_BALL', 'agent_unknown_ball.png');
define ('STATUS_AGENT_OK_BALL', 'agent_ok_ball.png');
define ('STATUS_AGENT_NO_DATA_BALL', 'agent_no_data_ball.png');
define ('STATUS_AGENT_NO_MONITORS_BALL', 'agent_no_monitors_ball.png');
define ('STATUS_AGENT_NOT_INIT_BALL', 'agent_notinit_ball.png');
//For alerts
define ('STATUS_ALERT_FIRED_BALL', 'alert_fired_ball.png');
define ('STATUS_ALERT_NOT_FIRED_BALL', 'alert_not_fired_ball.png');
define ('STATUS_ALERT_DISABLED_BALL', 'alert_disabled_ball.png');
//For servers
define ('STATUS_SERVER_OK_BALL', 'server_ok_ball.png');
define ('STATUS_SERVER_DOWN_BALL', 'server_down_ball.png');
/* Events criticity */
define ('EVENT_CRIT_MAINTENANCE', 0);
define ('EVENT_CRIT_INFORMATIONAL', 1);
define ('EVENT_CRIT_NORMAL', 2);
define ('EVENT_CRIT_MINOR', 5);
define ('EVENT_CRIT_WARNING', 3);
define ('EVENT_CRIT_MAJOR', 6);
define ('EVENT_CRIT_CRITICAL', 4);
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
define ('EVENT_CRIT_NOT_NORMAL', 20);
define ('EVENT_CRIT_OR_NORMAL', 21);
/* Id Module (more use in component)*/
define ('MODULE_DATA', 1);
define ('MODULE_NETWORK', 2);
define ('MODULE_SNMP', 2);
define ('MODULE_PLUGIN', 4);
define ('MODULE_PREDICTION', 5);
define ('MODULE_WMI', 6);
define ('MODULE_WEB', 7);
/* Type of Modules of Prediction */
define ('MODULE_PREDICTION_SERVICE', 2);
define ('MODULE_PREDICTION_SYNTHETIC', 3);
define ('MODULE_PREDICTION_NETFLOW', 4);
/* SNMP CONSTANTS */
define('SNMP_DIR_MIBS', "attachment/mibs");
define('SNMP_TRAP_TYPE_NONE', -1);
define('SNMP_TRAP_TYPE_COLD_START', 0);
define('SNMP_TRAP_TYPE_WARM_START', 1);
define('SNMP_TRAP_TYPE_LINK_DOWN', 2);
define('SNMP_TRAP_TYPE_LINK_UP', 3);
define('SNMP_TRAP_TYPE_AUTHENTICATION_FAILURE', 4);
define('SNMP_TRAP_TYPE_OTHER', 5);
/* PASSWORD POLICIES */
define('PASSSWORD_POLICIES_OK', 0);
define('PASSSWORD_POLICIES_FIRST_CHANGE', 1);
define('PASSSWORD_POLICIES_EXPIRED', 2);
/* SERVER TYPES */
define('SERVER_TYPE_DATA', 0);
define('SERVER_TYPE_NETWORK', 1);
define('SERVER_TYPE_SNMP', 2);
define('SERVER_TYPE_RECON', 3);
define('SERVER_TYPE_PLUGIN', 4);
define('SERVER_TYPE_PREDICTION', 5);
define('SERVER_TYPE_WMI', 6);
define('SERVER_TYPE_EXPORT', 7);
define('SERVER_TYPE_INVENTORY', 8);
define('SERVER_TYPE_WEB', 9);
define('SERVER_TYPE_EVENT', 10);
define('SERVER_TYPE_ENTERPRISE_ICMP', 11);
define('SERVER_TYPE_ENTERPRISE_SNMP', 12);
define('SERVER_TYPE_ENTERPRISE_SATELLITE', 13);
/* REPORTS */
define('REPORT_TOP_N_MAX', 1);
define('REPORT_TOP_N_MIN', 2);
define('REPORT_TOP_N_AVG', 0);
define('REPORT_TOP_N_ONLY_GRAPHS', 2);
define('REPORT_TOP_N_SHOW_TABLE_GRAPS', 1);
define('REPORT_TOP_N_ONLY_TABLE', 0);
define('REPORT_EXCEPTION_CONDITION_EVERYTHING', 0);
define('REPORT_EXCEPTION_CONDITION_GE', 1);
define('REPORT_EXCEPTION_CONDITION_LE', 5);
define('REPORT_EXCEPTION_CONDITION_L', 2);
define('REPORT_EXCEPTION_CONDITION_G', 6);
define('REPORT_EXCEPTION_CONDITION_E', 7);
define('REPORT_EXCEPTION_CONDITION_NE', 8);
define('REPORT_EXCEPTION_CONDITION_OK', 3);
define('REPORT_EXCEPTION_CONDITION_NOT_OK', 4);
define('REPORT_ITEM_ORDER_BY_AGENT_NAME', 3);
define('REPORT_ITEM_ORDER_BY_ASCENDING', 2);
define('REPORT_ITEM_ORDER_BY_DESCENDING', 1);
define('REPORT_ITEM_ORDER_BY_UNSORT', 0);
define('REPORT_OLD_TYPE_SIMPLE_GRAPH', 1);
define('REPORT_OLD_TYPE_CUSTOM_GRAPH', 2);
define('REPORT_OLD_TYPE_SLA', 3);
define('REPORT_OLD_TYPE_MONITOR_REPORT', 6);
define('REPORT_OLD_TYPE_AVG_VALUE', 7);
define('REPORT_OLD_TYPE_MAX_VALUE', 8);
define('REPORT_OLD_TYPE_MIN_VALUE', 9);
define('REPORT_OLD_TYPE_SUMATORY', 10);
define('REPORT_GENERAL_NOT_GROUP_BY_AGENT', 0);
define('REPORT_GENERAL_GROUP_BY_AGENT', 1);
define('REPORTING_CUSTOM_GRAPH_LEGEND_EACH_MODULE_VERTICAL_SIZE', 15);
/* POLICIES */
define("POLICY_UPDATED", 0);
define("POLICY_PENDING_DATABASE", 1);
define("POLICY_PENDING_ALL", 2);
define("STATUS_IN_QUEUE_OUT", 0);
define("STATUS_IN_QUEUE_IN", 1);
define("STATUS_IN_QUEUE_APPLYING", 2);
define("MODULE_UNLINKED", 0);
define("MODULE_LINKED", 1);
define("MODULE_PENDING_UNLINK", 10);
define("MODULE_PENDING_LINK", 11);
/* EVENTS */
define("EVENTS_GOING_UNKNOWN" , 'going_unknown');
define("EVENTS_UNKNOWN", 'unknown');
define("EVENTS_ALERT_FIRED", 'alert_fired');
define("EVENTS_ALERT_RECOVERED", 'alert_recovered');
define("EVENTS_ALERT_CEASED", 'alert_ceased');
define("EVENTS_ALERT_MANUAL_VALIDATION", 'alert_manual_validation');
define("EVENTS_RECON_HOST_DETECTED", 'recon_host_detected');
define("EVENTS_SYSTEM", 'system');
define("EVENTS_ERROR", 'error');
define("EVENTS_NEW_AGENT", 'new_agent');
define("EVENTS_GOING_UP_WARNING", 'going_up_warning');
define("EVENTS_GOING_UP_CRITICAL", 'going_up_critical');
define("EVENTS_GOING_DOWN_WARNING", 'going_down_warning');
define("EVENTS_GOING_DOWN_NORMAL", 'going_down_normal');
define("EVENTS_GOING_DOWN_CRITICAL", 'going_down_critical');
define("EVENTS_GOING_UP_NORMAL", 'going_up_normal');
define("EVENTS_CONFIGURATION_CHANGE", 'configuration_change');
/* CUSTOM GRAPHS */
define("CUSTOM_GRAPH_AREA", 0);
define("CUSTOM_GRAPH_STACKED_AREA", 1);
define("CUSTOM_GRAPH_LINE", 2);
define("CUSTOM_GRAPH_STACKED_LINE", 3);
define("CUSTOM_GRAPH_BULLET_CHART", 4);
define("CUSTOM_GRAPH_GAUGE", 5);
define("CUSTOM_GRAPH_HBARS", 6);
define("CUSTOM_GRAPH_VBARS", 7);
define("CUSTOM_GRAPH_PIE", 8);
/* COLLECTIONS */
define("COLLECTION_PENDING_APPLY", 0);
define("COLLECTION_CORRECT", 1);
define("COLLECTION_ERROR_LOST_DIRECTORY", 2);
define("COLLECTION_UNSAVED", 3);
/* PAGINATION */
define("PAGINATION_BLOCKS_LIMIT", 15);
/* CHARTS */
define("CHART_DEFAULT_WIDTH", 150);
define("CHART_DEFAULT_HEIGHT", 110);
define("CHART_DEFAULT_ALPHA", 50);
/* Statwin */
define("STATWIN_DEFAULT_CHART_WIDTH", 555);
define("STATWIN_DEFAULT_CHART_HEIGHT", 245);
/* Dashboard */
define("DASHBOARD_DEFAULT_COUNT_CELLS", 9);
define("OPTION_TEXT", 1);
define("OPTION_SINGLE_SELECT", 2);
define("OPTION_MULTIPLE_SELECT", 3);
define("OPTION_BOOLEAN", 4);
define("OPTION_TEXTAREA", 5);
define("OPTION_TREE_GROUP_SELECT", 6);
define("OPTION_SINGLE_SELECT_TIME", 7);
define("OPTION_CUSTOM_INPUT", 8);
define("OPTION_AGENT_AUTOCOMPLETE", 9);
<<<<<<< HEAD
/* Other constants */
define("STATUS_OK", 0);
define("STATUS_ERROR", 1);
/* Maps (new networkmaps and new visualmaps) */
define("MAP_TYPE_NETWORKMAP", 0);
define("MAP_TYPE_VISUALMAP", 1);
define("MAP_SUBTYPE_TOPOLOGY", 0);
define("MAP_SUBTYPE_POLICIES", 1);
define("MAP_SUBTYPE_GROUPS", 2);
define("MAP_SUBTYPE_RADIAL_DYNAMIC", 3);
define("MAP_GENERATION_CIRCULAR", 0);
define("MAP_GENERATION_PLANO", 1);
define("MAP_GENERATION_RADIAL", 2);
define("MAP_GENERATION_SPRING1", 3);
define("MAP_GENERATION_SPRING2", 4);
define("MAP_SOURCE_GROUP", 0);
define("MAP_SOURCE_IP_MASK", 1);
/* Background options */
define("CENTER", 0);
define("MOSAIC", 1);
define("STRECH", 2);
define("FIT_WIDTH", 3);
define("FIT_HEIGH", 4);
/* Items of maps */
define("ITEM_TYPE_AGENT_NETWORKMAP", 0);
define("ITEM_TYPE_MODULE_NETWORKMAP", 1);
define("ITEM_TYPE_EDGE_NETWORKMAP", 2);
=======
/* SAML attributes constants */
define("SAML_ROLE", "urn:mace:rediris.es:entitlement:monitoring:role");
define("SAML_TAG", "urn:mace:rediris.es:entitlement:monitoring:tag");
define("USER_DESC", "commonName");
define("ID_USER_IN_PANDORA", "eduPersonTargetedId");
define("GROUP_IN_PANDORA", "schacHomeOrganization");
define("MAIL_IN_PANDORA", "mail");
>>>>>>> develop
?>

View File

@ -9553,10 +9553,15 @@ function api_set_delete_special_day($id_special_day, $thrash2, $thrash3, $thrash
* @param $thrash4 Don't use.
*
* example:
* api.php?op=get&op2=module_graph&id=1&other=3600
* http://localhost/pandora_console/include/
* api.php?op=get&op2=module_graph&id=5&other=40000%7C1&other_mode=url_encode_separator_%7C&apipass=1234
* &api=1&user=admin&pass=pandora
*
*/
function api_get_module_graph($id_module, $thrash2, $other, $thrash4) {
global $config;
if (defined ('METACONSOLE')) {
return;
}
@ -9574,9 +9579,9 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) {
}
$graph_seconds =
(!empty($other) && isset($other['data']))
(!empty($other) && isset($other['data'][0]))
?
$other['data']
$other['data'][0]
:
SECONDS_1HOUR; // 1 hour by default
@ -9636,7 +9641,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) {
// returnError('error_module_graph', __(''));
}
else {
if($other['data'] < 40000){
if($other['data'][1]){
header('Content-type: text/html');
returnData('string', array('type' => 'string', 'data' => '<img src="data:image/jpeg;base64,' . $graph_image_file_encoded . '">'));
} else {

View File

@ -61,6 +61,7 @@ Apart from the defined module macros, the following macros are also available:
<li>_groupother_ : Other information about the group. Configured when the group is created.</li>
<li>_email_tag_ : Emails associated to the module tags.</li>
<li>_modulegraph_nh_: (Only for alerts that use the command eMail) Returns an image of a module graph with a period of n hours (eg. _modulegraph_24h_). A correct setup of the connection between the server and the console's api is required. This setup is done into the server's configuration file.</li>
<li>_homeurl_ : It is a link of the public URL this must be configured in the general options of the setup.</li>
</ul>
<p>
</p>

View File

@ -63,6 +63,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
<li>_groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.</li>
<li>_email_tag_ : Emails asociados a los tags de módulos.</li>
<li>_modulegraph_nh_: (Sólo para alertas que usen el comando eMail) Devuelve una imagen codificada en base64 de una gráfica del módulo con un período de n horas (eg. _modulegraph_24h_). Requiere de una configuración correcta de la conexión del servidor a la consola vía api, la cual se realiza en el fichero de configuración del servidor.</li>
<li>_homeurl_ : Es un link de la URL pública esta debe de estar configurada en las opciones generales del setup.</li>
</ul>
<p>
Ejemplo: Error en el agente _agent_: _alert_description_

View File

@ -59,14 +59,24 @@ $(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.get ("ajax.php",
{"page": "operation/system_alert"},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
.append (data)
.show ();
$("#alert_messages").html(data);
$("#alert_messages").dialog({
resizable: false,
draggable: true,
width: 450,
modal: true,
overlay: {
opacity: 0.5,
background: "black"
},
open: function (event, ui) {
dialog_open = this;
}
});
$("#alert_messages").css('padding','0px');
},
"html"
);

View File

@ -329,13 +329,14 @@ function agent_changed_by_multiple_agents_with_alerts (event, id_agent, selected
selection_mode = 'common';
}
template = $('#id_alert_template option:selected').attr("value");
template = $('#id_alert_template option:selected').val();
$('#module').attr ('disabled', 1);
$('#module').empty ();
$('#module').append ($('<option></option>').html ("Loading...").attr ("value", 0));
jQuery.post ('ajax.php',
{"page": "operation/agentes/ver_agente",
"get_agent_modules_alerts_json_for_multiple_agents": 1,
"get_agent_modules_multiple_alerts_json_for_multiple_agents": 1,
"template": template,
"id_agent[]": idAgents,
"selection_mode": selection_mode

View File

@ -933,6 +933,7 @@ if ($config["pure"] == 0) {
echo '</div>';
}
echo '<div id="alert_messages" style="display: none"></div>';
/// Clippy function
require_once('include/functions_clippy.php');
clippy_start($sec2);

View File

@ -70,8 +70,8 @@
<body>
<div style='height: 10px'>
<?php
$version = 'NG_BETA';
$build = '170308';
$version = '7.0NG_BETA';
$build = '170310';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -7,10 +7,10 @@ echo "
<div class='modalheader'>
<span class='modalheadertext'>";
if(!enterprise_installed()){
if (!enterprise_installed()) {
echo "Community version";
}
else{
else {
echo "Enterprise version";
}
@ -18,10 +18,11 @@ echo "</span>
<img class='modalclosex cerrar' src='".$config['homeurl']."/images/icono_cerrar.png'>
</div>";
echo "<div style='overflow-y:scroll;height:550px;'>";
echo get_pandora_error_for_header();
echo "</div>";
echo get_pandora_error_for_header()."
<div class='modalokbutton cerrar'>
echo "<div class='modalokbutton cerrar'>
<span class='modalokbuttontext close'>OK</span>
</div>";
@ -31,8 +32,7 @@ echo get_pandora_error_for_header()."
<script>
$(".cerrar").click(function(){
$("#alert_messages").hide();
$( "#opacidad" ).remove();
$("#alert_messages").dialog('close');
});
</script>

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version NG_BETA
%define release 170308
%define version 7.0NG_BETA
%define release 170310
# 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 NG_BETA
%define release 170308
%define version 7.0NG_BETA
%define release 170310
%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="NG_BETA"
PI_VERSION="7.0NG_BETA"
FORCE=0
DESTDIR=""
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`

View File

@ -65,8 +65,8 @@ INSERT INTO tconfig (token, value) VALUES ('days_compact','0');
INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','NG_BETA');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD170308');
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','7.0NG_BETA');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD170310');
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
INSERT INTO tconfig (token, value) VALUES ('style','pandora');

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: NG_BETA-170308
Version: 7.0NG_BETA-170310
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="NG_BETA-170308"
pandora_version="7.0NG_BETA-170310"
package_cpan=0
package_pandora=1

View File

@ -1,7 +1,7 @@
#############################################################################
# Pandora FMS Server Parameters
# Pandora FMS, the Flexible Monitoring System.
# Version NG_BETA
# Version 7.0NG_BETA
# 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 = "NG_BETA";
my $pandora_build = "170308";
my $pandora_version = "7.0NG_BETA";
my $pandora_build = "170310";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -167,6 +167,9 @@ sub pandora_get_sharedconfig ($$) {
$pa_config->{'replication_limit'} = pandora_get_tconfig_token ($dbh, 'replication_limit', 1000);
$pa_config->{'include_agents'} = pandora_get_tconfig_token ($dbh, 'include_agents', 0);
#Public url
$pa_config->{'public_url'} = pandora_get_tconfig_token ($dbh, 'public_url', 'http://localhost/pandora_console');
if ($pa_config->{'include_agents'} eq '') {
$pa_config->{'include_agents'} = 0;
}

View File

@ -985,6 +985,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
_timezone_ => strftime ("%Z", localtime()),
_data_ => $data,
_prevdata_ => undef,
_homeurl_ => $pa_config->{'public_url'},
_alert_name_ => $alert->{'name'},
_alert_description_ => $alert->{'description'},
_alert_threshold_ => $alert->{'time_threshold'},
@ -1103,8 +1104,8 @@ sub pandora_execute_action ($$$$$$$$$;$) {
my $subst_func = sub {
my $hours = shift;
my $period = $hours * 3600; # Hours to seconds
$params->{"other"} = $period;
$params->{"other"} = $period . '%7C0';
$params->{"other_mode"} = 'url_encode_separator_%7C';
my $cid = 'module_graph_' . $hours . 'h';
if (! exists($module_graph_list->{$cid}) && defined $url) {

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version NG_BETA
%define release 170308
%define version 7.0NG_BETA
%define release 170310
Summary: Pandora FMS Server
Name: %{name}

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version NG_BETA
%define release 170308
%define version 7.0NG_BETA
%define release 170310
Summary: Pandora FMS Server
Name: %{name}

View File

@ -8,8 +8,8 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="NG_BETA"
PI_BUILD="170308"
PI_VERSION="7.0NG_BETA"
PI_BUILD="170310"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "NG_BETA PS170308";
my $version = "7.0NG_BETA PS170310";
# Pandora server configuration
my %conf;

View File

@ -35,7 +35,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "NG_BETA PS170308";
my $version = "7.0NG_BETA PS170310";
# save program name for logging
my $progname = basename($0);