mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'develop' into 983-API-CLI-posibilidad-de-aplicar-templates-componentes-a-un-agente
Conflicts: pandora_server/util/pandora_manage.pl
This commit is contained in:
commit
dcb33e08b7
@ -65,7 +65,7 @@ $PANDHOME_ENT/pandora_plugins/MTL/pandora_mtl.pl \
|
||||
$PANDHOME_ENT/pandora_plugins/Informix/informix.pl \
|
||||
$PANDHOME_ENT/pandora_plugins/Ruckus/ruckus.pl \
|
||||
$PANDHOME_ENT/pandora_plugins/UX/pandora_ux.pl \
|
||||
$PANDHOME_ENT/pandora_server/util/plugins/vmware-plugin.pl "
|
||||
$PANDHOME_ENT/pandora_server/util/plugin/vmware-plugin.pl "
|
||||
PLUGIN_LIB_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/PluginTools.pm"
|
||||
|
||||
# Update version in spec files
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, AIX version
|
||||
# Version 7.0NG.720, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, FreeBSD Version
|
||||
# Version 7.0NG.720, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, HP-UX Version
|
||||
# Version 7.0NG.720, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, GNU/Linux
|
||||
# Version 7.0NG.720, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, GNU/Linux
|
||||
# Version 7.0NG.720, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, Solaris Version
|
||||
# Version 7.0NG.720, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2010 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.719
|
||||
# Version 7.0NG.720
|
||||
|
||||
# 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.719, AIX version
|
||||
# Version 7.0NG.720, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.719
|
||||
# Version 7.0NG.720
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.719, HPUX Version
|
||||
# Version 7.0NG.720, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719
|
||||
# Version 7.0NG.720
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719
|
||||
# Version 7.0NG.720
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719
|
||||
# Version 7.0NG.720
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.719, Solaris version
|
||||
# Version 7.0NG.720, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, AIX version
|
||||
# Version 7.0NG.720, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.719-180226
|
||||
Version: 7.0NG.720-180322
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.719-180226"
|
||||
pandora_version="7.0NG.720-180322"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, GNU/Linux
|
||||
# Version 7.0NG.720, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, FreeBSD Version
|
||||
# Version 7.0NG.720, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, HP-UX Version
|
||||
# Version 7.0NG.720, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, GNU/Linux
|
||||
# Version 7.0NG.720, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, GNU/Linux
|
||||
# Version 7.0NG.720, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, NetBSD Version
|
||||
# Version 7.0NG.720, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.719, Solaris Version
|
||||
# Version 7.0NG.720, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
@ -41,8 +41,8 @@ my $Sem = undef;
|
||||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.719';
|
||||
use constant AGENT_BUILD => '180226';
|
||||
use constant AGENT_VERSION => '7.0NG.720';
|
||||
use constant AGENT_BUILD => '180322';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -2,8 +2,8 @@
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.719
|
||||
%define release 180226
|
||||
%define version 7.0NG.720
|
||||
%define release 180322
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -2,8 +2,8 @@
|
||||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.719
|
||||
%define release 180226
|
||||
%define version 7.0NG.720
|
||||
%define release 180322
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -9,8 +9,8 @@
|
||||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.719"
|
||||
PI_BUILD="180226"
|
||||
PI_VERSION="7.0NG.720"
|
||||
PI_BUILD="180322"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -215,6 +215,7 @@ sub print_log (@) {
|
||||
$output .= "<source><![CDATA[" . $Module_name . "]]></source>\n";
|
||||
$output .= "<data><![CDATA[";
|
||||
foreach my $line (@data) {
|
||||
$line =~ s/\]\]/]]]]><![CDATA[/g;
|
||||
$output .= $line;
|
||||
}
|
||||
$output .= "]]></data>";
|
||||
@ -229,6 +230,7 @@ sub print_log (@) {
|
||||
$output .= "<type><![CDATA[async_string]]></type>\n";
|
||||
$output .= "<datalist>\n";
|
||||
foreach my $line (@data) {
|
||||
$line =~ s/\]\]/]]]]><![CDATA[/g;
|
||||
$output .= "<data><value><![CDATA[$line]]></value></data>\n";
|
||||
}
|
||||
$output .= "</datalist>\n";
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2017 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.719
|
||||
# Version 7.0NG.720
|
||||
|
||||
# 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
|
||||
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
||||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.719}
|
||||
{Pandora FMS Windows Agent v7.0NG.720}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{180226}
|
||||
{180322}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -532,6 +532,7 @@ Pandora_Module::getXml () {
|
||||
try {
|
||||
data_clean = strreplace (this->getDataOutput (data),
|
||||
"%", "%%" );
|
||||
data_clean = strreplace (data_clean, "]]>", "]]><![CDATA[");
|
||||
} catch (Module_Exception e) {
|
||||
continue;
|
||||
}
|
||||
@ -542,6 +543,7 @@ Pandora_Module::getXml () {
|
||||
data = data_list->front ();
|
||||
try {
|
||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||
data_clean = strreplace (data_clean, "]]>", "]]><![CDATA[");
|
||||
module_xml += data_clean;
|
||||
|
||||
} catch (Module_Exception e) {
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.719(Build 180226)")
|
||||
#define PANDORA_VERSION ("7.0NG.720(Build 180322)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
@ -11,7 +11,7 @@ BEGIN
|
||||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.719(Build 180226))"
|
||||
VALUE "ProductVersion", "(7.0NG.720(Build 180322))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.719-180226
|
||||
Version: 7.0NG.720-180322
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.719-180226"
|
||||
pandora_version="7.0NG.720-180322"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -122,7 +122,7 @@ function pandora_realtime_graphs () {
|
||||
echo '</form>';
|
||||
|
||||
// Define a custom action to save the OID selected in the SNMP browser to the form
|
||||
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/hand_point.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
||||
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/input_filter.disabled.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
||||
html_print_input_hidden ('incremental_base', '0');
|
||||
|
||||
echo '<script type="text/javascript" src="extensions/realtime_graphs/realtime_graphs.js"></script>';
|
||||
|
64
pandora_console/extras/mr/13.sql
Normal file
64
pandora_console/extras/mr/13.sql
Normal file
@ -0,0 +1,64 @@
|
||||
START TRANSACTION;
|
||||
|
||||
SET @st_oum720 = (SELECT IF(
|
||||
(SELECT value FROM tconfig WHERE token like 'short_module_graph_data') = 1,
|
||||
"UPDATE tconfig SET value = 2 WHERE token LIKE 'short_module_graph_data'",
|
||||
"UPDATE tconfig SET value = '' WHERE token LIKE 'short_module_graph_data'"
|
||||
));
|
||||
|
||||
PREPARE pr_oum720 FROM @st_oum720;
|
||||
EXECUTE pr_oum720;
|
||||
DEALLOCATE PREPARE pr_oum720;
|
||||
|
||||
INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (100, 'Cluster', 'Cluster agent', 'so_cluster.png');
|
||||
|
||||
UPDATE `tagente` SET `id_os` = 100 WHERE `id_os` = 21 and (select `id_os` from `tconfig_os` WHERE `id_os` = 21 and `name` = 'Cluster');
|
||||
|
||||
DELETE FROM `tconfig_os` where `id_os` = 21 and `name` = 'Cluster';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tprovisioning`(
|
||||
`id` int unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL,
|
||||
`description` TEXT default '',
|
||||
`order` int(11) NOT NULL default 0,
|
||||
`config` TEXT default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tprovisioning_rules`(
|
||||
`id` int unsigned NOT NULL auto_increment,
|
||||
`id_provisioning` int unsigned NOT NULL,
|
||||
`order` int(11) NOT NULL default 0,
|
||||
`operator` enum('AND','OR') default 'OR',
|
||||
`type` enum('alias','ip-range') default 'alias',
|
||||
`value` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_provisioning`) REFERENCES tprovisioning(`id`)
|
||||
ON DELETE CASCADE
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
create table IF NOT EXISTS `tmigration_queue`(
|
||||
`id` int unsigned not null auto_increment,
|
||||
`id_source_agent` int unsigned not null,
|
||||
`id_target_agent` int unsigned not null,
|
||||
`id_source_node` int unsigned not null,
|
||||
`id_target_node` int unsigned not null,
|
||||
`priority` int unsigned default 0,
|
||||
`step` int default 0,
|
||||
`running` tinyint(2) default 0,
|
||||
`active_db_only` tinyint(2) default 0,
|
||||
PRIMARY KEY(`id`)
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
create table IF NOT EXISTS `tmigration_module_queue`(
|
||||
`id` int unsigned not null auto_increment,
|
||||
`id_migration` int unsigned not null,
|
||||
`id_source_agentmodule` int unsigned not null,
|
||||
`id_target_agentmodule` int unsigned not null,
|
||||
`last_replication_timestamp` bigint(20) NOT NULL default 0,
|
||||
PRIMARY KEY(`id`),
|
||||
FOREIGN KEY(`id_migration`) REFERENCES tmigration_queue(`id`)
|
||||
ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
COMMIT;
|
17
pandora_console/extras/mr/14.sql
Normal file
17
pandora_console/extras/mr/14.sql
Normal file
@ -0,0 +1,17 @@
|
||||
START TRANSACTION;
|
||||
|
||||
UPDATE `tagente` SET `id_os` = 100 WHERE `id_os` = 21 and (select `id_os` from `tconfig_os` WHERE `id_os` = 21 and `name` = 'Cluster');
|
||||
|
||||
DELETE FROM `tconfig_os` where `id_os` = 21 and `name` = 'Cluster';
|
||||
|
||||
SET @st_oum721 = (SELECT IF(
|
||||
(SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled') > 0,
|
||||
"ALTER TABLE tuser_task_scheduled ADD (id_grupo int(10) unsigned NOT NULL Default 0)",
|
||||
"0"
|
||||
));
|
||||
|
||||
PREPARE pr_oum721 FROM @st_oum721;
|
||||
EXECUTE pr_oum721;
|
||||
DEALLOCATE PREPARE pr_oum721;
|
||||
|
||||
COMMIT;
|
@ -1159,10 +1159,20 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 12);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 13);
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '719');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '720');
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tconfig_os`
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (100, 'Cluster', 'Cluster agent', 'so_cluster.png');
|
||||
|
||||
UPDATE `tagente` SET `id_os` = 100 WHERE `id_os` = 21 and (select `id_os` from `tconfig_os` WHERE `id_os` = 21 and `name` = 'Cluster');
|
||||
|
||||
DELETE FROM `tconfig_os` where `id_os` = 21 and `name` = 'Cluster';
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime_agents`
|
||||
@ -1358,6 +1368,7 @@ END IF;
|
||||
SET @vv2 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tuser_task_scheduled');
|
||||
IF @vv2>0 THEN
|
||||
ALTER TABLE tuser_task_scheduled MODIFY args TEXT NOT NULL;
|
||||
ALTER TABLE tuser_task_scheduled ADD (id_grupo int(10) unsigned NOT NULL Default 0);
|
||||
END IF;
|
||||
END;
|
||||
//
|
||||
@ -1533,3 +1544,63 @@ create table IF NOT EXISTS `tcluster_agent`(
|
||||
FOREIGN KEY (`id_cluster`) REFERENCES tcluster(`id`)
|
||||
ON UPDATE CASCADE
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tprovisioning`
|
||||
-- ---------------------------------------------------------------------
|
||||
create table IF NOT EXISTS `tprovisioning`(
|
||||
`id` int unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL,
|
||||
`description` TEXT default '',
|
||||
`order` int(11) NOT NULL default 0,
|
||||
`config` TEXT default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tprovisioning_rules`
|
||||
-- ---------------------------------------------------------------------
|
||||
create table IF NOT EXISTS `tprovisioning_rules`(
|
||||
`id` int unsigned NOT NULL auto_increment,
|
||||
`id_provisioning` int unsigned NOT NULL,
|
||||
`order` int(11) NOT NULL default 0,
|
||||
`operator` enum('AND','OR') default 'OR',
|
||||
`type` enum('alias','ip-range') default 'alias',
|
||||
`value` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_provisioning`) REFERENCES tprovisioning(`id`)
|
||||
ON DELETE CASCADE
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmigration_queue`
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
create table IF NOT EXISTS `tmigration_queue`(
|
||||
`id` int unsigned not null auto_increment,
|
||||
`id_source_agent` int unsigned not null,
|
||||
`id_target_agent` int unsigned not null,
|
||||
`id_source_node` int unsigned not null,
|
||||
`id_target_node` int unsigned not null,
|
||||
`priority` int unsigned default 0,
|
||||
`step` int default 0,
|
||||
`running` tinyint(2) default 0,
|
||||
`active_db_only` tinyint(2) default 0,
|
||||
PRIMARY KEY(`id`)
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmigration_module_queue`
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
create table IF NOT EXISTS `tmigration_module_queue`(
|
||||
`id` int unsigned not null auto_increment,
|
||||
`id_migration` int unsigned not null,
|
||||
`id_source_agentmodule` int unsigned not null,
|
||||
`id_target_agentmodule` int unsigned not null,
|
||||
`last_replication_timestamp` bigint(20) NOT NULL default 0,
|
||||
PRIMARY KEY(`id`),
|
||||
FOREIGN KEY(`id_migration`) REFERENCES tmigration_queue(`id`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
@ -555,7 +555,7 @@ if ($id_agente) {
|
||||
$help_header = 'plugins_tab';
|
||||
break;
|
||||
case "module":
|
||||
$type_module_t = (int) get_parameter ('moduletype', '');
|
||||
$type_module_t = get_parameter ('moduletype', '');
|
||||
$tab_description = '- '. __('Modules');
|
||||
if($type_module_t == 'webux'){
|
||||
$help_header = 'wux_console';
|
||||
|
@ -27,7 +27,7 @@ html_print_input_hidden ('ajax_url', ui_get_full_url("ajax.php"), false);
|
||||
html_print_input_hidden ('search_matches_translation', __("Search matches"), false);
|
||||
|
||||
// Define a custom action to save the OID selected in the SNMP browser to the form
|
||||
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/hand_point.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
||||
html_print_input_hidden ('custom_action', urlencode (base64_encode(' <a href="javascript:setOID()"><img src="' . ui_get_full_url("images") . '/input_filter.disabled.png" title="' . __("Use this OID") . '" style="vertical-align: middle;"></img></a>')), false);
|
||||
|
||||
$isFunctionPolicies = enterprise_include_once('include/functions_policies.php');
|
||||
|
||||
|
@ -1186,6 +1186,7 @@ ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascri
|
||||
|
||||
$(document).ready (function () {
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents);
|
||||
$("#modules_selection_mode").change(agent_changed_by_multiple_agents);
|
||||
|
||||
change_type_downtime();
|
||||
change_type_execution();
|
||||
|
@ -290,24 +290,31 @@ if (!defined('METACONSOLE')) {
|
||||
else {
|
||||
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&recursion='.$recursion.'&ag_group='.$ag_group.'&search='.$search.'&pagination='.$pagination;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ($own_info['is_admin'] || $vconsoles_read) {
|
||||
if($ag_group){
|
||||
$maps = visual_map_get_user_layouts (0,false,$filters,false);
|
||||
$maps = visual_map_get_user_layouts ($config['id_user'],false,$filters,false);
|
||||
unset($filters['offset']);
|
||||
unset($filters['limit']);
|
||||
$total_maps = count($maps);
|
||||
$count_maps = visual_map_get_user_layouts ($config['id_user'],false,$filters,false);
|
||||
$total_maps = count($count_maps);
|
||||
}else{
|
||||
$maps = visual_map_get_user_layouts (0,false,$filters, false);
|
||||
$maps = visual_map_get_user_layouts ($config['id_user'],false,$filters, false);
|
||||
unset($filters['offset']);
|
||||
unset($filters['limit']);
|
||||
$total_maps = count($maps);
|
||||
$count_maps = visual_map_get_user_layouts ($config['id_user'],false,$filters,false);
|
||||
$total_maps = count($count_maps);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$maps = visual_map_get_user_layouts ($config['id_user'], false, $filters, false);
|
||||
unset($filters['offset']);
|
||||
unset($filters['limit']);
|
||||
$total_maps = count($maps);
|
||||
$count_maps = visual_map_get_user_layouts ($config['id_user'],false,$filters,false);
|
||||
$total_maps = count($count_maps);
|
||||
}
|
||||
if (!$maps && !is_metaconsole()) {
|
||||
$total = count(visual_map_get_user_layouts ($config['id_user'], false, false, false));
|
||||
|
@ -132,6 +132,7 @@ switch ($action) {
|
||||
$hide_notinit_agents = 0;
|
||||
$server_name = '';
|
||||
$server_id = 0;
|
||||
$dyn_height = 230;
|
||||
break;
|
||||
case 'save':
|
||||
default:
|
||||
@ -173,6 +174,7 @@ switch ($action) {
|
||||
$server_name = '';
|
||||
$server_id = 0;
|
||||
$get_data_editor = false;
|
||||
$dyn_height = 230;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -196,6 +198,7 @@ switch ($action) {
|
||||
$show_in_two_columns = $style['show_in_two_columns'];
|
||||
$show_in_landscape = $style['show_in_landscape'];
|
||||
$hide_notinit_agents = $style['hide_notinit_agents'];
|
||||
$dyn_height = $style['dyn_height'];
|
||||
$type = $item['type'];
|
||||
$name = $item['name'];
|
||||
|
||||
@ -361,33 +364,16 @@ switch ($action) {
|
||||
$text = $item['text'];
|
||||
break;
|
||||
case 'sql':
|
||||
$description = $item['description'];
|
||||
$sql_query_report = $item['external_source'];
|
||||
$idCustom = $item['treport_custom_sql_id'];
|
||||
$header = $item['header_definition'];
|
||||
$historical_db = $item['historical_db'];
|
||||
$period = 0;
|
||||
break;
|
||||
case 'sql_graph_pie':
|
||||
$description = $item['description'];
|
||||
$sql_query_report = $item['external_source'];
|
||||
$idCustom = $item['treport_custom_sql_id'];
|
||||
$historical_db = $item['historical_db'];
|
||||
$period = 0;
|
||||
break;
|
||||
case 'sql_graph_vbar':
|
||||
$description = $item['description'];
|
||||
$sql_query_report = $item['external_source'];
|
||||
$idCustom = $item['treport_custom_sql_id'];
|
||||
$historical_db = $item['historical_db'];
|
||||
$period = 0;
|
||||
break;
|
||||
case 'sql_graph_hbar':
|
||||
$description = $item['description'];
|
||||
$sql_query_report = $item['external_source'];
|
||||
$idCustom = $item['treport_custom_sql_id'];
|
||||
$historical_db = $item['historical_db'];
|
||||
$period = 0;
|
||||
$top_n_value = $item['top_n_value'];
|
||||
break;
|
||||
case 'url':
|
||||
$description = $item['description'];
|
||||
@ -1283,6 +1269,16 @@ You can of course remove the warnings, that's why we include the source and do n
|
||||
</td>
|
||||
<td style="" id="sql_example"></td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_max_items" style="" class="datos">
|
||||
<td style="font-weight:bold;"><?php echo __('Max items'); ?></td>
|
||||
<td style="">
|
||||
<?php
|
||||
html_print_input_text('max_items', $top_n_value, '', 7, 7);
|
||||
?>
|
||||
</td>
|
||||
<td style="" id="max_items_example"></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ($meta) {
|
||||
@ -1548,6 +1544,11 @@ You can of course remove the warnings, that's why we include the source and do n
|
||||
<td><?php html_print_checkbox('show_in_two_columns', 1, $show_in_two_columns);?></td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_dyn_height" style="" class="datos">
|
||||
<td style="font-weight:bold;"><?php echo __('Height (dynamic graphs)');?></td>
|
||||
<td><?php html_print_input_text('dyn_height', $dyn_height, '', 7, 7);?></td>
|
||||
</tr>
|
||||
|
||||
<tr id="row_show_in_same_row" style="" class="datos">
|
||||
<td style="font-weight:bold;" class="datos">
|
||||
<?php
|
||||
@ -2766,6 +2767,7 @@ function chooseType() {
|
||||
$("#row_custom_graph").hide();
|
||||
$("#row_text").hide();
|
||||
$("#row_query").hide();
|
||||
$("#row_max_items").hide();
|
||||
$("#row_header").hide();
|
||||
$("#row_custom").hide();
|
||||
$("#row_url").hide();
|
||||
@ -2791,6 +2793,7 @@ function chooseType() {
|
||||
$("#row_exception_condition_value").hide();
|
||||
$("#row_exception_condition").hide();
|
||||
$("#row_show_in_two_columns").hide();
|
||||
$("#row_dyn_height").hide();
|
||||
$("#row_show_in_same_row").hide();
|
||||
$("#row_historical_db_check").hide();
|
||||
$("#row_lapse_calc").hide();
|
||||
@ -3061,37 +3064,24 @@ function chooseType() {
|
||||
case 'sql':
|
||||
$("#row_description").show();
|
||||
$("#row_query").show();
|
||||
$("#row_max_items").show();
|
||||
$("#row_header").show();
|
||||
$("#row_custom").show();
|
||||
$("#row_custom_example").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_dyn_height").show();
|
||||
$("#row_servers").show();
|
||||
$("#row_historical_db_check").show();
|
||||
break;
|
||||
|
||||
case 'sql_graph_pie':
|
||||
$("#row_description").show();
|
||||
$("#row_query").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_show_in_landscape").show();
|
||||
$("#row_servers").show();
|
||||
$("#row_historical_db_check").show();
|
||||
|
||||
break;
|
||||
|
||||
case 'sql_graph_hbar':
|
||||
$("#row_description").show();
|
||||
$("#row_query").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_show_in_landscape").show();
|
||||
$("#row_servers").show();
|
||||
$("#row_historical_db_check").show();
|
||||
break;
|
||||
|
||||
case 'sql_graph_vbar':
|
||||
$("#row_description").show();
|
||||
$("#row_query").show();
|
||||
$("#row_max_items").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_dyn_height").show();
|
||||
$("#row_show_in_landscape").show();
|
||||
$("#row_servers").show();
|
||||
$("#row_historical_db_check").show();
|
||||
|
@ -1194,6 +1194,7 @@ switch ($action) {
|
||||
$values['external_source'] = get_parameter('sql');
|
||||
}
|
||||
$values['historical_db'] = get_parameter('historical_db_check');
|
||||
$values['top_n_value'] = get_parameter('max_items');
|
||||
}
|
||||
else if ($values['type'] == 'url') {
|
||||
$values['external_source'] = get_parameter('url');
|
||||
@ -1211,6 +1212,7 @@ switch ($action) {
|
||||
$style['show_in_same_row'] = get_parameter('show_in_same_row', 0);
|
||||
$style['show_in_landscape'] = get_parameter('show_in_landscape', 0);
|
||||
$style['hide_notinit_agents'] = get_parameter('hide_notinit_agents', 0);
|
||||
$style['dyn_height'] = get_parameter('dyn_height', 230);
|
||||
|
||||
switch ($values['type']) {
|
||||
case 'event_report_agent':
|
||||
@ -1532,6 +1534,7 @@ switch ($action) {
|
||||
$values['external_source'] = get_parameter('sql');
|
||||
}
|
||||
$values['historical_db'] = get_parameter('historical_db_check');
|
||||
$values['top_n_value'] = get_parameter('max_items');
|
||||
}
|
||||
elseif ($values['type'] == 'url') {
|
||||
$values['external_source'] = get_parameter('url');
|
||||
@ -1549,6 +1552,7 @@ switch ($action) {
|
||||
$style['show_in_same_row'] = get_parameter('show_in_same_row', 0);
|
||||
$style['show_in_landscape'] = get_parameter('show_in_landscape', 0);
|
||||
$style['hide_notinit_agents'] = get_parameter('hide_notinit_agents', 0);
|
||||
$style['dyn_height'] = get_parameter('dyn_height', 230);
|
||||
|
||||
switch ($values['type']) {
|
||||
case 'event_report_agent':
|
||||
|
@ -35,6 +35,7 @@ var img_handler_end;
|
||||
function toggle_advance_options_palette(close) {
|
||||
if ($("#advance_options").css('display') == 'none') {
|
||||
$("#advance_options").css('display', '');
|
||||
$("#advance_options *").css('display', '');
|
||||
}
|
||||
else {
|
||||
$("#advance_options").css('display', 'none');
|
||||
@ -5020,8 +5021,10 @@ function showPreviewIcon(icon) {
|
||||
params.push("get_image_path=1");
|
||||
params.push("img_src=" + imgBase + ".png");
|
||||
params.push("page=include/ajax/skins.ajax");
|
||||
parameter.push ({name: "id_visual_console",
|
||||
value: id_visual_console});
|
||||
params.push ({
|
||||
name: "id_visual_console",
|
||||
value: id_visual_console
|
||||
});
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
type: 'POST',
|
||||
|
@ -288,6 +288,7 @@ $table_styles->data[$row][1] = __('Yes') . ' ' .
|
||||
' ';
|
||||
$table_styles->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('fixed_menu', 0, '', $config["fixed_menu"], true);
|
||||
$row++;
|
||||
|
||||
// For 5.1 Autohidden menu feature
|
||||
$table_styles->data['autohidden'][0] = __('Autohidden menu');
|
||||
@ -487,11 +488,18 @@ if (!enterprise_installed()) {
|
||||
$disabled_graph_precision = true;
|
||||
}
|
||||
|
||||
$table_chars->data[$row][0] = __('Data precision for reports and visual consoles');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Number of decimals shown in reports and visual consoles. It must be a number between 0 and 5'), true);
|
||||
$table_chars->data[$row][0] = __('Data precision in PandoraFMS');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Number of decimals shown. It must be a number between 0 and 5, except in graphs.'), true);
|
||||
$table_chars->data[$row][1] = html_print_input_text ('graph_precision', $config["graph_precision"], '', 5, 5, true, $disabled_graph_precision, false, "onChange=\"change_precision()\"");
|
||||
$row++;
|
||||
|
||||
if (!isset($config["short_module_graph_data"]))
|
||||
$config["short_module_graph_data"] = true;
|
||||
$table_chars->data[$row][0] = __('Data precision in graphs');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Number of decimals shown. If the field is empty, it will show all the decimals'), true);
|
||||
$table_chars->data[$row][1] = html_print_input_text ('short_module_graph_data', $config["short_module_graph_data"], '', 5, 5, true, $disabled_graph_precision, false, "onChange=\"change_precision()\"");
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Default line thickness for the Custom Graph.');
|
||||
$table_chars->data[$row][1] = html_print_input_text ('custom_graph_width',
|
||||
$config["custom_graph_width"], '', 5, 5, true);
|
||||
@ -510,18 +518,6 @@ $table_chars->data[$row][1] .= __('No').' ' .
|
||||
html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
|
||||
$row++;
|
||||
|
||||
if (!isset($config["short_module_graph_data"]))
|
||||
$config["short_module_graph_data"] = true;
|
||||
$table_chars->data[$row][0] = __('Shortened module graph data');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('The data number of the module graphs will be rounded and shortened'), true);
|
||||
$table_chars->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('short_module_graph_data', 1, '',
|
||||
$config["short_module_graph_data"], true) .
|
||||
' ';
|
||||
$table_chars->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('short_module_graph_data', 0, '',
|
||||
$config["short_module_graph_data"], true);
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Type of module charts');
|
||||
$table_chars->data[$row][1] = __('Area').' ' .
|
||||
|
BIN
pandora_console/images/console/background/spain_map_blue.png
Normal file
BIN
pandora_console/images/console/background/spain_map_blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
BIN
pandora_console/images/console/background/world_map_blue.jpg
Normal file
BIN
pandora_console/images/console/background/world_map_blue.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 565 KiB |
BIN
pandora_console/images/toggle_green.png
Normal file
BIN
pandora_console/images/toggle_green.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 512 B |
BIN
pandora_console/images/toggle_red.png
Normal file
BIN
pandora_console/images/toggle_red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 426 B |
@ -471,6 +471,7 @@ if ($list_modules) {
|
||||
|
||||
$id_agente = $id_agent = (int)get_parameter('id_agente', 0);
|
||||
$show_notinit = (int)get_parameter('show_notinit', 0);
|
||||
$cluster_list = (int)get_parameter('cluster_list', 0);
|
||||
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $id_agent;
|
||||
$selectTypeUp = '';
|
||||
$selectTypeDown = '';
|
||||
@ -562,9 +563,11 @@ if ($list_modules) {
|
||||
// Fix: for tag functionality groups have to be all user_groups (propagate ACL funct!)
|
||||
$groups = users_get_groups($config["id_user"], $access);
|
||||
|
||||
$tags_sql = tags_get_acl_tags($config['id_user'],
|
||||
array_keys($groups), $access, 'module_condition', 'AND',
|
||||
'tagente_modulo', false, array(), true);
|
||||
if($cluster_list != 1){
|
||||
$tags_sql = tags_get_acl_tags($config['id_user'],
|
||||
array_keys($groups), $access, 'module_condition', 'AND',
|
||||
'tagente_modulo', false, array(), true);
|
||||
}
|
||||
|
||||
$status_filter_monitor = (int)get_parameter('status_filter_monitor', -1);
|
||||
$status_text_monitor = get_parameter('status_text_monitor', '');
|
||||
|
@ -51,6 +51,9 @@ $correctLogin = false;
|
||||
$user_in_db = null;
|
||||
$no_login_msg = "";
|
||||
|
||||
// Clean unwanted output
|
||||
ob_clean();
|
||||
|
||||
// Special call without checks to retrieve version and build of the Pandora FMS
|
||||
// This info is avalable from the web console without login
|
||||
// Don't change the format, it is parsed by applications
|
||||
|
@ -1212,12 +1212,7 @@ class Tree {
|
||||
Tree::processCounters($groups);
|
||||
// Filter groups and eliminates the reference to empty groups
|
||||
if ($remove_empty) {
|
||||
// Filter empty groups
|
||||
$groups = array_filter($groups, function ($group) {
|
||||
return (isset($group['counters']) &&
|
||||
isset($group['counters']['total']) &&
|
||||
!empty($group['counters']['total']));
|
||||
});
|
||||
$groups = Tree::deleteEmptyGroups($groups);
|
||||
}
|
||||
usort($groups, array("Tree", "cmpSortNames"));
|
||||
return $groups;
|
||||
@ -1604,6 +1599,15 @@ class Tree {
|
||||
'url' => $moduleGraphURL,
|
||||
'handle' => $winHandle
|
||||
);
|
||||
|
||||
// Info to be able to open the snapshot image new page
|
||||
$module['snapshot'] = ui_get_snapshot_link(array(
|
||||
'id_module' => $module['id'],
|
||||
'last_data' => $module['datos'],
|
||||
'timestamp' => $module['timestamp'],
|
||||
'interval' => $module['current_interval'],
|
||||
'module_name' => $module['name']
|
||||
), true);
|
||||
}
|
||||
|
||||
// Alerts fired image
|
||||
@ -1892,6 +1896,31 @@ class Tree {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Recursive function to remove the empty groups
|
||||
*
|
||||
* @param groups All groups structure
|
||||
*
|
||||
* @return new_groups A new groups structure without empty groups
|
||||
*/
|
||||
protected static function deleteEmptyGroups ($groups) {
|
||||
$new_groups = array();
|
||||
foreach ($groups as $group) {
|
||||
// If a group is empty, do not add to new_groups.
|
||||
if (!isset($group['counters']['total']) || $group['counters']['total'] == 0) {
|
||||
continue;
|
||||
}
|
||||
// Tray to remove the children groups
|
||||
if (!empty($group['children'])) {
|
||||
$children = Tree::deleteEmptyGroups ($group['children']);
|
||||
if (empty($children)) unset($group['children']);
|
||||
else $group['children'] = $children;
|
||||
}
|
||||
$new_groups[] = $group;
|
||||
}
|
||||
return $new_groups;
|
||||
}
|
||||
|
||||
private static function extractGroupsWithIDs ($groups, $ids_hash) {
|
||||
$result_groups = array();
|
||||
foreach ($groups as $group) {
|
||||
|
@ -22,8 +22,8 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC180226';
|
||||
$pandora_version = 'v7.0NG.719';
|
||||
$build_version = 'PC180322';
|
||||
$pandora_version = 'v7.0NG.720';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
|
@ -80,7 +80,7 @@ function agents_create_agent ($name, $id_group, $interval, $ip_address, $values
|
||||
if (empty ($name))
|
||||
return false;
|
||||
|
||||
if (empty ($id_group))
|
||||
if (empty ($id_group) && (int)$id_group != 0)
|
||||
return false;
|
||||
|
||||
if (empty ($ip_address))
|
||||
|
@ -34,6 +34,7 @@ enterprise_include_once ('include/functions_local_components.php');
|
||||
enterprise_include_once ('include/functions_events.php');
|
||||
enterprise_include_once ('include/functions_agents.php');
|
||||
enterprise_include_once ('include/functions_modules.php');
|
||||
enterprise_include_once ('include/functions_collection.php');
|
||||
|
||||
/**
|
||||
* Parse the "other" parameter.
|
||||
|
@ -1864,6 +1864,10 @@ function config_process_config () {
|
||||
config_update_value ('networkmap_max_width', 900);
|
||||
}
|
||||
|
||||
if (!isset($config['short_module_graph_data'])) {
|
||||
config_update_value ('short_module_graph_data', '');
|
||||
}
|
||||
|
||||
if (!isset($config['tutorial_mode'])) {
|
||||
config_update_value ('tutorial_mode', 'full');
|
||||
}
|
||||
|
@ -3859,9 +3859,10 @@ function grafico_eventos_usuario ($width, $height) {
|
||||
*/
|
||||
function graph_custom_sql_graph ($id, $width, $height,
|
||||
$type = 'sql_graph_vbar', $only_image = false, $homeurl = '',
|
||||
$ttl = 1) {
|
||||
$ttl = 1, $max_num_elements = 8) {
|
||||
|
||||
global $config;
|
||||
$SQL_GRAPH_MAX_LABEL_SIZE = 20;
|
||||
|
||||
$report_content = db_get_row ('treport_content', 'id_rc', $id);
|
||||
if($id != null){
|
||||
@ -3920,18 +3921,38 @@ function graph_custom_sql_graph ($id, $width, $height,
|
||||
if (!empty($data_item["value"])) {
|
||||
$value = $data_item["value"];
|
||||
}
|
||||
$label = __('Data');
|
||||
if (!empty($data_item["label"])) {
|
||||
$label = $data_item["label"];
|
||||
}
|
||||
switch ($type) {
|
||||
case 'sql_graph_vbar': // vertical bar
|
||||
case 'sql_graph_hbar': // horizontal bar
|
||||
$data[$label."_".$count]['g'] = $value;
|
||||
break;
|
||||
case 'sql_graph_pie': // Pie
|
||||
$data[$label."_".$count] = $value;
|
||||
break;
|
||||
if ($count <= $max_num_elements) {
|
||||
$label = __('Data');
|
||||
if (!empty($data_item["label"])) {
|
||||
$label = io_safe_output($data_item["label"]);
|
||||
if (strlen($label) > $SQL_GRAPH_MAX_LABEL_SIZE) {
|
||||
$first_label = $label;
|
||||
$label = substr($first_label, 0, floor($SQL_GRAPH_MAX_LABEL_SIZE/2));
|
||||
$label .= '...';
|
||||
$label .= substr($first_label, floor(-$SQL_GRAPH_MAX_LABEL_SIZE/2));
|
||||
}
|
||||
}
|
||||
switch ($type) {
|
||||
case 'sql_graph_vbar': // vertical bar
|
||||
case 'sql_graph_hbar': // horizontal bar
|
||||
$data[$label."_".$count]['g'] = $value;
|
||||
break;
|
||||
case 'sql_graph_pie': // Pie
|
||||
$data[$label."_".$count] = $value;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch ($type) {
|
||||
case 'sql_graph_vbar': // vertical bar
|
||||
case 'sql_graph_hbar': // horizontal bar
|
||||
if (!isset($data[__('Other')]['g'])) $data[__('Other')]['g'] = 0;
|
||||
$data[__('Other')]['g'] += $value;
|
||||
break;
|
||||
case 'sql_graph_pie': // Pie
|
||||
if (!isset($data[__('Other')])) $data[__('Other')] = 0;
|
||||
$data[__('Other')] += $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3949,16 +3970,50 @@ function graph_custom_sql_graph ($id, $width, $height,
|
||||
|
||||
switch ($type) {
|
||||
case 'sql_graph_vbar': // vertical bar
|
||||
return vbar_graph($flash_charts, $data, $width, $height, array(),
|
||||
array(), "", "", $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], false, $ttl, "", "white", false, false, "black");
|
||||
return vbar_graph(
|
||||
$flash_charts,
|
||||
$data,
|
||||
$width,
|
||||
$height,
|
||||
array(),
|
||||
array(),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
$water_mark,
|
||||
$config['fontpath'],
|
||||
$config['font_size'],
|
||||
"",
|
||||
$ttl,
|
||||
$config['homeurl'],
|
||||
"white",
|
||||
false,
|
||||
false,
|
||||
"black"
|
||||
);
|
||||
break;
|
||||
case 'sql_graph_hbar': // horizontal bar
|
||||
return hbar_graph($flash_charts, $data, $width, $height, array(),
|
||||
array(), "", "", true, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], false, $ttl,$config['homeurl'],
|
||||
'white',
|
||||
'black');
|
||||
return hbar_graph(
|
||||
$flash_charts,
|
||||
$data,
|
||||
$width,
|
||||
$height,
|
||||
array(),
|
||||
array(),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
$water_mark,
|
||||
$config['fontpath'],
|
||||
$config['font_size'],
|
||||
false,
|
||||
$ttl,
|
||||
$config['homeurl'],
|
||||
'white',
|
||||
'black'
|
||||
);
|
||||
break;
|
||||
case 'sql_graph_pie': // Pie
|
||||
return pie3d_graph($flash_charts, $data, $width, $height, __("other"), $homeurl,
|
||||
|
@ -1087,21 +1087,14 @@ function modules_get_agentmodule_descripcion ($id_agente_modulo) {
|
||||
*
|
||||
* @return string Module type of the given agent module.
|
||||
*/
|
||||
function modules_get_agentmodule_type ($id_agentmodule, $metaconsole = false, $id_server = null) {
|
||||
|
||||
if ($metaconsole) {
|
||||
$server = db_get_row('tmetaconsole_setup', 'id', $id_server);
|
||||
|
||||
$return = db_get_value ('id_tipo_modulo',
|
||||
'tagente_modulo', 'id_agente_modulo', (int) $id_agentmodule);
|
||||
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
else {
|
||||
$return = db_get_value ('id_tipo_modulo',
|
||||
'tagente_modulo', 'id_agente_modulo', (int) $id_agentmodule);
|
||||
}
|
||||
|
||||
function modules_get_agentmodule_type ($id_agentmodule) {
|
||||
$return = db_get_value (
|
||||
'id_tipo_modulo',
|
||||
'tagente_modulo',
|
||||
'id_agente_modulo',
|
||||
(int) $id_agentmodule
|
||||
);
|
||||
|
||||
return (int) $return;
|
||||
}
|
||||
|
||||
@ -2318,10 +2311,10 @@ function modules_change_relation_lock ($id_relation) {
|
||||
*/
|
||||
function modules_get_first_date($id_agent_module, $datelimit = 0) {
|
||||
global $config;
|
||||
|
||||
|
||||
//check datatype string or normal
|
||||
$table = "tagente_datos";
|
||||
$module_type_str = modules_get_type_name ($id_agent_module);
|
||||
$module_type_str = modules_get_agentmodule_type($id_agent_module);
|
||||
if (strstr ($module_type_str, 'string') !== false) {
|
||||
$table = "tagente_datos_string";
|
||||
}
|
||||
|
@ -731,6 +731,15 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
||||
|
||||
$agent = agents_get_agent_id_by_module_id($relation['id_parent_source_data']);
|
||||
$agent2 = agents_get_agent_id_by_module_id($relation['id_child_source_data']);
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if(isset($node['id_agent'])) {
|
||||
if($node['id_agent'] == $agent) {
|
||||
$agent = $node['id_db'];
|
||||
} else if ($node['id_agent'] == $agent2) {
|
||||
$agent2 = $node['id_db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($relation['child_type'] == 1) {
|
||||
$mod1_status = db_get_value_filter('estado', 'tagente_estado', array('id_agente_modulo' => $relation['id_child_source_data']));
|
||||
@ -742,8 +751,16 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
||||
$item['link_color'] = "#FAD403";
|
||||
}
|
||||
|
||||
$agent = $relation['id_parent_source_data'];
|
||||
$agent2 = agents_get_agent_id_by_module_id($relation['id_child_source_data']);
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if(isset($node['id_agent'])) {
|
||||
if($node['id_agent'] == $relation['id_parent_source_data']) {
|
||||
$agent = $node['id_db'];
|
||||
} else if ($node['id_agent'] == $agent2) {
|
||||
$agent2 = $node['id_db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($relation['parent_type'] == 1) {
|
||||
$mod1_status = db_get_value_filter('estado', 'tagente_estado', array('id_agente_modulo' => $relation['id_parent_source_data']));
|
||||
@ -756,59 +773,67 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
||||
}
|
||||
|
||||
$agent = agents_get_agent_id_by_module_id($relation['id_parent_source_data']);
|
||||
$agent2 = $relation['id_child_source_data'];
|
||||
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if(isset($node['id_agent'])) {
|
||||
if($node['id_agent'] == $agent) {
|
||||
$agent = $node['id_db'];
|
||||
} else if ($node['id_agent'] == $relation['id_child_source_data']) {
|
||||
$agent2 = $node['id_db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (($relation['parent_type'] == 3) && ($relation['child_type'] == 3)) {
|
||||
foreach ($nodes_graph as $key => $node) {
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if ($relation['id_parent'] == $node['id_db']) {
|
||||
$agent = $key;
|
||||
$agent = $node['id_db'];
|
||||
}
|
||||
}
|
||||
foreach ($nodes_graph as $key => $node) {
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if ($relation['id_child'] == $node['id_db']) {
|
||||
$agent2 = $key;
|
||||
$agent2 = $node['id_db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (($relation['parent_type'] == 3) || ($relation['child_type'] == 3)) {
|
||||
if ($relation['parent_type'] == 3) {
|
||||
foreach ($nodes_graph as $key => $node) {
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if ($relation['id_parent'] == $node['id_db']) {
|
||||
$agent = $key;
|
||||
$agent = $node['id_db'];
|
||||
} else if ($node['id_agent'] == $relation['id_child_source_data']) {
|
||||
$agent2 = $node['id_db'];
|
||||
}
|
||||
}
|
||||
$agent2 = $relation['id_child_source_data'];
|
||||
}
|
||||
else if ($relation['child_type'] == 3) {
|
||||
foreach ($nodes_graph as $key => $node) {
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if ($relation['id_child'] == $node['id_db']) {
|
||||
$agent2 = $key;
|
||||
$agent2 = $node['id_db'];
|
||||
} else if ($node['id_agent'] == $relation['id_parent_source_data']) {
|
||||
$agent = $node['id_db'];
|
||||
}
|
||||
}
|
||||
$agent = $relation['id_parent_source_data'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$agent = $relation['id_parent_source_data'];
|
||||
$agent2 = $relation['id_child_source_data'];
|
||||
foreach ($nodes_graph as $key2 => $node) {
|
||||
if(isset($node['id_agent'])) {
|
||||
if($node['id_agent'] == $relation['id_parent_source_data']) {
|
||||
$agent = $node['id_db'];
|
||||
} else if ($node['id_agent'] == $relation['id_child_source_data']) {
|
||||
$agent2 = $node['id_db'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($nodes_graph as $node) {
|
||||
if (!isset($node['id_agent'])) {
|
||||
if ($node['id'] == $agent) {
|
||||
$item['target'] = $node['id'];
|
||||
}
|
||||
else if($node['id'] == $agent2) {
|
||||
$item['source'] = $node['id'];
|
||||
}
|
||||
if ($node['id_db'] == $agent) {
|
||||
$item['target'] = $node['id'];
|
||||
}
|
||||
else {
|
||||
if ($node['id_agent'] == $agent) {
|
||||
$item['target'] = $node['id'];
|
||||
}
|
||||
else if ($node['id_agent'] == $agent2) {
|
||||
$item['source'] = $node['id'];
|
||||
}
|
||||
else if($node['id_db'] == $agent2) {
|
||||
$item['source'] = $node['id'];
|
||||
}
|
||||
}
|
||||
$return[] = $item;
|
||||
|
@ -3294,7 +3294,8 @@ function reporting_sql_graph($report, $content, $type,
|
||||
$content["type"],
|
||||
true,
|
||||
ui_get_full_url(false, false, false, false),
|
||||
$ttl);
|
||||
$ttl,
|
||||
$content['top_n_value']);
|
||||
break;
|
||||
case 'data':
|
||||
break;
|
||||
@ -6766,7 +6767,9 @@ function reporting_set_conf_charts(&$width, &$height, &$only_image, $type,
|
||||
case 'dinamic':
|
||||
$only_image = false;
|
||||
$width = 900;
|
||||
$height = 230;
|
||||
$height = isset($content['style']['dyn_height'])
|
||||
? $content['style']['dyn_height']
|
||||
: 230;
|
||||
$ttl = 1;
|
||||
break;
|
||||
case 'static':
|
||||
|
@ -383,7 +383,7 @@ function snmp_browser_get_oid ($target_ip, $community, $target_oid, $version = '
|
||||
else {
|
||||
$snmptranslate_bin = $config['snmptranslate'];
|
||||
}
|
||||
exec ($snmptranslate_bin . " -Td " . escapeshellarg($oid),
|
||||
exec ($snmptranslate_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . " -Td " . escapeshellarg($oid),
|
||||
$translate_output);
|
||||
foreach ($translate_output as $line) {
|
||||
if (preg_match ('/SYNTAX\s+(.*)/', $line, $matches) == 1) {
|
||||
@ -399,13 +399,18 @@ function snmp_browser_get_oid ($target_ip, $community, $target_oid, $version = '
|
||||
$oid_data['display_hint'] = $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the description
|
||||
$translate_output = implode ('', $translate_output);
|
||||
if (preg_match ('/DESCRIPTION\s+\"(.*)\"/', $translate_output, $matches) == 1) {
|
||||
$oid_data['description'] = $matches[1];
|
||||
|
||||
// Parse the description. First search for it in custom values
|
||||
$custom_data = db_get_row('ttrap_custom_values', 'oid', $oid);
|
||||
if ($custom_data === false) {
|
||||
$translate_output = implode ('', $translate_output);
|
||||
if (preg_match ('/DESCRIPTION\s+\"(.*)\"/', $translate_output, $matches) == 1) {
|
||||
$oid_data['description'] = $matches[1];
|
||||
}
|
||||
} else {
|
||||
$oid_data['description'] = $custom_data['description'];
|
||||
}
|
||||
|
||||
|
||||
$full_value = explode (':', trim ($full_oid[1]));
|
||||
if (! isset ($full_value[1])) {
|
||||
$oid_data['value'] = trim ($full_oid[1]);
|
||||
@ -482,26 +487,26 @@ function snmp_browser_print_oid ($oid = array(), $custom_action = '',
|
||||
$table->data[$i][1] = $oid['status'];
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$closer = '<a href="javascript:" onClick="hideOIDData();">';
|
||||
$closer .= html_print_image ("images/blade.png", true, array ("title" => __('Close'), "style" => 'vertical-align: middle;'), false);
|
||||
$closer .= '</a>';
|
||||
|
||||
$table->head[0] = $closer;
|
||||
$table->head[1] = __('OID Information');
|
||||
|
||||
|
||||
// Add a span for custom actions
|
||||
if ($custom_action != '') {
|
||||
$output .= '<span id="snmp_custom_action">' . $closer . $custom_action . '</span>';
|
||||
$table->head[0] = '<span id="snmp_custom_action">' . $closer . $custom_action . '</span>';
|
||||
} else {
|
||||
$table->head[0] = $closer;
|
||||
}
|
||||
|
||||
|
||||
$table->head[1] = __('OID Information');
|
||||
$output .= html_print_table($table, true);
|
||||
|
||||
|
||||
$url = "index.php?" .
|
||||
"sec=gmodules&" .
|
||||
"sec2=godmode/modules/manage_network_components";
|
||||
|
||||
$output .= '<form style="text-align: center;" method="post" action="' . $url . '">';
|
||||
$output .= '<form style="text-align: center; margin: 10px" method="post" action="' . $url . '">';
|
||||
$output .= html_print_input_hidden('create_network_from_snmp_browser', 1, true);
|
||||
$output .= html_print_input_hidden('id_component_type', 2, true);
|
||||
$output .= html_print_input_hidden('type', 17, true);
|
||||
@ -519,7 +524,7 @@ function snmp_browser_print_oid ($oid = array(), $custom_action = '',
|
||||
$output .= html_print_input_hidden('snmp_community', $community, true);
|
||||
$output .= html_print_input_hidden('snmp_version', $snmp_version, true);
|
||||
$output .= html_print_submit_button(__('Create network component'),
|
||||
'', false, '', true);
|
||||
'', false, 'class="sub add"', true);
|
||||
$output .= '</form>';
|
||||
|
||||
if ($return) {
|
||||
@ -672,7 +677,7 @@ function snmp_browser_print_container ($return = false, $width = '100%', $height
|
||||
$output .= '<div id="search_results" style="display: none; padding: 5px; background-color: #EAEAEA; border: 1px solid #E2E2E2; border-radius: 4px;"></div>';
|
||||
$output .= '<div id="spinner" style="position: absolute; top:0; left:0px; display:none; padding: 5px;">' . html_print_image ("images/spinner.gif", true) . '</div>';
|
||||
$output .= '<div id="snmp_browser" style="height: 100%; overflow: auto; background-color: #F4F5F4; border: 1px solid #E2E2E2; border-radius: 4px; padding: 5px;"></div>';
|
||||
$output .= '<div id="snmp_data" style="margin: 5px;"></div>';
|
||||
$output .= '<div class="databox" id="snmp_data" style="margin: 5px;"></div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
@ -850,83 +850,81 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group
|
||||
// Juanma (08/05/2014) Fix : Will have all groups retrieved (also propagated ones)
|
||||
$_groups_not_in = '';
|
||||
|
||||
if($acltags[0]){
|
||||
foreach ($acltags as $group_id => $group_tags) {
|
||||
// Group condition (The module belongs to an agent of the group X)
|
||||
$group_condition = sprintf('id_grupo IN (%s)', implode(',', array_values(groups_get_id_recursive($group_id, true))));
|
||||
//$_groups_not_in .= implode(',', array_values(groups_get_id_recursive($group_id))) . ',';
|
||||
foreach ($acltags as $group_id => $group_tags) {
|
||||
// Group condition (The module belongs to an agent of the group X)
|
||||
$group_condition = sprintf('id_grupo IN (%s)', implode(',', array_values(groups_get_id_recursive($group_id, true))));
|
||||
//$_groups_not_in .= implode(',', array_values(groups_get_id_recursive($group_id))) . ',';
|
||||
|
||||
// Tags condition (The module has at least one of the restricted tags)
|
||||
$tags_condition = '';
|
||||
if (empty($group_tags)) {
|
||||
$tags_condition = "id_grupo = ".$group_id;
|
||||
// Tags condition (The module has at least one of the restricted tags)
|
||||
$tags_condition = '';
|
||||
if (empty($group_tags)) {
|
||||
$tags_condition = "id_grupo = ".$group_id;
|
||||
}
|
||||
else {
|
||||
if (!is_array($group_tags)) {
|
||||
$group_tags = explode(',', $group_tags);
|
||||
}
|
||||
else {
|
||||
if (!is_array($group_tags)) {
|
||||
$group_tags = explode(',', $group_tags);
|
||||
}
|
||||
|
||||
foreach ($group_tags as $tag) {
|
||||
// If the tag ID doesnt exist, ignore
|
||||
if (!isset($all_tags[$tag])) {
|
||||
continue;
|
||||
}
|
||||
foreach ($group_tags as $tag) {
|
||||
// If the tag ID doesnt exist, ignore
|
||||
if (!isset($all_tags[$tag])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($tags_condition != '') {
|
||||
$tags_condition .= " OR \n";
|
||||
}
|
||||
if ($tags_condition != '') {
|
||||
$tags_condition .= " OR \n";
|
||||
}
|
||||
|
||||
//~ // Add as condition all the posibilities of the serialized tags
|
||||
//~ $tags_condition .= sprintf('tags LIKE "%s,%%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s,%%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%s %%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s %%"',io_safe_input($all_tags[$tag]));
|
||||
//~ // Add as condition all the posibilities of the serialized tags
|
||||
//~ $tags_condition .= sprintf('tags LIKE "%s,%%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s,%%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%s %%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s %%"',io_safe_input($all_tags[$tag]));
|
||||
|
||||
if ($force_group_and_tag) {
|
||||
if (!empty($all_tags[$tag])) {
|
||||
if ($force_equal) {
|
||||
$tags_condition .= sprintf('(tags = "%s"',io_safe_input($all_tags[$tag]));
|
||||
} else {
|
||||
$tags_condition .= "(tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
||||
}
|
||||
$childrens = groups_get_childrens($group_id, null, true);
|
||||
|
||||
if (empty($childrens)) {
|
||||
$tags_condition .= sprintf(' AND id_grupo = %d )', $group_id);
|
||||
} else {
|
||||
$childrens_ids[] = $group_id;
|
||||
foreach ($childrens as $child) {
|
||||
$childrens_ids[] = (int)$child['id_grupo'];
|
||||
}
|
||||
$ids_str = implode(',', $childrens_ids);
|
||||
|
||||
$tags_condition .= sprintf(' AND id_grupo IN (%s) )', $ids_str);
|
||||
}
|
||||
if ($force_group_and_tag) {
|
||||
if (!empty($all_tags[$tag])) {
|
||||
if ($force_equal) {
|
||||
$tags_condition .= sprintf('(tags = "%s"',io_safe_input($all_tags[$tag]));
|
||||
} else {
|
||||
$tags_condition .= "id_grupo = ".$group_id;
|
||||
$tags_condition .= "(tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
||||
}
|
||||
$childrens = groups_get_childrens($group_id, null, true);
|
||||
|
||||
if (empty($childrens)) {
|
||||
$tags_condition .= sprintf(' AND id_grupo = %d )', $group_id);
|
||||
} else {
|
||||
$childrens_ids[] = $group_id;
|
||||
foreach ($childrens as $child) {
|
||||
$childrens_ids[] = (int)$child['id_grupo'];
|
||||
}
|
||||
$ids_str = implode(',', $childrens_ids);
|
||||
|
||||
$tags_condition .= sprintf(' AND id_grupo IN (%s) )', $ids_str);
|
||||
}
|
||||
} else {
|
||||
if ($force_equal) {
|
||||
$tags_condition .= sprintf('tags = "%s"',io_safe_input($all_tags[$tag]));
|
||||
} else {
|
||||
$tags_condition .= "tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
||||
}
|
||||
$tags_condition .= "id_grupo = ".$group_id;
|
||||
}
|
||||
} else {
|
||||
if ($force_equal) {
|
||||
$tags_condition .= sprintf('tags = "%s"',io_safe_input($all_tags[$tag]));
|
||||
} else {
|
||||
$tags_condition .= "tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If there is not tag condition ignore
|
||||
if (empty($tags_condition)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($condition != '') {
|
||||
$condition .= ' OR ';
|
||||
}
|
||||
|
||||
$condition .= "($tags_condition)\n";
|
||||
}
|
||||
|
||||
// If there is not tag condition ignore
|
||||
if (empty($tags_condition)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($condition != '') {
|
||||
$condition .= ' OR ';
|
||||
}
|
||||
|
||||
$condition .= "($tags_condition)\n";
|
||||
}
|
||||
|
||||
//Commented because ACLs propagation don't work
|
||||
@ -975,10 +973,11 @@ function tags_has_user_acl_tags($id_user = false) {
|
||||
*
|
||||
* @param string ID of the user (with false the user will be taked from config)
|
||||
* @param string Access flag where check what tags have the user
|
||||
* @param bool returns 0 if the user has all the tags
|
||||
*
|
||||
* @return string SQL condition for tagente_module
|
||||
*/
|
||||
function tags_get_user_tags($id_user = false, $access = 'AR') {
|
||||
function tags_get_user_tags($id_user = false, $access = 'AR', $return_tag_any = false) {
|
||||
global $config;
|
||||
|
||||
//users_is_strict_acl
|
||||
@ -1036,7 +1035,11 @@ function tags_get_user_tags($id_user = false, $access = 'AR') {
|
||||
return array();
|
||||
}
|
||||
else {
|
||||
return $all_tags;
|
||||
if($return_tag_any) {
|
||||
return 0;
|
||||
} else {
|
||||
return $all_tags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,21 +268,14 @@ function treeview_printModuleTable($id_module, $server_data = false, $no_head =
|
||||
$last_data_str .= html_print_image('images/clock2.png', true, array('title' => $last_data["timestamp"], 'width' => '18px'));
|
||||
|
||||
$is_snapshot = is_snapshot_data ( $last_data["datos"] );
|
||||
|
||||
if (($config['command_snapshot']) && ($is_snapshot)) {
|
||||
$handle = 'snapshot_' . $module['id_agente_modulo'];
|
||||
$url = 'include/procesos.php?agente=' . $row['id_agente_modulo'];
|
||||
$win_handle = dechex(crc32($handle));
|
||||
if (! defined ('METACONSOLE')) {
|
||||
$link = "winopeng_var('operation/agentes/snapshot_view.php?" .
|
||||
"id=" . $module['id_agente_modulo'] .
|
||||
"&refr=" . $module['current_interval'] .
|
||||
"&label=" . rawurlencode(urlencode(io_safe_output($module['module_name']))) . "','" . $win_handle . "', 700,480)";
|
||||
}
|
||||
else{
|
||||
$link = "winopeng_var('$last_data[datos]','',700,480)";
|
||||
|
||||
}
|
||||
$link = ui_get_snapshot_link( array(
|
||||
'id_module' => $module['id_agente_modulo'],
|
||||
'last_data' => $last_data['datos'],
|
||||
'timestamp' => $last_data['timestamp'],
|
||||
'interval' => $module['current_interval'],
|
||||
'module_name' => $module['module_name']
|
||||
));
|
||||
|
||||
if(!is_image_data($last_data["datos"])){
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
|
@ -961,9 +961,15 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f
|
||||
if (!defined('METACONSOLE')) {
|
||||
if (check_acl ($config["id_user"], $id_group, "LW") || check_acl ($config["id_user"], $id_group, "LM")) {
|
||||
$data[$index['validate']] = '';
|
||||
|
||||
|
||||
$data[$index['validate']] .= html_print_checkbox ("validate[]", $alert["id"], false, true);
|
||||
|
||||
$data[$index['validate']] .= html_print_checkbox (
|
||||
"validate[]",
|
||||
$alert["id"],
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1091,10 +1097,11 @@ function ui_print_alert_template_example ($id_alert_template, $return = false, $
|
||||
* @param bool Whether to return or output the result
|
||||
* @param string Home url if its necessary
|
||||
* @param string Image path
|
||||
* @param bool Route is relative or not
|
||||
*
|
||||
* @return string The help tip
|
||||
*/
|
||||
function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image = "images/help.png") {
|
||||
function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image = "images/help.png", $is_relative = false) {
|
||||
global $config;
|
||||
|
||||
if (empty($home_url))
|
||||
@ -1104,10 +1111,16 @@ function ui_print_help_icon ($help_id, $return = false, $home_url = '', $image =
|
||||
$home_url = "../../" . $home_url;
|
||||
}
|
||||
|
||||
$output = html_print_image ($image, true,
|
||||
$output = html_print_image (
|
||||
$image,
|
||||
true,
|
||||
array ("class" => "img_help",
|
||||
"title" => __('Help'),
|
||||
"onclick" => "open_help ('" . $help_id . "','" . $home_url . "','" . $config['id_user'] . "')"));
|
||||
"onclick" => "open_help ('" . $help_id . "','" . $home_url . "','" . $config['id_user'] . "')"
|
||||
),
|
||||
false,
|
||||
$is_relative && is_metaconsole()
|
||||
);
|
||||
if (!$return)
|
||||
echo $output;
|
||||
|
||||
@ -1904,11 +1917,21 @@ function ui_print_session_action_icon ($action, $return = false) {
|
||||
* @param string Complete text to show in the tip
|
||||
* @param bool whether to return an output string or echo now
|
||||
* @param img displayed image
|
||||
* @param bool Print image in relative way
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
function ui_print_help_tip ($text, $return = false, $img = 'images/tip.png') {
|
||||
$output = '<a href="javascript:" class="tip" >' . html_print_image ($img, true, array('title' => $text)) . '</a>';
|
||||
function ui_print_help_tip ($text, $return = false, $img = 'images/tip.png', $is_relative = false) {
|
||||
$output =
|
||||
'<a href="javascript:" class="tip" >' .
|
||||
html_print_image (
|
||||
$img,
|
||||
true,
|
||||
array('title' => $text),
|
||||
false,
|
||||
$is_relative && is_metaconsole()
|
||||
) .
|
||||
'</a>';
|
||||
|
||||
if ($return)
|
||||
return $output;
|
||||
@ -3902,4 +3925,48 @@ function ui_print_tags_view($title = '', $tags = array()) {
|
||||
$tv .= '</div>';
|
||||
echo $tv;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the link to open a snapshot into a new page
|
||||
*
|
||||
* @param Array Params to build the link (see $default_params)
|
||||
* @param bool Flag to choose de return value:
|
||||
* true: Get the four params required in the function of pandora.js winopen_var (js use)
|
||||
* false: Get an inline winopen_var function call (php user)
|
||||
*/
|
||||
function ui_get_snapshot_link($params, $only_params = false) {
|
||||
global $config;
|
||||
|
||||
$default_params = array(
|
||||
'id_module' => 0, //id_agente_modulo
|
||||
'module_name' => '',
|
||||
'interval' => 300,
|
||||
'last_data' => '',
|
||||
'timestamp' => '0'
|
||||
);
|
||||
|
||||
// Merge default params with passed params
|
||||
$params = array_merge ($default_params, $params);
|
||||
|
||||
// First parameter of js winopeng_var
|
||||
$page = $config['homeurl_static'] . "/operation/agentes/snapshot_view.php";
|
||||
|
||||
$url = "$page?" .
|
||||
"id=" . $params['id_module'] .
|
||||
"&refr=" . $parms['interval'] .
|
||||
"×tamp=" . $params['timestamp'] .
|
||||
"&last_data=" . rawurlencode(urlencode(io_safe_output($params['last_data']))) .
|
||||
"&label=" . rawurlencode(urlencode(io_safe_output($params['module_name'])));
|
||||
|
||||
// Second parameter of js winopeng_var
|
||||
$win_handle = dechex(crc32('snapshot_' . $params['id_module']));
|
||||
|
||||
$link_parts = array ($url, $win_handle, 700, 480);
|
||||
|
||||
// Return only the params to js execution
|
||||
if ($only_params) return $link_parts;
|
||||
|
||||
// Return the function call to inline js execution
|
||||
return "winopeng_var('" . implode("', '", $link_parts) . "')";
|
||||
}
|
||||
?>
|
||||
|
@ -3602,6 +3602,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
||||
*/
|
||||
function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter = false,
|
||||
$returnAllGroup = true, $favourite = false) {
|
||||
|
||||
if (! is_array ($filter)){
|
||||
$filter = array ();
|
||||
} else {
|
||||
@ -3626,10 +3627,7 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
||||
if ($returnAllGroup) {
|
||||
$groups = users_get_groups ($id_user, 'VR', true, true);
|
||||
} else {
|
||||
if(users_is_admin($id_user)){
|
||||
$groups = users_get_groups ($id_user, 'VR', true, true);
|
||||
}
|
||||
else{
|
||||
|
||||
if(!empty($filter['group'])) {
|
||||
$permissions_group = users_get_groups ($id_user, 'VR', false, true);
|
||||
if(empty($permissions_group)){
|
||||
@ -3637,12 +3635,12 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
||||
}
|
||||
$groups = array_intersect_key($filter['group'], $permissions_group);
|
||||
} else {
|
||||
$groups = users_get_groups ($id_user, 'VR', false, true);
|
||||
$groups = users_get_groups ($id_user, 'VR', true, true);
|
||||
if(empty($groups)) {
|
||||
$groups = users_get_groups ($id_user, 'VM', false, true);
|
||||
$groups = users_get_groups ($id_user, 'VM', true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unset($filter['group']);
|
||||
}
|
||||
|
@ -735,7 +735,17 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
||||
'icon', 'label', 'datos');
|
||||
$form_items_advance['element_group_row']['html'] = '<td align="left">'.
|
||||
__('Restrict access to group') . '</td>' .
|
||||
'<td align="left">' . html_print_select($user_groups, 'element_group', '', '', '', 0, true) .
|
||||
'<td align="left">' .
|
||||
html_print_select_groups(
|
||||
$config['id_user'],
|
||||
"VR",
|
||||
true,
|
||||
'element_group',
|
||||
__('All'),
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true) .
|
||||
ui_print_help_tip (
|
||||
__("If selected, restrict visualization of this item in the visual console to users who have access to selected group. This is also used on calculating child visual consoles."), true) .
|
||||
'</td>';
|
||||
|
@ -152,11 +152,29 @@ function slicesbar_graph($chart_data, $period, $width, $height, $colors,
|
||||
return "<img src='".$home_url."include/graphs/functions_pchart.php?static_graph=1&graph_type=slicebar&ttl=".$ttl."&id_graph=".$id_graph."' style='width:100%;'>";
|
||||
}
|
||||
|
||||
function vbar_graph($flash_chart, $chart_data, $width, $height,
|
||||
$color, $legend, $long_index, $no_data_image, $xaxisname = "",
|
||||
$yaxisname = "", $water_mark = "", $font = '', $font_size = '',
|
||||
$unit = '', $ttl = 1, $homeurl = '', $backgroundColor = 'white',
|
||||
$from_ux = false, $from_wux = false, $tick_color = 'white') {
|
||||
function vbar_graph(
|
||||
$flash_chart,
|
||||
$chart_data,
|
||||
$width,
|
||||
$height,
|
||||
$color,
|
||||
$legend,
|
||||
$long_index,
|
||||
$no_data_image,
|
||||
$xaxisname = "",
|
||||
$yaxisname = "",
|
||||
$water_mark = "",
|
||||
$font = '',
|
||||
$font_size = '',
|
||||
$unit = '',
|
||||
$ttl = 1,
|
||||
$homeurl = '',
|
||||
$backgroundColor = 'white',
|
||||
$from_ux = false,
|
||||
$from_wux = false,
|
||||
$tick_color = 'white'
|
||||
) {
|
||||
|
||||
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
|
||||
|
||||
if (empty($chart_data)) {
|
||||
@ -170,24 +188,22 @@ function vbar_graph($flash_chart, $chart_data, $width, $height,
|
||||
$tick_color);
|
||||
}
|
||||
else {
|
||||
$new_chart_data = array();
|
||||
foreach ($chart_data as $key => $value) {
|
||||
if(strlen($key) > 20){
|
||||
|
||||
if(strpos($key, ' - ') != -1){
|
||||
$key_temp = explode(" - ",$key);
|
||||
$key_temp[0] = $key_temp[0]." \n";
|
||||
$key_temp[1]= '...'.substr($key_temp[1],-15);
|
||||
$key2 = $key_temp[0].$key_temp[1];
|
||||
io_safe_output($key2);
|
||||
}
|
||||
$chart_data[$key2]['g'] = $chart_data[$key]['g'];
|
||||
unset($chart_data[$key]);
|
||||
if(strlen($key) > 20 && strpos($key, ' - ') !== false){
|
||||
$key_temp = explode(" - ",$key);
|
||||
$key_temp[0] = $key_temp[0]." \n";
|
||||
$key_temp[1]= '...'.substr($key_temp[1],-15);
|
||||
$key2 = $key_temp[0].$key_temp[1];
|
||||
io_safe_output($key2);
|
||||
$new_chart_data[$key2]['g'] = $chart_data[$key]['g'];
|
||||
} else {
|
||||
$new_chart_data[$key] = $value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$graph = array();
|
||||
$graph['data'] = $chart_data;
|
||||
$graph['data'] = $new_chart_data;
|
||||
$graph['width'] = $width;
|
||||
$graph['height'] = $height;
|
||||
$graph['color'] = $color;
|
||||
@ -703,7 +719,7 @@ function pie_graph($graph_type, $flash_chart, $chart_data, $width,
|
||||
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
|
||||
|
||||
// This library allows only 8 colors
|
||||
$max_values = 5;
|
||||
$max_values = 9;
|
||||
|
||||
//Remove the html_entities
|
||||
$temp = array();
|
||||
|
@ -1773,7 +1773,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
||||
$('#timestamp_'+graph_id).show();
|
||||
// If no legend, the timestamp labels are short and with value
|
||||
if (legend.length == 0) {
|
||||
$('#timestamp_'+graph_id).text(labels[j] + ' (' + (short_data ? parseFloat(y).toFixed(2) : parseFloat(y)) + ')');
|
||||
$('#timestamp_'+graph_id).text(labels[j] + ' (' + (short_data ? number_format(y, 0, "", short_data) : parseFloat(y)) + ')');
|
||||
}
|
||||
else {
|
||||
$('#timestamp_'+graph_id).text(labels_long[j]);
|
||||
@ -1809,7 +1809,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
||||
// The graphs of points type and unknown graphs will dont be updated
|
||||
if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) {
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
.eq(i).html(label_aux + '= ' + (short_data ? parseFloat(y).toFixed(2) : parseFloat(y)) + how_bigger + ' ' + unit);
|
||||
.eq(i).html(label_aux + '= ' + (short_data ? number_format(y, 0, "", short_data) : parseFloat(y)) + how_bigger + ' ' + unit);
|
||||
}
|
||||
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
@ -1925,10 +1925,15 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
||||
function yFormatter(v, axis) {
|
||||
axis.datamin = 0;
|
||||
if (short_data) {
|
||||
var formatted = number_format(v, force_integer, "");
|
||||
var formatted = number_format(v, force_integer, "", short_data);
|
||||
}
|
||||
else {
|
||||
var formatted = v;
|
||||
// It is an integer
|
||||
if(v - Math.floor(v) == 0){
|
||||
var formatted = number_format(v, force_integer, "", 2);
|
||||
} else {
|
||||
var formatted = v;
|
||||
}
|
||||
}
|
||||
|
||||
return '<div class='+font+' style="font-size:'+font_size+'pt;">'+formatted+'</div>';
|
||||
@ -2177,15 +2182,16 @@ function check_adaptions(graph_id) {
|
||||
});
|
||||
}
|
||||
|
||||
function number_format(number, force_integer, unit) {
|
||||
function number_format(number, force_integer, unit, short_data) {
|
||||
if (force_integer) {
|
||||
if (Math.round(number) != number) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Round to 2 decimals
|
||||
number = Math.round(number * 100) / 100;
|
||||
short_data ++;
|
||||
decimals = pad(1, short_data, 0);
|
||||
number = Math.round(number * decimals) / decimals;
|
||||
}
|
||||
|
||||
var shorts = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
||||
@ -2206,6 +2212,11 @@ function number_format(number, force_integer, unit) {
|
||||
|
||||
return number + ' ' + shorts[pos] + unit;
|
||||
}
|
||||
|
||||
function pad(input, length, padding) {
|
||||
var str = input + "";
|
||||
return (length <= str.length) ? str : pad(str+padding, length, padding);
|
||||
}
|
||||
// Recalculate the threshold data depends on warning and critical
|
||||
function axis_thresholded (threshold_data, y_min, y_max, red_threshold, extremes, red_up) {
|
||||
|
||||
|
@ -490,14 +490,10 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
||||
true);
|
||||
|
||||
if (!isset($config["short_module_graph_data"]))
|
||||
$config["short_module_graph_data"] = true;
|
||||
$config["short_module_graph_data"] = '';
|
||||
|
||||
if ($config["short_module_graph_data"]) {
|
||||
$short_data = true;
|
||||
}
|
||||
else {
|
||||
$short_data = false;
|
||||
}
|
||||
$short_data = $config["short_module_graph_data"];
|
||||
|
||||
|
||||
|
||||
// Javascript code
|
||||
|
@ -522,7 +522,7 @@ function pch_pie_graph ($graph_type, $data_values, $legend_values, $width,
|
||||
|
||||
if ($legend_position != 'hidden') {
|
||||
// This is a hardcore adjustment to match most of the graphs, please don't alter
|
||||
$legend_with_aprox = 32 + (4.5 * $max_chars);
|
||||
$legend_with_aprox = 32 + (9.5 * $max_chars);
|
||||
|
||||
$PieChart->drawPieLegend($width - $legend_with_aprox, 5, array("R"=>255,"G"=>255,"B"=>255, "BoxSize"=>10));
|
||||
}
|
||||
|
@ -2334,7 +2334,7 @@ var digitPattern = [
|
||||
digit.select("path:nth-child(5)").classed("lit", function(d) { return digitPattern[4][d]; });
|
||||
digit.select("path:nth-child(6)").classed("lit", function(d) { return digitPattern[5][d]; });
|
||||
digit.select("path:nth-child(7)").classed("lit", function(d) { return digitPattern[6][d]; });
|
||||
separator.classed("lit", seconds & 1);
|
||||
separator.classed("lit", seconds);
|
||||
|
||||
setTimeout(tick, 1000 - now % 1000);
|
||||
})();
|
||||
|
@ -25,12 +25,14 @@ When it comes to creating the action these are the only 3 fields we can set. Wit
|
||||
Apart from the defined module macros, the following macros are also available:
|
||||
<ul>
|
||||
<li>_address_: Address of the agent that triggered the alert.</li>
|
||||
<li>_address_n_ : The address of the agent that corresponds to the position indicated in "n" e.g: address_1_ , address_2__</li>
|
||||
<li>_agent_: Name of the agent that triggered the alert.</li>
|
||||
<li>_address_n_ : The address of the agent that corresponds to the position indicated in "n" e.g: address_1_ , address_2_.</li>
|
||||
<li>_agent_: Alias of the agent that triggered the alert. If there is no alias assigned, the name of the agent will be used instead.</li>
|
||||
<li>_agentalias_: Alias of the agent that triggered the alert.</li>
|
||||
<li>_agentcustomfield_n_: Agent custom field number n (eg. _agentcustomfield_9_).</li>
|
||||
<li>_agentcustomid_: Agent custom ID.</li>
|
||||
<li>_agentdescription_: Description of the agent that triggered the alert.</li>
|
||||
<li>_agentgroup_ : Agent group name.</li>
|
||||
<li>_agentname_: Name of the agent that triggered the alert.</li>
|
||||
<li>_agentos_: Agent's operative system.</li>
|
||||
<li>_agentstatus_ : Current status of the agent.</li>
|
||||
<li>_alert_critical_instructions_: Instructions for CRITICAL status contained in the module.</li>
|
||||
@ -45,10 +47,11 @@ Apart from the defined module macros, the following macros are also available:
|
||||
<li>_all_address_ : All address of the agent that fired the alert.</li>
|
||||
<li>_data_: Module data that caused the alert to fire.</li>
|
||||
<li>_email_tag_: Emails associated to the module’s tags.</li>
|
||||
<li>_event_cfX_: (Only event alerts) Key of the event custom field that fired the alert.</li>
|
||||
<li>_event_cfX_: (Only event alerts) Key of the event custom field that fired the alert. For example, if there is a custom field whose key is IPAM, its value can be obtained using the _event_cfIPAM_ macro.</li>
|
||||
<li>_event_description_: (Only event alerts) The textual description of the Pandora FMS event.</li>
|
||||
<li>_event_extra_id_ : (Only event alerts) Extra id.</li>
|
||||
<li>_event_id_: (Only event alerts) ID of the event that triggered the alert.</li>
|
||||
<li>_event_text_severity_: (Only event alerts) event text (that triggered the alert) severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_event_text_severity_: (Only event alerts) Event text severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_field1_: User defined field 1.</li>
|
||||
<li>_field2_: User defined field 2.</li>
|
||||
<li>_field3_: User defined field 3.</li>
|
||||
@ -59,29 +62,34 @@ Apart from the defined module macros, the following macros are also available:
|
||||
<li>_field8_: User defined field 8.</li>
|
||||
<li>_field9_: User defined field 9.</li>
|
||||
<li>_field10_: User defined field 10.</li>
|
||||
<li>_groupcontact_: Group’s contact information. Configured when the group is created.</li>
|
||||
<li>_groupcustomid_: Group’s custom ID.</li>
|
||||
<li>_field11_: User defined field 11.</li>
|
||||
<li>_field12_: User defined field 12.</li>
|
||||
<li>_field13_: User defined field 13.</li>
|
||||
<li>_field14_: User defined field 14.</li>
|
||||
<li>_field15_: User defined field 15.</li>
|
||||
<li>_groupcontact_: Group contact information. Configured when the group is created.</li>
|
||||
<li>_groupcustomid_: Group custom ID.</li>
|
||||
<li>_groupother_: Other information about the group. Configured when the group is created.</li>
|
||||
<li>_homeurl_ : It is a link of the public URL this must be configured in the general options of the setup.</li>
|
||||
<li>_id_agent_: Agent’s ID, useful for building a direct URL that redirects to a Pandora FMS console webpage.</li>
|
||||
<li>_id_alert_: Alert’s numeric ID (unique), used to correlate the alert with third party software.</li>
|
||||
<li>_id_group_ : Agent group ID.</li>
|
||||
<li>_id_module_: The module's ID.</li>
|
||||
<li>_id_module_: Module ID.</li>
|
||||
<li>_interval_: Module’s execution interval.</li>
|
||||
<li>_module_: Module name.</li>
|
||||
<li>_modulecustomid_: Module custom ID.</li>
|
||||
<li>_moduledata_X_: Last data of module X (module name, cannot have white spaces).</li>
|
||||
<li>_moduledescription_: Description of the module that triggered the alert.</li>
|
||||
<li>_modulegraph_nh_: (>=6.0) (Only for alerts that use the command eMail) Returns an image encoded in base64 of a module’s 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 on the server's configuration file.</li>
|
||||
<li>_modulegraphth_nh_:Same operation as the previous macro only with the critical and warning thresholds of the module provided they are defined.</li>
|
||||
<li>_modulegraph_nh_: (Only for alerts that use the command eMail) Returns an image encoded in base64 of a module’s 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 on the server's configuration file.</li>
|
||||
<li>_modulegraphth_nh_: (Only for alerts that use the command eMail) Same operation as the previous macro only with the critical and warning thresholds of the module provided they are defined.</li>
|
||||
<li>_modulegroup_: Module’s group name.</li>
|
||||
<li>_modulestatus_: Module status.</li>
|
||||
<li>_moduletags_: URLs asociadas a los tags de módulos.</li>
|
||||
<li>_moduletags_: URLs associated to the module tags.</li>
|
||||
<li>_name_tag_: Names of the tags related to the module.</li>
|
||||
<li>_phone_tag_: Phone numbers related to the module’s tags.</li>
|
||||
<li>_plugin_parameters_: Module’s Plugin parameters.</li>
|
||||
<li>_phone_tag_: Phone numbers associated to the module tags.</li>
|
||||
<li>_plugin_parameters_: Module plugin parameters.</li>
|
||||
<li>_policy_: Name of the policy that the module belongs to (if applies).</li>
|
||||
<li>_prevdata_: Module data previus the alert to fire.</li>
|
||||
<li>_prevdata_: Module previous data before the alert has been triggered.</li>
|
||||
<li>_server_ip_: Ip of server assigned to agent. </li>
|
||||
<li>_server_name_: Name of server assigned to agent. </li>
|
||||
<li>_target_ip_: IP address for the module’s target.</li>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
/**
|
||||
* @package Include/help/en
|
||||
*/
|
||||
?>
|
||||
@ -11,11 +11,13 @@ Besides the defined module macros, the following macros are available:
|
||||
<ul>
|
||||
<li>_address_: Address of the agent that triggered the alert.</li>
|
||||
<li>_address_n_ : The address of the agent that corresponds to the position indicated in "n" e.g: address_1_ , address_2__</li>
|
||||
<li>_agent_: Name of the agent that triggered the alert.</li>
|
||||
<li>_agent_: Alias of the agent that triggered the alert. If there is no alias assigned, the name of the agent will be used instead.</li>
|
||||
<li>_agentalias_: Alias of the agent that triggered the alert.</li>
|
||||
<li>_agentcustomfield_n_: Agent custom field number n (eg. _agentcustomfield_9_).</li>
|
||||
<li>_agentcustomid_: Agent custom ID.</li>
|
||||
<li>_agentdescription_: Description of the agent that triggered the alert.</li>
|
||||
<li>_agentgroup_ : Agent group name.</li>
|
||||
<li>_agentname_: Name of the agent that triggered the alert.</li>
|
||||
<li>_agentos_: Agent's operative system.</li>
|
||||
<li>_agentstatus_ : Current status of the agent.</li>
|
||||
<li>_alert_critical_instructions_: Instructions for CRITICAL status contained in the module.</li>
|
||||
@ -30,10 +32,11 @@ Besides the defined module macros, the following macros are available:
|
||||
<li>_all_address_ : All address of the agent that fired the alert.</li>
|
||||
<li>_data_: Module data that caused the alert to fire.</li>
|
||||
<li>_email_tag_: Emails associated to the module’s tags.</li>
|
||||
<li>_event_cfX_: (Only event alerts) Key of the event custom field that fired the alert. For example, if there is a custom field whose key is IPAM, its value can be obtained using the _event_cfIPAM_ macro.</li>
|
||||
<li>_event_description_: (Only event alerts) The textual description of the Pandora FMS event.</li>
|
||||
<li>_event_extra_id_: (Only event alerts) Extra id.</li>
|
||||
<li>_event_cfX_: (Only event alerts) Key of the event custom field that fired the alert.</li>
|
||||
<li>_event_id_: (Only event alerts) ID of the event that triggered the alert.</li>
|
||||
<li>_event_text_severity_: (Only event alerts) event text (that triggered the alert) severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_event_text_severity_: (Only event alerts) Event text severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_field1_: User defined field 1.</li>
|
||||
<li>_field2_: User defined field 2.</li>
|
||||
<li>_field3_: User defined field 3.</li>
|
||||
@ -44,47 +47,40 @@ Besides the defined module macros, the following macros are available:
|
||||
<li>_field8_: User defined field 8.</li>
|
||||
<li>_field9_: User defined field 9.</li>
|
||||
<li>_field10_: User defined field 10.</li>
|
||||
<li>_groupcontact_: Group’s contact information. Configured when the group is created.</li>
|
||||
<li>_groupcustomid_: Group’s custom ID.</li>
|
||||
<li>_field11_: User defined field 11.</li>
|
||||
<li>_field12_: User defined field 12.</li>
|
||||
<li>_field13_: User defined field 13.</li>
|
||||
<li>_field14_: User defined field 14.</li>
|
||||
<li>_field15_: User defined field 15.</li>
|
||||
<li>_groupcontact_: Group contact information. Configured when the group is created.</li>
|
||||
<li>_groupcustomid_: Group custom ID.</li>
|
||||
<li>_groupother_: Other information about the group. Configured when the group is created.</li>
|
||||
<li>_homeurl_ : It is a link of the public URL this must be configured in the general options of the setup.</li>
|
||||
<li>_id_agent_: Agent’s ID, useful for building a direct URL that redirects to a Pandora FMS console webpage.</li>
|
||||
<li>_id_alert_: Alert’s numeric ID (unique), used to correlate the alert with third party software.</li>
|
||||
<li>_id_group_ : Agent group ID.</li>
|
||||
<li>_id_module_: The module's ID.</li>
|
||||
<li>_id_module_: Module ID.</li>
|
||||
<li>_interval_: Module’s execution interval.</li>
|
||||
<li>_module_: Module name.</li>
|
||||
<li>_modulecustomid_: Module custom ID.</li>
|
||||
<li>_moduledata_X_: Last data of module X (module name, cannot have white spaces).</li>
|
||||
<li>_moduledescription_: Description of the module that triggered the alert.</li>
|
||||
<li>_modulegraph_nh_: (>=6.0) (Only for alerts that use the command eMail) Returns an image encoded in base64 of a module’s 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 on the server's configuration file.</li>
|
||||
<li>_modulegraphth_nh_:Same operation as the previous macro only with the critical and warning thresholds of the module provided they are defined.</li>
|
||||
<li>_modulegraph_nh_: (Only for alerts that use the command eMail) Returns an image encoded in base64 of a module’s 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 on the server's configuration file.</li>
|
||||
<li>_modulegraphth_nh_: (Only for alerts that use the command eMail) Same operation as the previous macro only with the critical and warning thresholds of the module provided they are defined.</li>
|
||||
<li>_modulegroup_: Module’s group name.</li>
|
||||
<li>_modulestatus_: Module status.</li>
|
||||
<li>_moduledata_X_: Last data of module X (module name, cannot have white spaces).</li>
|
||||
<li>_alert_name_: Alert name.</li>
|
||||
<li>_alert_priority_: Alert’s numeric priority.</li>
|
||||
<li>_alert_text_severity_: Priority level, in text, for the alert (Maintenance, Informational, Normal Minor, Major, Critical).</li>
|
||||
<li>_event_text_severity_: (Only event alerts) Text event (which triggered the alert) severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_event_id_: (Only event alerts) ID of the event that triggered the alert.</li>
|
||||
<li>_event_description_: (Only event alerts) The textual description of the Pandora FMS event.</li>
|
||||
<li>_id_agent_: Agent’s ID, useful for building a direct URL that redirects to a Pandora FMS console webpage.</li>
|
||||
<li>_id_group_ : Agent group ID.</li>
|
||||
<li>_id_module_ : ID of module.</li>
|
||||
<li>_id_alert_: Alert’s numeric ID (unique), used to correlate the alert with third party software.</li>
|
||||
<li>_moduletags_: URLs asociadas a los tags de módulos.</li>
|
||||
<li>_moduletags_: URLs associated to the module tags.</li>
|
||||
<li>_name_tag_: Names of the tags related to the module.</li>
|
||||
<li>_phone_tag_: Phone numbers related to the module’s tags.</li>
|
||||
<li>_plugin_parameters_: Module’s Plugin parameters.</li>
|
||||
<li>_phone_tag_: Phone numbers associated to the module tags.</li>
|
||||
<li>_plugin_parameters_: Module plugin parameters.</li>
|
||||
<li>_policy_: Name of the policy that the module belongs to (if applies).</li>
|
||||
<li>_prevdata_: Module data previus the alert to fire.</li>
|
||||
<li>_prevdata_: Module previous data before the alert has been triggered.</li>
|
||||
<li>_server_ip_: Ip of server assigned to agent. </li>
|
||||
<li>_server_name_: Name of server assigned to agent. </li>
|
||||
<li>_target_ip_: IP address for the module’s target.</li>
|
||||
<li>_target_port_: Port number for the module’s target.</li>
|
||||
<li>_timestamp_: Time and date on which the alert was triggered (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_timezone_: Timezone that is represented on _timestamp_.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
@ -27,12 +27,14 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
|
||||
</p>
|
||||
<ul>
|
||||
<li>_address_: Dirección del agente que disparó la alerta.</li>
|
||||
<li>_address_n_ : La dirección del agente que corresponde a la posicion indicada en "n" ejemplo: address_1_ , address_2_</li>
|
||||
<li>_agent_: Nombre del agente que disparó la alerta.</li>
|
||||
<li>_address_n_ : La dirección del agente que corresponde a la posicion indicada en "n". Ejemplo: address_1_ , address_2_</li>
|
||||
<li>_agent_: Alias del agente que disparó la alerta. Si no tiene asignado alias, se usa el nombre del agente.</li>
|
||||
<li>_agentalias_: Alias del agente que disparó la alerta.</li>
|
||||
<li>_agentcustomfield_n_: Campo personalizado número <i>n</i> del agente (eg. _agentcustomfield_9_).</li>
|
||||
<li>_agentcustomid_:ID personalizado del agente.</li>
|
||||
<li>_agentcustomid_: ID personalizado del agente.</li>
|
||||
<li>_agentdescription_: Descripción del agente que disparó la alerta.</li>
|
||||
<li>_agentgroup_ : Nombre del grupo del agente.</li>
|
||||
<li>_agentname_: Nombre del agente que disparó la alerta.</li>
|
||||
<li>_agentos_: Sistema operativo del agente.</li>
|
||||
<li>_agentstatus_ : Estado actual del agente.</li>
|
||||
<li>_alert_critical_instructions_: Instrucciones contenidas en el módulo para un estado CRITICAL.</li>
|
||||
@ -44,13 +46,14 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
|
||||
<li>_alert_times_fired_: Número de veces que se ha disparado la alerta.</li>
|
||||
<li>_alert_unknown_instructions_: Instrucciones contenidas en el módulo para un estado UNKNOWN.</li>
|
||||
<li>_alert_warning_instructions_: Instrucciones contenidas en el módulo para un estado WARNING.</li>
|
||||
<li>_all_address_ : Todas las direcciones del agente que disparo la alerta.</li>
|
||||
<li>_all_address_ : Todas las direcciones del agente que disparó la alerta.</li>
|
||||
<li>_data_: Dato que hizo que la alerta se disparase.</li>
|
||||
<li>_email_tag_: Emails asociados a los tags de módulos.</li>
|
||||
<li>_event_cfX_: (Solo alertas de evento) Clave del campo personalizado del evento que disparó la alerta.</li>
|
||||
<li>_event_cfX_: (Solo alertas de evento) Clave del campo personalizado del evento que disparó la alerta. Por ejemplo, si hay un campo personalizado cuya clave es IPAM, se puede obtener su valor usando la macro _event_cfIPAM_.</li>
|
||||
<li>_event_description_ : (Solo alertas de evento) Descripción textual del evento de Pandora FMS.</li>
|
||||
<li>_event_extra_id_ : (Solo alertas de evento) Id extra.</li>
|
||||
<li>_event_id_: (Solo alertas de evento) Id del evento que disparó la alerta.</li>
|
||||
<li>_event_text_severity_: (Solo alertas de evento) Texto del evento (que disparó la alerta) gravedad (Mantenimiento, Informativo, Normal Menor, Advertencia, Mayor, Crítico).</li>
|
||||
<li>_event_text_severity_: (Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_field1_: Campo 1 definido por el usuario.</li>
|
||||
<li>_field2_: Campo 2 definido por el usuario.</li>
|
||||
<li>_field3_: Campo 3 definido por el usuario.</li>
|
||||
@ -61,10 +64,15 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
|
||||
<li>_field8_: Campo 8 definido por el usuario.</li>
|
||||
<li>_field9_: Campo 9 definido por el usuario.</li>
|
||||
<li>_field10_: Campo 10 definido por el usuario.</li>
|
||||
<li>_field11_: Campo 11 definido por el usuario.</li>
|
||||
<li>_field12_: Campo 12 definido por el usuario.</li>
|
||||
<li>_field13_: Campo 13 definido por el usuario.</li>
|
||||
<li>_field14_: Campo 14 definido por el usuario.</li>
|
||||
<li>_field15_: Campo 15 definido por el usuario.</li>
|
||||
<li>_groupcontact_: Información de contacto del grupo. Se configura al crear el grupo.</li>
|
||||
<li>_groupcustomid_: ID personalizado del grupo.</li>
|
||||
<li>_groupother_: Otra información sobre el grupo. Se configura al crear el grupo.</li>
|
||||
<li>_homeurl_: Es un link de la URL pública esta debe de estar configurada en las opciones generales del setup.</li>
|
||||
<li>_homeurl_: Es un enlace de la URL pública que debe configurarse en las opciones generales de la configuración.</li>
|
||||
<li>_id_agent_: ID del agente, util para construir URL de acceso a la consola de Pandora.</li>
|
||||
<li>_id_alert_: ID de la alerta, util para correlar la alerta en herramientas de terceros.</li>
|
||||
<li>_id_group_ : ID del grupo de agente.</li>
|
||||
@ -72,16 +80,16 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
|
||||
<li>_interval_: Intervalo de la ejecución del módulo.</li>
|
||||
<li>_module_: Nombre del módulo.</li>
|
||||
<li>_modulecustomid_: ID personalizado del módulo.</li>
|
||||
<li>_moduledata_X_: Último dato del módulo X (nombre del módulo, no puede tener espacios).</li>
|
||||
<li>_moduledescription_: Descripcion del modulo.</li>
|
||||
<li>_modulegraph_nh_: (>=6.0) (Only for alerts that use the command eMail) Returns an image encoded in base64 of a module’s 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 on the server's configuration file.</li>
|
||||
<li>_modulegraphth_nh_: Misma operación que la macro anterior pero sólo con los umbrales crítico y de advertencia del módulo, en caso de que estén definidos.</li>
|
||||
<li>_moduledata_X_: Usando esta macro ("X" es el nombre del módulo en cuestión) recogemos el último dato de este módulo y si es numérico lo devuelve formateado con los decimales especificados en la configuración de la consola y con su unidad (si la tiene). Serviría para, por ejemplo, al enviar un correo al saltar una alerta de módulo, enviar también información adicional (y quizás muy relevante) de otros módulos del mismo agente.</li>
|
||||
<li>_moduledescription_: Descripción del módulo.</li>
|
||||
<li>_modulegraph_nh_: (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, la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_modulegraphth_nh_: (Solo para alertas que usen el comando <i>eMail</i>) Misma operación que la macro anterior pero sólo con los umbrales crítico y de advertencia del módulo, en caso de que estén definidos.</li>
|
||||
<li>_modulegroup_: Nombre del grupo del módulo.</li>
|
||||
<li>_modulestatus_: Estado del módulo.</li>
|
||||
<li>_moduletags_: URLs asociadas a los tags de módulos.</li>
|
||||
<li>_name_tag_: Nombre de los tags asociados al módulo.</li>
|
||||
<li>_phone_tag_: Teléfonos asociados a los tags de módulos.</li>
|
||||
<li>_plugin_parameters_: Parámetros del Plug-in del módulo.</li>
|
||||
<li>_plugin_parameters_: Parámetros del plugin del módulo.</li>
|
||||
<li>_policy_: Nombre de la política a la que pertenece el módulo (si aplica).</li>
|
||||
<li>_prevdata_: Dato previo antes de disparase la alerta.</li>
|
||||
<li>_server_ip_: Ip del servidor al que el agente está asignado. </li>
|
||||
@ -89,7 +97,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
|
||||
<li>_target_ip_: Dirección IP del objetivo del módulo.</li>
|
||||
<li>_target_port_: Puerto del objetivo del módulo.</li>
|
||||
<li>_timestamp_: Hora y fecha en que se disparó la alerta.</li>
|
||||
<li>_timezone_: Area Nombre _timestamp_ que representa en.</li>
|
||||
<li>_timezone_: Zona horaria que se representa en _timestamp_.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Ejemplo: Error en el agente _agent_: _alert_description_
|
||||
|
@ -9,76 +9,15 @@
|
||||
Además de las macros de módulo definidas, las siguientes macros están disponibles:
|
||||
</p>
|
||||
<ul>
|
||||
<li>_field1_: Campo 1 definido por el usuario.</li>
|
||||
<li>_field2_: Campo 2 definido por el usuario.</li>
|
||||
<li>_field3_: Campo 3 definido por el usuario.</li>
|
||||
<li>_field4_: Campo 4 definido por el usuario.</li>
|
||||
<li>_field5_: Campo 5 definido por el usuario.</li>
|
||||
<li>_field6_: Campo 6 definido por el usuario.</li>
|
||||
<li>_field7_: Campo 7 definido por el usuario.</li>
|
||||
<li>_field8_: Campo 8 definido por el usuario.</li>
|
||||
<li>_field9_: Campo 9 definido por el usuario.</li>
|
||||
<li>_field10_: Campo 10 definido por el usuario.</li>
|
||||
<li>_agent_: Nombre del agente que disparó la alerta.</li>
|
||||
<li>_agentcustomfield_<i>n</i>_: Campo personalizado número <i>n</i> del agente (eg. _agentcustomfield_9_). </li>
|
||||
<li>_agentcustomid_: ID personalizado del agente. </li>
|
||||
<li>_agentdescription_: Descripción del agente que disparó la alerta.</li>
|
||||
<li>_agentgroup_: Nombre del grupo del agente.</li>
|
||||
<li>_agentstatus_: Estado actual del agente.</li>
|
||||
<li>_agentos_: Sistema operativo del agente.</li>
|
||||
<li>_address_: Dirección del agente que disparó la alerta.</li>
|
||||
<li>_timestamp_: Hora y fecha en que se disparó la alerta.</li>
|
||||
<li>_timezone_: Area Nombre _timestamp_ que representa en.</li>
|
||||
<li>_data_: Dato que hizo que la alerta se disparase.</li>
|
||||
<li>_prevdata_: Dato previo antes de disparase la alerta.</li>
|
||||
<li>_alert_description_: Descripción de la alerta.</li>
|
||||
<li>_alert_threshold_: Umbral de la alerta.</li>
|
||||
<li>_alert_times_fired_: Número de veces que se ha disparado la alerta.</li>
|
||||
<li>_module_: Nombre del módulo.</li>
|
||||
<li>_modulecustomid_: ID personalizado del módulo.</li>
|
||||
<li>_modulegroup_: Nombre del grupo del módulo.</li>
|
||||
<li>_moduledescription_: Descripcion del modulo.</li>
|
||||
<li>_modulestatus_: Estado del módulo.</li>
|
||||
<li>_moduledata_X_: Último dato del módulo X (nombre del módulo, no puede tener espacios).</li>
|
||||
<li>_alert_name_: Nombre de la alerta.</li>
|
||||
<li>_alert_priority_: Prioridad numérica de la alerta.</li>
|
||||
<li>_alert_text_severity_: Prioridad en texto de la alerta (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_eventt_text_severity_: (Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_event_id_: (Solo alertas de evento) Id del evento que disparó la alerta.</li>
|
||||
<li>_event_description_: (Sólo en alertas de evento) la descripción textual del evento que disparó la alerta.</li>
|
||||
<li>_id_agent_: ID del agente, util para construir URL de acceso a la consola de Pandora.</li>
|
||||
<li>_id_group_ : Id del grupo de agente.</li>
|
||||
<li>_id_module_ : ID del módulo.</li>
|
||||
<li>_id_alert_: ID de la alerta, util para correlar la alerta en herramientas de terceros.</li>
|
||||
<li>_policy_: Nombre de la política a la que pertenece el módulo (si aplica).</li>
|
||||
<li>_interval_: Intervalo de la ejecución del módulo. </li>
|
||||
<li>_target_ip_: Dirección IP del objetivo del módulo.</li>
|
||||
<li>_target_port_: Puerto del objetivo del módulo.</li>
|
||||
<li>_plugin_parameters_: Parámetros del plugin del módulo.</li>
|
||||
<li>_server_ip_ : Ip del servidor al que el agente está asignado. </li>
|
||||
<li>_server_name_ : Nombre del servidor al que el agente está asignado. </li>
|
||||
<li>_groupcontact_: Información de contacto del grupo. Se configura al crear el grupo.</li>
|
||||
<li>_groupcustomid_: ID personalizado del grupo.</li>
|
||||
<li>_groupother_: Otra información sobre el grupo. Se configura al crear el grupo.</li>
|
||||
<li>_name_tag_: Nombre de los tags asociados al módulo.</li>
|
||||
<li>_email_tag_: Emails asociados a los tags de módulos.</li>
|
||||
<li>_phone_tag_: Teléfonos asociados a los tags de módulos.</li>
|
||||
<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,
|
||||
la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
|
||||
<li>_address_: Dirección del agente que disparó la alerta.</li>
|
||||
<li>_address_n_ : La dirección del agente que corresponde a la posicion indicada en "n" ejemplo: address_1_ , address_2_</li>
|
||||
<li>_agent_: Nombre del agente que disparó la alerta.</li>
|
||||
<li>_address_n_ : La dirección del agente que corresponde a la posicion indicada en "n". Ejemplo: address_1_ , address_2_</li>
|
||||
<li>_agent_: Alias del agente que disparó la alerta. Si no tiene asignado alias, se usa el nombre del agente.</li>
|
||||
<li>_agentalias_: Alias del agente que disparó la alerta.</li>
|
||||
<li>_agentcustomfield_n_: Campo personalizado número <i>n</i> del agente (eg. _agentcustomfield_9_).</li>
|
||||
<li>_agentcustomid_:ID personalizado del agente.</li>
|
||||
<li>_agentcustomid_: ID personalizado del agente.</li>
|
||||
<li>_agentdescription_: Descripción del agente que disparó la alerta.</li>
|
||||
<li>_agentgroup_ : Nombre del grupo del agente.</li>
|
||||
<li>_agentname_: Nombre del agente que disparó la alerta.</li>
|
||||
<li>_agentos_: Sistema operativo del agente.</li>
|
||||
<li>_agentstatus_ : Estado actual del agente.</li>
|
||||
<li>_alert_critical_instructions_: Instrucciones contenidas en el módulo para un estado CRITICAL.</li>
|
||||
@ -93,10 +32,11 @@ la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_all_address_ : Todas las direcciones del agente que disparo la alerta.</li>
|
||||
<li>_data_: Dato que hizo que la alerta se disparase.</li>
|
||||
<li>_email_tag_: Emails asociados a los tags de módulos.</li>
|
||||
<li>_event_cfX_: (Solo alertas de evento) Clave del campo personalizado del evento que disparó la alerta.</li>
|
||||
<li>_event_extra_id_: (Solo alertas de evento) Id extra.</li>
|
||||
<li>_event_cfX_: (Solo alertas de evento) Clave del campo personalizado del evento que disparó la alerta. Por ejemplo, si hay un campo personalizado cuya clave es IPAM, se puede obtener su valor usando la macro _event_cfIPAM_</li>
|
||||
<li>_event_description_ : (Solo alertas de evento) Descripción textual del evento de Pandora FMS.</li>
|
||||
<li>_event_extra_id_ : (Solo alertas de evento) Id extra.</li>
|
||||
<li>_event_id_: (Solo alertas de evento) Id del evento que disparó la alerta.</li>
|
||||
<li>_event_text_severity_: (Solo alertas de evento) Texto del evento (que disparó la alerta) de la gravedad (Mantenimiento, Informativo, Normal Menor, Advertencia, Mayor, Crítico).</li>
|
||||
<li>_event_text_severity_:(Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_field1_: Campo 1 definido por el usuario.</li>
|
||||
<li>_field2_: Campo 2 definido por el usuario.</li>
|
||||
<li>_field3_: Campo 3 definido por el usuario.</li>
|
||||
@ -107,10 +47,15 @@ la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_field8_: Campo 8 definido por el usuario.</li>
|
||||
<li>_field9_: Campo 9 definido por el usuario.</li>
|
||||
<li>_field10_: Campo 10 definido por el usuario.</li>
|
||||
<li>_field11_: Campo 11 definido por el usuario.</li>
|
||||
<li>_field12_: Campo 12 definido por el usuario.</li>
|
||||
<li>_field13_: Campo 13 definido por el usuario.</li>
|
||||
<li>_field14_: Campo 14 definido por el usuario.</li>
|
||||
<li>_field15_: Campo 15 definido por el usuario.</li>
|
||||
<li>_groupcontact_: Información de contacto del grupo. Se configura al crear el grupo.</li>
|
||||
<li>_groupcustomid_: ID personalizado del grupo.</li>
|
||||
<li>_groupother_: Otra información sobre el grupo. Se configura al crear el grupo.</li>
|
||||
<li>_homeurl_: Es un link de la URL pública esta debe de estar configurada en las opciones generales del setup.</li>
|
||||
<li>_homeurl_: Es un enlace de la URL pública que debe configurarse en las opciones generales de la configuración.</li>
|
||||
<li>_id_agent_: ID del agente, util para construir URL de acceso a la consola de Pandora.</li>
|
||||
<li>_id_alert_: ID de la alerta, util para correlar la alerta en herramientas de terceros.</li>
|
||||
<li>_id_group_ : ID del grupo de agente.</li>
|
||||
@ -118,16 +63,16 @@ la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_interval_: Intervalo de la ejecución del módulo.</li>
|
||||
<li>_module_: Nombre del módulo.</li>
|
||||
<li>_modulecustomid_: ID personalizado del módulo.</li>
|
||||
<li>_moduledata_X_: Último dato del módulo X (nombre del módulo, no puede tener espacios).</li>
|
||||
<li>_moduledescription_: Descripcion del modulo.</li>
|
||||
<li>_modulegraph_nh_: (>=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, la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_modulegraphth_nh_: Misma operación que la macro anterior pero sólo con los umbrales crítico y de advertencia del módulo, en caso de que estén definidos.</li>
|
||||
<li>_moduledata_X_: Usando esta macro ("X" es el nombre del módulo en cuestión) recogemos el último dato de este módulo y si es numérico lo devuelve formateado con los decimales especificados en la configuración de la consola y con su unidad (si la tiene). Serviría para, por ejemplo, al enviar un correo al saltar una alerta de módulo, enviar también información adicional (y quizás muy relevante) de otros módulos del mismo agente.</li>
|
||||
<li>_moduledescription_: Descripción del módulo.</li>
|
||||
<li>_modulegraph_nh_: (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, la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_modulegraphth_nh_: (Solo para alertas que usen el comando <i>eMail</i>) Misma operación que la macro anterior pero sólo con los umbrales crítico y de advertencia del módulo, en caso de que estén definidos.</li>
|
||||
<li>_modulegroup_: Nombre del grupo del módulo.</li>
|
||||
<li>_modulestatus_: Estado del módulo.</li>
|
||||
<li>_moduletags_: URLs asociadas a los tags de módulos.</li>
|
||||
<li>_name_tag_: Nombre de los tags asociados al módulo.</li>
|
||||
<li>_phone_tag_: Teléfonos asociados a los tags de módulos.</li>
|
||||
<li>_plugin_parameters_: Parámetros del Plug-in del módulo.</li>
|
||||
<li>_plugin_parameters_: Parámetros del plugin del módulo.</li>
|
||||
<li>_policy_: Nombre de la política a la que pertenece el módulo (si aplica).</li>
|
||||
<li>_prevdata_: Dato previo antes de disparase la alerta.</li>
|
||||
<li>_server_ip_: Ip del servidor al que el agente está asignado. </li>
|
||||
@ -135,7 +80,7 @@ la cual se realiza en el fichero de configuración del servidor.</li>
|
||||
<li>_target_ip_: Dirección IP del objetivo del módulo.</li>
|
||||
<li>_target_port_: Puerto del objetivo del módulo.</li>
|
||||
<li>_timestamp_: Hora y fecha en que se disparó la alerta.</li>
|
||||
<li>_timezone_: Area Nombre _timestamp_ que representa en.</li>
|
||||
<li>_timezone_: Zona horaria que se representa en _timestamp_.</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
@ -25,56 +25,78 @@ email アクションを設定するには、_field1_ (送信先アドレス)、
|
||||
<p>
|
||||
定義したモジュールマクロ以外に、次のマクロが利用できます:
|
||||
<ul>
|
||||
<li>_field1_ : ユーザ定義フィールド1</li>
|
||||
<li>_field2_ : ユーザ定義フィールド2</li>
|
||||
<li>_field3_ : ユーザ定義フィールド3</li>
|
||||
<li>_agent_ : アラートが発生したエージェント</li>
|
||||
<li>_agentdescription_ : 発生したアラートの説明</li>
|
||||
<li>_agentgroup_ : エージェントグループ名</li>
|
||||
<li>_agentstatus_ : エージェントの現在の状態</li>
|
||||
<li>_agentos_: Agent's operative system</li>
|
||||
<li>_address_ : アラートが発生したエージェントのアドレス</li>
|
||||
<li>_all_address_ : アラートを発報した全エージェントのアドレス</li>
|
||||
<li>_address_n_ : "n" で示される位置に対応するエージェントのアドレス。例: address_1_ , address_2_</li>
|
||||
<li>_timestamp_ : アラートが発生した日時 (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_timezone_: _timestamp_ で使用されるタイムゾーン名.</li>
|
||||
<li>_data_ : アラート発生時のモジュールのデータ(値)</li>
|
||||
<li>_prevdata_ : アラートを発報する前のモジュールデータ</li>
|
||||
<li>_alert_description_ : アラートの説明</li>
|
||||
<li>_alert_threshold_ : アラートのしきい値</li>
|
||||
<li>_alert_times_fired_ : アラートが発生した回数</li>
|
||||
<li>_module_ : モジュール名</li>
|
||||
<li>_modulegroup_ : モジュールグループ名</li>
|
||||
<li>_moduledescription_ : アラートが発生したモジュールの説明</li>
|
||||
<li>_modulestatus_ : モジュールの状態</li>
|
||||
<li>_moduletags_ : モジュールに関連付けられたタグ</li>
|
||||
<li>_alert_name_ : アラート名</li>
|
||||
<li>_alert_priority_ : アラート優先順位(数値)</li>
|
||||
<li>_alert_text_severity_ : テキストでのアラートの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_event_id_ : (イベントアラートのみ) アラート発生元のイベントID</li>
|
||||
<li>_event_extra_id_: (Only event alerts) Extra id.</li>
|
||||
<li>_event_cfX_ : (Only event alerts) Key of the event custom field that fired the alert.</li>
|
||||
<li>_id_agent_ : エージェントのID / Webコンソールへのリンクを生成するのに便利です</li>
|
||||
<li>_id_group_ : エージェントグループのID</li>
|
||||
<li>_id_module_ : モジュールID</li>
|
||||
<li>_id_alert_ : アラートの(ユニークな)ID / 他のソフトウエアパッケージとの連携に利用できます</li>
|
||||
<li>_policy_ : モジュールが属するポリシー名 (存在する場合)</li>
|
||||
<li>_interval_ : モジュールの実行間隔</li>
|
||||
<li>_target_ip_ : モジュールの対象IPアドレス</li>
|
||||
<li>_target_port_ : モジュールの対象ポート</li>
|
||||
<li>_plugin_parameters_ : モジュールのプラグインパラメータ</li>
|
||||
<li>_server_ip_ : Ip of server assigned to agent. </li>
|
||||
<li>_server_name_ : Name of server assigned to agent. </li>
|
||||
<li>_groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。</li>
|
||||
<li>_groupother_ : グループに関するその他情報。グループの作成時に設定されます。</li>
|
||||
<li>_email_tag_ : モジュールタグに関連付けられた Email。</li>
|
||||
<li>_alert_critical_instructions_: モジュールが障害状態の場合の手順</li>
|
||||
<li>_alert_warning_instructions_: モジュールが警告状態の場合の手順</li>
|
||||
<li>_alert_unknown_instructions_: モジュールが不明状態の場合の手順</li>
|
||||
<li>_modulegraph_nh_: (eMail コマンドを用いるアラートの場合のみ) n時間の期間のモジュールグラフのイメージを返します(例: _modulegraph_24h_)。 サーバとコンソールの API の接続を正しく設定する必要があります。これはサーバの設定で行います。</li>
|
||||
<li>_modulegraphth_<i>n</i>h_:上記のマクロと同じですが、モジュールに設定された障害および警告閾値を含みます。</li>
|
||||
<li>_homeurl_ : 公開 URL へのリンク。URLは、基本設定メニューで設定されている必要があります。</li>
|
||||
<li>_address_ : アラートが発生したエージェントのアドレス</li>
|
||||
<li>_address_n_ : "n" で示される位置に対応するエージェントのアドレス。例: address_1_ , address_2_</li>
|
||||
<li>_agent_: Alias of the agent that triggered the alert. If there is no alias assigned, the name of the agent will be used instead.</li>
|
||||
<li>_agentalias_: Alias of the agent that triggered the alert.</li>
|
||||
<li>_agentcustomfield_<i>n</i>_ : エージェントカスタムフィールド番号<i>n</i> (例: _agentcustomfield_9_). </li>
|
||||
<li>_agentcustomid_: エージェントカスタムID</li>
|
||||
<li>_agentdescription_ : 発生したアラートの説明</li>
|
||||
<li>_agentgroup_ : エージェントグループ名</li>
|
||||
<li>_agentname_: アラートが発生したエージェント.</li>
|
||||
<li>_agentos_: Agent's operative system</li>
|
||||
<li>_agentstatus_ : エージェントの現在の状態</li>
|
||||
<li>_alert_critical_instructions_: モジュールが障害状態の場合の手順</li>
|
||||
<li>_alert_description_ : アラートの説明</li>
|
||||
<li>_alert_name_ : アラート名</li>
|
||||
<li>_alert_priority_ : アラート優先順位(数値)</li>
|
||||
<li>_alert_text_severity_ : テキストでのアラートの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_alert_threshold_ : アラートのしきい値</li>
|
||||
<li>_alert_times_fired_ : アラートが発生した回数</li>
|
||||
<li>_alert_unknown_instructions_: モジュールが不明状態の場合の手順</li>
|
||||
<li>_alert_warning_instructions_: モジュールが警告状態の場合の手順</li>
|
||||
<li>_all_address_ : アラートを発報した全エージェントのアドレス</li>
|
||||
<li>_data_ : アラート発生時のモジュールのデータ(値)</li>
|
||||
<li>_email_tag_ : モジュールタグに関連付けられた Email。</li>
|
||||
<li>_event_cfX_ : (イベントアラートのみ) アラートを発報したイベントのカスタムフィールドのキー。 For example, if there is a custom field whose key is IPAM, its value can be obtained using the _event_cfIPAM_ macro.</li>
|
||||
<li>_event_description_ : (イベントアラートのみ) Pandora FMS イベントの説明 です</li>
|
||||
<li>_event_extra_id_: (Only event alerts) Extra id.</li>
|
||||
<li>_event_id_ : (イベントアラートのみ) アラート発生元のイベントID</li>
|
||||
<li>_event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_field1_ : ユーザ定義フィールド1</li>
|
||||
<li>_field2_ : ユーザ定義フィールド2</li>
|
||||
<li>_field3_ : ユーザ定義フィールド3</li>
|
||||
<li>_field4_ : ユーザ定義フィールド4</li>
|
||||
<li>_field5_ : ユーザ定義フィールド5</li>
|
||||
<li>_field6_ : ユーザ定義フィールド6</li>
|
||||
<li>_field7_ : ユーザ定義フィールド7</li>
|
||||
<li>_field8_ : ユーザ定義フィールド8</li>
|
||||
<li>_field9_ : ユーザ定義フィールド9</li>
|
||||
<li>_field10_ : ユーザ定義フィールド10</li>
|
||||
<li>_field11_ : ユーザ定義フィールド11</li>
|
||||
<li>_field12_ : ユーザ定義フィールド12</li>
|
||||
<li>_field13_ : ユーザ定義フィールド13</li>
|
||||
<li>_field14_ : ユーザ定義フィールド14</li>
|
||||
<li>_field15_ : ユーザ定義フィールド15</li>
|
||||
<li>_groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。</li>
|
||||
<li>_groupcustomid_: グループカスタムID</li>
|
||||
<li>_groupother_ : グループに関するその他情報。グループの作成時に設定されます。</li>
|
||||
<li>_homeurl_ : 公開 URL へのリンク。URLは、基本設定メニューで設定されている必要があります。</li>
|
||||
<li>_id_agent_ : エージェントのID / Webコンソールへのリンクを生成するのに便利です</li>
|
||||
<li>_id_alert_ : アラートの(ユニークな)ID / 他のソフトウエアパッケージとの連携に利用できます</li>
|
||||
<li>_id_group_ : エージェントグループのID</li>
|
||||
<li>_id_module_ : モジュールID</li>
|
||||
<li>_interval_ : モジュールの実行間隔</li>
|
||||
<li>_module_ : モジュール名</li>
|
||||
<li>_modulecustomid_: モジュールカスタムID</li>
|
||||
<li>_moduledata_X_: モジュール X の最新データ (モジュール名にスペースを含めることはできません)</li>
|
||||
<li>_moduledescription_ : アラートが発生したモジュールの説明</li>
|
||||
<li>_modulegraph_nh_: (eMail コマンドを用いるアラートの場合のみ) n時間の期間のモジュールグラフのイメージを返します(例: _modulegraph_24h_)。 サーバとコンソールの API の接続を正しく設定する必要があります。これはサーバの設定で行います。</li>
|
||||
<li>_modulegraphth_<i>n</i>h_:上記のマクロと同じですが、モジュールに設定された障害および警告閾値を含みます。</li>
|
||||
<li>_modulegroup_ : モジュールグループ名</li>
|
||||
<li>_modulestatus_ : モジュールの状態</li>
|
||||
<li>_moduletags_ : モジュールに関連付けられたタグ</li>
|
||||
<li>_name_tag_ : モジュールに関連付けられたタグの名前。</li>
|
||||
<li>_phone_tag_ : モジュールタグに関連付けられた電話番号。</li>
|
||||
<li>_plugin_parameters_ : モジュールのプラグインパラメータ</li>
|
||||
<li>_policy_ : モジュールが属するポリシー名 (存在する場合)</li>
|
||||
<li>_prevdata_ : アラートを発報する前のモジュールデータ</li>
|
||||
<li>_server_ip_ : エージェントが割り当てられているサーバ IP。</li>
|
||||
<li>_server_name_ : エージェントが割り当てられているサーバ名。 </li>
|
||||
<li>_target_ip_ : モジュールの対象IPアドレス</li>
|
||||
<li>_target_port_ : モジュールの対象ポート</li>
|
||||
<li>_timestamp_ : アラートが発生した日時 (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_timezone_: _timestamp_ で使用されるタイムゾーン名.</li>
|
||||
</ul>
|
||||
<p>
|
||||
</p>
|
||||
|
@ -9,71 +9,78 @@
|
||||
定義したモジュールマクロ以外に、次のマクロが利用できます:
|
||||
</p>
|
||||
<ul>
|
||||
<li>_field1_ : ユーザ定義フィールド1</li>
|
||||
<li>_field2_ : ユーザ定義フィールド2</li>
|
||||
<li>_field3_ : ユーザ定義フィールド3</li>
|
||||
<li>_field4_ : ユーザ定義フィールド4</li>
|
||||
<li>_field5_ : ユーザ定義フィールド5</li>
|
||||
<li>_field6_ : ユーザ定義フィールド6</li>
|
||||
<li>_field7_ : ユーザ定義フィールド7</li>
|
||||
<li>_field8_ : ユーザ定義フィールド8</li>
|
||||
<li>_field9_ : ユーザ定義フィールド9</li>
|
||||
<li>_field10_ : ユーザ定義フィールド10</li>
|
||||
<li>_agent_ : アラートが発生したエージェント</li>
|
||||
<li>_agentcustomfield_<i>n</i>_ : エージェントカスタムフィールド番号<i>n</i> (例: _agentcustomfield_9_). </li>
|
||||
<li>_agentcustomid_: エージェントカスタムID</li>
|
||||
<li>_agentdescription_ : 発生したアラートの説明</li>
|
||||
<li>_agentgroup_ : エージェントグループ名</li>
|
||||
<li>_agentstatus_ : エージェントの現在の状態</li>
|
||||
<li>_agentos_: エージェントの OS</li>
|
||||
<li>_address_ : アラートが発生したエージェントのアドレス</li>
|
||||
<li>_timestamp_ : アラートが発生した日時 (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_timezone_: _timestamp_ で使用されるタイムゾーン名.</li>
|
||||
<li>_data_ : アラート発生時のモジュールのデータ(値)</li>
|
||||
<li>_prevdata_ : アラート発生前のモジュールデータ</li>
|
||||
<li>_alert_description_ : アラートの説明</li>
|
||||
<li>_alert_threshold_ : アラートのしきい値</li>
|
||||
<li>_alert_times_fired_ : アラートが発生した回数</li>
|
||||
<li>_module_ : モジュール名</li>
|
||||
<li>_modulecustomid_: モジュールカスタムID</li>
|
||||
<li>_modulegroup_ : モジュールグループ名</li>
|
||||
<li>_moduledescription_ : アラートが発生したモジュールの説明</li>
|
||||
<li>_modulestatus_ : モジュールの状態</li>
|
||||
<li>_moduledata_X_: モジュール X の最新データ (モジュール名にスペースを含めることはできません)</li>
|
||||
<li>_alert_name_ : アラート名</li>
|
||||
<li>_alert_priority_ : アラート優先順位(数値)</li>
|
||||
<li>_alert_text_severity_ : テキストでのアラートの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_event_id_ : (イベントアラートのみ) アラート発生元のイベントID</li>
|
||||
<li>_event_description_: (イベントアラートのみ) Pandora FMS イベントの説明 です。</li>
|
||||
<li>_event_extra_id_: (Only event alerts) Extra id.</li>
|
||||
<li>_event_cfX_ : (Only event alerts) Key of the event custom field that fired the alert.</li>
|
||||
<li>_id_agent_ : エージェントのID / Webコンソールへのリンクを生成するのに便利です</li>
|
||||
<li>_id_group_ : エージェントグループのID</li>
|
||||
<li>_id_module_ : モジュール ID</li>
|
||||
<li>_id_alert_ : アラートの(ユニークな)ID / 他のソフトウエアパッケージとの連携に利用できます</li>
|
||||
<li>_policy_ : モジュールが属するポリシー名 (存在する場合)</li>
|
||||
<li>_interval_ : モジュールの実行間隔</li>
|
||||
<li>_target_ip_ : モジュールの対象IPアドレス</li>
|
||||
<li>_target_port_ : モジュールの対象ポート</li>
|
||||
<li>_plugin_parameters_ : モジュールのプラグインパラメータ</li>
|
||||
<li>_server_ip_ : Ip of server assigned to agent. </li>
|
||||
<li>_server_name_ : Name of server assigned to agent. </li>
|
||||
<li>_groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。</li>
|
||||
<li>_groupcustomid_: グループカスタムID</li>
|
||||
<li>_groupother_ : グループに関するその他情報。グループの作成時に設定されます。</li>
|
||||
<li>_name_tag_ : モジュールに関連付けられたタグの名前。</li>
|
||||
<li>_email_tag_ : モジュールタグに関連付けられた Email。</li>
|
||||
<li>_phone_tag_ : モジュールタグに関連付けられた電話番号。</li>
|
||||
<li>_moduletags_ : モジュールタグに関連付けられた URL。</li>
|
||||
<li>_alert_critical_instructions_: モジュールの障害状態時手順。</li>
|
||||
<li>_alert_warning_instructions_: モジュールの警告状態時手順。</li>
|
||||
<li>_alert_unknown_instructions_: モジュールの不明状態時手順。</li>
|
||||
<li>_modulegraph_<i>n</i>h_: (>=6.0) (<i>eMail</i>コマンドを使うアラートのみ)
|
||||
n で示す期間の base64 でエンコードされたモジュールグラフを返します。(例: _modulegraph_24h_) サーバとコンソールの API の設定が正しくできている必要があります。この設定は、サーバの設定ファイルで行います。 </li>
|
||||
<li>_modulegraphth_<i>n</i>h_: 上記のマクロと同じですが、モジュールに定義さっれた障害および警告閾値を含みます。</li>
|
||||
</ul>
|
||||
|
||||
<li>_address_ : アラートが発生したエージェントのアドレス</li>
|
||||
<li>_address_n_ : "n" で示される位置に対応するエージェントのアドレス。例: address_1_ , address_2_</li>
|
||||
<li>_agent_: Alias of the agent that triggered the alert. If there is no alias assigned, the name of the agent will be used instead.</li>
|
||||
<li>_agentalias_: Alias of the agent that triggered the alert.</li>
|
||||
<li>_agentcustomfield_<i>n</i>_ : エージェントカスタムフィールド番号<i>n</i> (例: _agentcustomfield_9_). </li>
|
||||
<li>_agentcustomid_: エージェントカスタムID</li>
|
||||
<li>_agentdescription_ : 発生したアラートの説明</li>
|
||||
<li>_agentgroup_ : エージェントグループ名</li>
|
||||
<li>_agentname_: アラートが発生したエージェント.</li>
|
||||
<li>_agentos_: Agent's operative system</li>
|
||||
<li>_agentstatus_ : エージェントの現在の状態</li>
|
||||
<li>_alert_critical_instructions_: モジュールの障害状態時における手順</li>
|
||||
<li>_alert_description_ : アラートの説明</li>
|
||||
<li>_alert_name_ : アラート名</li>
|
||||
<li>_alert_priority_ : アラート優先順位(数値)</li>
|
||||
<li>_alert_text_severity_ : テキストでのアラートの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_alert_threshold_ : アラートのしきい値</li>
|
||||
<li>_alert_times_fired_ : アラートが発生した回数</li>
|
||||
<li>_alert_unknown_instructions_: モジュールが不明状態の場合の手順</li>
|
||||
<li>_alert_warning_instructions_: モジュールが警告状態の場合の手順</li>
|
||||
<li>_all_address_ : アラートを発報した全エージェントのアドレス</li>
|
||||
<li>_data_ : アラート発生時のモジュールのデータ(値)</li>
|
||||
<li>_email_tag_ : モジュールタグに関連付けられた Email。</li>
|
||||
<li>_event_cfX_ : (イベントアラートのみ) アラートを発報したイベントのカスタムフィールドのキー。 For example, if there is a custom field whose key is IPAM, its value can be obtained using the _event_cfIPAM_ macro.</li>
|
||||
<li>_event_description_ : (イベントアラートのみ) Pandora FMS イベントの説明 です</li>
|
||||
<li>_event_extra_id_: (Only event alerts) Extra id.</li>
|
||||
<li>_event_id_ : (イベントアラートのみ) アラート発生元のイベントID</li>
|
||||
<li>_event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_field1_ : ユーザ定義フィールド1</li>
|
||||
<li>_field2_ : ユーザ定義フィールド2</li>
|
||||
<li>_field3_ : ユーザ定義フィールド3</li>
|
||||
<li>_field4_ : ユーザ定義フィールド4</li>
|
||||
<li>_field5_ : ユーザ定義フィールド5</li>
|
||||
<li>_field6_ : ユーザ定義フィールド6</li>
|
||||
<li>_field7_ : ユーザ定義フィールド7</li>
|
||||
<li>_field8_ : ユーザ定義フィールド8</li>
|
||||
<li>_field9_ : ユーザ定義フィールド9</li>
|
||||
<li>_field10_ : ユーザ定義フィールド10</li>
|
||||
<li>_field11_ : ユーザ定義フィールド11</li>
|
||||
<li>_field12_ : ユーザ定義フィールド12</li>
|
||||
<li>_field13_ : ユーザ定義フィールド13</li>
|
||||
<li>_field14_ : ユーザ定義フィールド14</li>
|
||||
<li>_field15_ : ユーザ定義フィールド15</li>
|
||||
<li>_groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。</li>
|
||||
<li>_groupcustomid_: グループカスタムID</li>
|
||||
<li>_groupother_ : グループに関するその他情報。グループの作成時に設定されます。</li>
|
||||
<li>_homeurl_ : 公開 URL へのリンク。URLは、基本設定メニューで設定されている必要があります。</li>
|
||||
<li>_id_agent_ : エージェントのID / Webコンソールへのリンクを生成するのに便利です</li>
|
||||
<li>_id_alert_ : アラートの(ユニークな)ID / 他のソフトウエアパッケージとの連携に利用できます</li>
|
||||
<li>_id_group_ : エージェントグループのID</li>
|
||||
<li>_id_module_ : モジュールID</li>
|
||||
<li>_interval_ : モジュールの実行間隔</li>
|
||||
<li>_module_ : モジュール名</li>
|
||||
<li>_modulecustomid_: モジュールカスタムID</li>
|
||||
<li>_moduledata_X_: モジュール X の最新データ (モジュール名にスペースを含めることはできません)</li>
|
||||
<li>_moduledescription_ : アラートが発生したモジュールの説明</li>
|
||||
<li>_modulegraph_nh_: (eMail コマンドを用いるアラートの場合のみ) n時間の期間のモジュールグラフのイメージを返します(例: _modulegraph_24h_)。 サーバとコンソールの API の接続を正しく設定する必要があります。これはサーバの設定で行います。</li>
|
||||
<li>_modulegraphth_<i>n</i>h_:上記のマクロと同じですが、モジュールに設定された障害および警告閾値を含みます。</li>
|
||||
<li>_modulegroup_ : モジュールグループ名</li>
|
||||
<li>_modulestatus_ : モジュールの状態</li>
|
||||
<li>_moduletags_ : モジュールに関連付けられたタグ</li>
|
||||
<li>_name_tag_ : モジュールに関連付けられたタグの名前。</li>
|
||||
<li>_phone_tag_ : モジュールタグに関連付けられた電話番号。</li>
|
||||
<li>_plugin_parameters_ : モジュールのプラグインパラメータ</li>
|
||||
<li>_policy_ : モジュールが属するポリシー名 (存在する場合)</li>
|
||||
<li>_prevdata_ : アラートを発報する前のモジュールデータ</li>
|
||||
<li>_server_ip_ : エージェントが割り当てられているサーバ IP。</li>
|
||||
<li>_server_name_ : エージェントが割り当てられているサーバ名。 </li>
|
||||
<li>_target_ip_ : モジュールの対象IPアドレス</li>
|
||||
<li>_target_port_ : モジュールの対象ポート</li>
|
||||
<li>_timestamp_ : アラートが発生した日時 (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_timezone_: _timestamp_ で使用されるタイムゾーン名.</li>
|
||||
<p>
|
||||
例: Agent _agent_ has fired alert _alert_ with data _data_
|
||||
</p>
|
||||
|
@ -226,12 +226,65 @@ $(document).ready (function () {
|
||||
|
||||
|
||||
$(document).on("scroll", function(){
|
||||
if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){
|
||||
$('#menu').css('top','20px');
|
||||
}
|
||||
else{
|
||||
$('#menu').css('top','80px');
|
||||
|
||||
if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){
|
||||
if($('#head').css('position') =='fixed'){
|
||||
if($('#menu').css('position') =='fixed'){
|
||||
$('#menu').css('top','80px');
|
||||
}
|
||||
else{
|
||||
$('#menu').css('top','60px');
|
||||
}
|
||||
}
|
||||
else{
|
||||
if($('#menu').css('position') =='fixed'){
|
||||
$('#menu').css('top','20px');
|
||||
}
|
||||
else{
|
||||
$('#menu').css('top','80px');
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if($('#head').css('position') =='fixed'){
|
||||
if($('#menu').css('position') =='fixed'){
|
||||
$('#menu').css('top','80px');
|
||||
}
|
||||
else{
|
||||
$('#menu').css('top','60px');
|
||||
}
|
||||
}
|
||||
else{
|
||||
if($('#menu').css('position') =='fixed'){
|
||||
$('#menu').css('top','80px');
|
||||
}
|
||||
else{
|
||||
$('#menu').css('top','80px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){
|
||||
// if($('#head').css('position') =='fixed'){
|
||||
// $('#menu').css('top','80px');
|
||||
// }
|
||||
// else{
|
||||
// $('#menu').css('top','20px');
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// if($('#head').css('position') =='fixed'){
|
||||
// if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){
|
||||
// $('#menu').css('top','60px');
|
||||
// }else{
|
||||
// $('#menu').css('top','80px');
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// else{
|
||||
// $('#menu').css('top','60px');
|
||||
// }
|
||||
// }
|
||||
});
|
||||
|
||||
$("#alert_messages").draggable();
|
||||
|
@ -203,8 +203,9 @@ function hideOIDData() {
|
||||
|
||||
// Empty previous OID data
|
||||
$("#snmp_data").empty();
|
||||
|
||||
|
||||
$("#snmp_data").css('display', 'none');
|
||||
$(".forced_title_layer").css('display', 'none');
|
||||
}
|
||||
|
||||
// Search the SNMP tree for a matching string
|
||||
|
@ -20,6 +20,7 @@ var TreeController = {
|
||||
recipient: '',
|
||||
tree: [],
|
||||
emptyMessage: "No data found.",
|
||||
foundMessage: "Found groups",
|
||||
errorMessage: "Error",
|
||||
baseURL: "",
|
||||
ajaxURL: "ajax.php",
|
||||
@ -401,33 +402,34 @@ var TreeController = {
|
||||
else{
|
||||
|
||||
var $graphImage = $('<img src="'+(controller.baseURL.length > 0 ? controller.baseURL : '')
|
||||
+'images/chart_curve.png" /> ');
|
||||
+'images/chart_curve.png" /> ');
|
||||
}
|
||||
|
||||
|
||||
$graphImage
|
||||
.addClass('module-graph')
|
||||
.click(function (e) {
|
||||
e.preventDefault();
|
||||
if(element.statusImageHTML.indexOf('data:image')!=-1){
|
||||
try {
|
||||
winopeng('operation/agentes/snapshot_view.php?id='+element.id+'&refr=&label='+element.name);
|
||||
if(element.statusImageHTML.indexOf('data:image')!=-1){
|
||||
try {
|
||||
winopeng_var(
|
||||
decodeURI(element.snapshot[0]),
|
||||
element.snapshot[1],
|
||||
element.snapshot[2],
|
||||
element.snapshot[3]
|
||||
);
|
||||
}
|
||||
catch (error) {
|
||||
// console.log(error);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
// console.log(error);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
try {
|
||||
|
||||
else{
|
||||
try {
|
||||
winopeng(element.moduleGraph.url, element.moduleGraph.handle);
|
||||
}
|
||||
catch (error) {
|
||||
// console.log(error);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
// console.log(error);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$content.append($graphImage);
|
||||
@ -683,6 +685,12 @@ var TreeController = {
|
||||
}
|
||||
|
||||
controller.recipient.empty();
|
||||
controller.recipient.html(
|
||||
"<div> " +
|
||||
controller.foundMessage + ": " + controller.tree.length +
|
||||
"</div>" +
|
||||
"<br/>"
|
||||
);
|
||||
|
||||
var $children = _processGroup(this.recipient, this.tree, true);
|
||||
$children.show();
|
||||
@ -712,6 +720,9 @@ var TreeController = {
|
||||
if (typeof data.emptyMessage !== 'undefined' && data.emptyMessage.length > 0) {
|
||||
this.emptyMessage = data.emptyMessage;
|
||||
}
|
||||
if (typeof data.foundMessage !== 'undefined' && data.foundMessage.length > 0) {
|
||||
this.foundMessage = data.foundMessage;
|
||||
}
|
||||
if (typeof data.errorMessage !== 'undefined' && data.errorMessage.length > 0) {
|
||||
this.errorMessage = data.errorMessage;
|
||||
}
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -4619,4 +4619,11 @@ form ul.form_flex li ul li{
|
||||
|
||||
.events_bar {
|
||||
margin:0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
#snmp_data {
|
||||
background: #f9faf9;
|
||||
}
|
||||
#snmp_data .databox {
|
||||
border: 0px;
|
||||
}
|
||||
|
@ -951,7 +951,7 @@ if ($config["pure"] == 0) {
|
||||
else {
|
||||
echo '<div id="container"><div id="head">';
|
||||
require ("general/header.php");
|
||||
echo '</div><div id="page"><div id="menu">';
|
||||
echo '</div><div id="page" style="margin-top:20px;"><div id="menu">';
|
||||
require ("general/main_menu.php");
|
||||
echo '</div>';
|
||||
}
|
||||
|
@ -70,8 +70,8 @@
|
||||
<body>
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.719';
|
||||
$build = '180226';
|
||||
$version = '7.0NG.720';
|
||||
$build = '180322';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -46,30 +46,37 @@ $offset_simple = (int) get_parameter_get ("offset_simple", 0);
|
||||
$id_group = (int) get_parameter ("ag_group", 0); //0 is the All group (selects all groups)
|
||||
$free_search = get_parameter("free_search", '');
|
||||
|
||||
$user_tag_array = array_values(array_keys(tags_get_user_tags($config['id_user'])));
|
||||
$user_tag = '';
|
||||
$user_tag_array = tags_get_user_tags($config['id_user'],'AR', true);
|
||||
|
||||
foreach ($user_tag_array as $key => $value) {
|
||||
if ($value === end($user_tag_array)) {
|
||||
$user_tag .= $value;
|
||||
}
|
||||
else{
|
||||
$user_tag .= $value.',';
|
||||
}
|
||||
}
|
||||
if ($user_tag_array) {
|
||||
$user_tag_array = array_values(array_keys($user_tag_array));
|
||||
|
||||
$user_tag = '';
|
||||
|
||||
$tag_filter = get_parameter("tag_filter", $user_tag);
|
||||
|
||||
$tag_param_validate = explode(',',$tag_filter);
|
||||
|
||||
foreach ($tag_param_validate as $key => $value) {
|
||||
if (!in_array($value,$user_tag_array)) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Alert view");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
foreach ($user_tag_array as $key => $value) {
|
||||
if ($value === end($user_tag_array)) {
|
||||
$user_tag .= $value;
|
||||
}
|
||||
else{
|
||||
$user_tag .= $value.',';
|
||||
}
|
||||
}
|
||||
|
||||
$tag_filter = get_parameter("tag_filter", $user_tag);
|
||||
|
||||
$tag_param_validate = explode(',',$tag_filter);
|
||||
|
||||
foreach ($tag_param_validate as $key => $value) {
|
||||
if (!in_array($value,$user_tag_array)) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Alert view");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$tag_filter = get_parameter("tag_filter", 0);
|
||||
}
|
||||
|
||||
if ($tag_filter) {
|
||||
|
@ -78,19 +78,22 @@ else {
|
||||
$data[1] = html_print_image('images/delete.png', true);
|
||||
}
|
||||
|
||||
$custom_value = db_get_value_filter('description',
|
||||
'tagent_custom_data', array(
|
||||
'id_field' => $field['id_field'],
|
||||
'id_agent' => $id_agente));
|
||||
|
||||
if ($custom_value === false || $custom_value == '') {
|
||||
$custom_value = '<i>-'.__('empty').'-</i>';
|
||||
$custom_value = db_get_all_rows_sql("select tagent_custom_data.description,tagent_custom_fields.is_password_type from tagent_custom_fields
|
||||
INNER JOIN tagent_custom_data ON tagent_custom_fields.id_field = tagent_custom_data.id_field where tagent_custom_fields.id_field = ".$field['id_field']." and tagent_custom_data.id_agent = ".$id_agente);
|
||||
|
||||
if ($custom_value[0]['description'] === false || $custom_value[0]['description'] == '') {
|
||||
$custom_value[0]['description'] = '<i>-'.__('empty').'-</i>';
|
||||
}
|
||||
else {
|
||||
$custom_value = ui_bbcode_to_html($custom_value);
|
||||
$custom_value[0]['description'] = ui_bbcode_to_html($custom_value[0]['description']);
|
||||
}
|
||||
|
||||
$data[2] = $custom_value;
|
||||
if($custom_value[0]['is_password_type']){
|
||||
$data[2] = '••••••••';
|
||||
}
|
||||
else{
|
||||
$data[2] = $custom_value[0]['description'];
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
@ -271,7 +271,13 @@ $interface_traffic_modules = array(
|
||||
$table->rowclass[] ='';
|
||||
|
||||
$data = array();
|
||||
$data[0] = __('Show full scale graph (TIP)') . ui_print_help_tip(__('This option may cause performance issues'), true);
|
||||
$data[0] = __('Show full scale graph (TIP)') .
|
||||
ui_print_help_tip(
|
||||
__('This option may cause performance issues'),
|
||||
true,
|
||||
'images/tip.png',
|
||||
true
|
||||
);
|
||||
$data[1] = html_print_checkbox ("fullscale", 1, (bool) $fullscale, true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] ='';
|
||||
|
@ -39,6 +39,16 @@ if (file_exists ('../../include/languages/'.$user_language.'.mo')) {
|
||||
|
||||
$id = get_parameter('id');
|
||||
$label = get_parameter ("label");
|
||||
$last_data = get_parameter("last_data", '');
|
||||
$last_timestamp = get_parameter("timestamp", '');
|
||||
// FIXME: Support to old call snapshow_view calls. Remove it when all are migrated
|
||||
if (empty($last_data)) {
|
||||
$row = db_get_row_sql("SELECT *
|
||||
FROM tagente_estado
|
||||
WHERE id_agente_modulo = $id");
|
||||
$last_data = io_safe_output($row["datos"]);
|
||||
$last_timestamp = $row["timestamp"];
|
||||
}
|
||||
|
||||
// TODO - Put ACL here
|
||||
?>
|
||||
@ -61,15 +71,14 @@ $label = get_parameter ("label");
|
||||
$row = db_get_row_sql("SELECT *
|
||||
FROM tagente_estado
|
||||
WHERE id_agente_modulo = $id");
|
||||
|
||||
|
||||
echo "<h2 style='text-align:center;' id='title_snapshot_view'>";
|
||||
echo __("Current data at");
|
||||
echo " ";
|
||||
echo $row["timestamp"];
|
||||
echo $last_timestamp;
|
||||
echo "</h2>";
|
||||
$datos = io_safe_output($row["datos"]);
|
||||
if (is_image_data($datos)) {
|
||||
echo '<center><img src="' . $datos . '" alt="image" style="width:100%"/></center>';
|
||||
if (is_image_data($last_data)) {
|
||||
echo '<center><img src="' . $last_data . '" alt="image" style="width:100%"/></center>';
|
||||
}
|
||||
else {
|
||||
$datos = preg_replace ('/</', '<', $datos);
|
||||
@ -77,7 +86,7 @@ $label = get_parameter ("label");
|
||||
$datos = preg_replace ('/\n/i','<br>',$datos);
|
||||
$datos = preg_replace ('/\s/i',' ',$datos);
|
||||
echo "<div id='result_div' style='width: 100%; height: 100%; overflow: scroll; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left'>";
|
||||
echo $datos;
|
||||
echo $last_data;
|
||||
echo "</div>";
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
@ -88,16 +97,16 @@ $label = get_parameter ("label");
|
||||
div.css('overflow-y', 'auto');
|
||||
var w2 = $('div', div).innerWidth();
|
||||
$(div).remove();
|
||||
|
||||
|
||||
return (w1 - w2);
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
width = $("#result_div").css("width");
|
||||
width = width.replace("px", "");
|
||||
width = parseInt(width);
|
||||
$("#result_div").css("width", (width - getScrollbarWidth()) + "px");
|
||||
|
||||
|
||||
height = $("#result_div").css("height");
|
||||
height = height.replace("px", "");
|
||||
height = parseInt(height);
|
||||
|
@ -290,7 +290,7 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
|
||||
$params = array();
|
||||
// TOP TEXT
|
||||
//Use the no_meta parameter because this image is only in the base console
|
||||
$params['top_text'] = "<div style='color: white; width: 100%; text-align: center; font-weight: bold; vertical-align: top;'>" . html_print_image('images/wrench_blanco.png', true, array('width' => '16px'), false, false, true) . ' ' . __('Pandora FMS Graph configuration menu') . ui_print_help_icon ("graphs",true, $config["homeurl"], "images/help_w.png") . "</div>";
|
||||
$params['top_text'] = "<div style='color: white; width: 100%; text-align: center; font-weight: bold; vertical-align: top;'>" . html_print_image('images/wrench_blanco.png', true, array('width' => '16px'), false, false, true) . ' ' . __('Pandora FMS Graph configuration menu') . ui_print_help_icon ("graphs",true, $config["homeurl"], "images/help_w.png", true) . "</div>";
|
||||
$params['body_text'] = "<div class='menu_sidebar_outer'>";
|
||||
$params['body_text'] .=__('Please, make your changes and apply with the <i>Reload</i> button');
|
||||
|
||||
|
@ -1361,19 +1361,13 @@ if (!empty($result)) {
|
||||
$is_snapshot = is_snapshot_data ( $module_value );
|
||||
|
||||
if (($config['command_snapshot']) && ($is_snapshot)) {
|
||||
$handle = 'snapshot_' . $row['id_agente_modulo'];
|
||||
$url = 'include/procesos.php?agente=' . $row['id_agente_modulo'];
|
||||
$win_handle = dechex(crc32($handle));
|
||||
if (! defined ('METACONSOLE')) {
|
||||
$link = "winopeng_var('operation/agentes/snapshot_view.php?" .
|
||||
"id=" . $row['id_agente_modulo'] .
|
||||
"&refr=" . $row['current_interval'] .
|
||||
"&label=" . rawurlencode(urlencode(io_safe_output($row['module_name']))) . "','" . $win_handle . "', 700,480)";
|
||||
}
|
||||
else{
|
||||
$link = "winopeng_var('$row[datos]','',700,480)";
|
||||
|
||||
}
|
||||
$link = ui_get_snapshot_link( array(
|
||||
'id_module' => $row['id_agente_modulo'],
|
||||
'last_data' => $row['datos'],
|
||||
'timestamp' => $row['timestamp'],
|
||||
'interval' => $row['current_interval'],
|
||||
'module_name' => $row['module_name']
|
||||
));
|
||||
|
||||
if(!is_image_data($row['datos'])){
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
|
@ -44,12 +44,16 @@ if (is_ajax ()) {
|
||||
$get_agentmodule_status_tooltip = (bool) get_parameter ("get_agentmodule_status_tooltip");
|
||||
$get_group_status_tooltip = (bool) get_parameter ("get_group_status_tooltip");
|
||||
$get_agent_id = (bool) get_parameter ("get_agent_id");
|
||||
$cluster_mode = (bool) get_parameter ("cluster_mode",0);
|
||||
$agent_alias = get_parameter('alias', '');
|
||||
$agents_inserted = get_parameter('agents_inserted', array());
|
||||
$id_group = (int) get_parameter('id_group');
|
||||
if ($get_agents_group_json) {
|
||||
$id_group = (int) get_parameter('id_group');
|
||||
$recursion = get_parameter ('recursion');
|
||||
$id_os = get_parameter('id_os', '');
|
||||
$agent_name = get_parameter('name', '');
|
||||
|
||||
$privilege = (string) get_parameter ('privilege', "AR");
|
||||
// Is is possible add keys prefix to avoid auto sorting in js object conversion
|
||||
$keys_prefix = (string) get_parameter ('keys_prefix', '');
|
||||
@ -75,6 +79,8 @@ if (is_ajax ()) {
|
||||
$filter['id_os'] = $id_os;
|
||||
if (!empty($agent_name))
|
||||
$filter['nombre'] = '%' . $agent_name . '%';
|
||||
if (!empty($agent_alias))
|
||||
$filter['alias'] = '%' . $agent_alias . '%';
|
||||
|
||||
switch ($status_agents) {
|
||||
case AGENT_STATUS_NORMAL:
|
||||
@ -98,6 +104,43 @@ if (is_ajax ()) {
|
||||
}
|
||||
$filter['order'] = "alias ASC";
|
||||
|
||||
if($cluster_mode){
|
||||
|
||||
$agent_id_os = db_get_all_rows_sql('select id_os from tconfig_os where id_os != 21');
|
||||
|
||||
foreach ($agent_id_os as $key => $value) {
|
||||
$agent_id_os_array[] = $agent_id_os[$key]['id_os'];
|
||||
}
|
||||
|
||||
$filter['id_os'] = $agent_id_os_array;
|
||||
|
||||
if($agents_inserted[0] != ''){
|
||||
|
||||
$agents_id_list = '';
|
||||
|
||||
foreach($agents_inserted as $elem) {
|
||||
|
||||
if ($elem === end($agents_inserted)) {
|
||||
$agents_id_list .= $elem;
|
||||
}
|
||||
else{
|
||||
$agents_id_list .= $elem.',';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$agent_id_agente = db_get_all_rows_sql('select id_agente from tagente where id_agente not in ('.$agents_id_list.')');
|
||||
|
||||
foreach ($agent_id_agente as $key => $value) {
|
||||
$agent_id_agente_array[] = $agent_id_agente[$key]['id_agente'];
|
||||
}
|
||||
|
||||
$filter['id_agente'] = $agent_id_agente_array;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Build fields
|
||||
$fields = array('id_agente', 'alias');
|
||||
|
||||
@ -297,9 +340,9 @@ if (is_ajax ()) {
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ($get_agent_modules_json_for_multiple_agents) {
|
||||
$idAgents = get_parameter('id_agent');
|
||||
$idAgents = (array) get_parameter('id_agent');
|
||||
$tags = get_parameter('tags', null);
|
||||
$module_types_excluded = get_parameter('module_types_excluded', array());
|
||||
$module_name = (string) get_parameter('name');
|
||||
@ -312,9 +355,9 @@ if (is_ajax ()) {
|
||||
$metaconsole_server_name = db_get_value('server_name',
|
||||
'tmetaconsole_setup', 'id', $id_server);
|
||||
}
|
||||
|
||||
|
||||
$filter = '1 = 1';
|
||||
|
||||
|
||||
$all = (string)get_parameter('all', 'all');
|
||||
switch ($all) {
|
||||
default:
|
||||
@ -325,10 +368,10 @@ if (is_ajax ()) {
|
||||
$filter .= ' AND t1.disabled = 0';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($module_types_excluded) && is_array($module_types_excluded))
|
||||
$filter .= ' AND t1.id_tipo_modulo NOT IN (' . implode($module_types_excluded) . ')';
|
||||
|
||||
|
||||
if (!empty($module_name)) {
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
@ -342,11 +385,11 @@ if (is_ajax ()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Status selector
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) { //Normal
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
OR (t1.id_tipo_modulo IN(21,22,23,100)) ';
|
||||
OR (t1.id_tipo_modulo IN(21,22,23,100)) ';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_CRITICAL_BAD) { //Critical
|
||||
$sql_conditions .= ' estado = 1 AND utimestamp > 0 )';
|
||||
@ -356,7 +399,7 @@ if (is_ajax ()) {
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_NORMAL) { //Not normal
|
||||
$sql_conditions .= ' estado <> 0)';
|
||||
}
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_UNKNOWN) { //Unknown
|
||||
$sql_conditions .= ' estado = 3 AND utimestamp <> 0 )';
|
||||
}
|
||||
@ -364,11 +407,11 @@ if (is_ajax ()) {
|
||||
$sql_conditions .= ' utimestamp = 0 )
|
||||
AND t1.id_tipo_modulo NOT IN (21,22,23,100)';
|
||||
}
|
||||
|
||||
|
||||
if ($status_modulo != -1) {
|
||||
$filter .= ' AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where ' . $sql_conditions;
|
||||
}
|
||||
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$result = array();
|
||||
$nameModules = array();
|
||||
@ -377,7 +420,7 @@ if (is_ajax ()) {
|
||||
$temp_element = array();
|
||||
$counter = 0;
|
||||
$first_elements = array();
|
||||
|
||||
|
||||
$array_mapped = array_map(function($item) use ($metaconsole_server_name) {
|
||||
if (empty($metaconsole_server_name)) {
|
||||
if (strstr($item, "|@_@|")) {
|
||||
@ -393,27 +436,27 @@ if (is_ajax ()) {
|
||||
$server_name = $metaconsole_server_name;
|
||||
$id_agent = $item;
|
||||
}
|
||||
|
||||
|
||||
return array(
|
||||
'server_name' => $server_name,
|
||||
'id_agent' => $id_agent
|
||||
);
|
||||
|
||||
|
||||
}, $idAgents);
|
||||
|
||||
|
||||
$array_reduced = array_reduce($array_mapped, function($carry, $item) {
|
||||
|
||||
|
||||
if (!isset($carry[$item['server_name']]))
|
||||
$carry[$item['server_name']] = array();
|
||||
|
||||
|
||||
$carry[$item['server_name']][] = $item['id_agent'];
|
||||
|
||||
|
||||
return $carry;
|
||||
|
||||
|
||||
}, array());
|
||||
|
||||
|
||||
$last_modules_set = array();
|
||||
|
||||
|
||||
foreach ($array_reduced as $server_name => $id_agents) {
|
||||
//Metaconsole db connection
|
||||
// $server_name can be the server id (ugly hack, I know)
|
||||
@ -423,11 +466,11 @@ if (is_ajax ()) {
|
||||
else {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
}
|
||||
|
||||
|
||||
if (metaconsole_load_external_db($connection) != NOERR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//Get agent's modules
|
||||
$sql = sprintf('SELECT t1.id_agente, t1.id_agente_modulo, t1.nombre
|
||||
FROM tagente_modulo t1
|
||||
@ -442,11 +485,11 @@ if (is_ajax ()) {
|
||||
AND t2.id_agente IN (%s)) = (%d)',
|
||||
$filter, implode(',', $id_agents),
|
||||
implode(',', $id_agents), count($id_agents));
|
||||
|
||||
|
||||
$modules = db_get_all_rows_sql($sql);
|
||||
if (empty($modules))
|
||||
$modules = array();
|
||||
|
||||
|
||||
$modules_aux = array();
|
||||
foreach ($modules as $key => $module) {
|
||||
// Don't change this order, is used in the serialization
|
||||
@ -460,51 +503,64 @@ if (is_ajax ()) {
|
||||
$modules_aux[$module['nombre']][] = $module_data;
|
||||
}
|
||||
$modules = $modules_aux;
|
||||
|
||||
|
||||
// Build the next array using the common values
|
||||
if (!empty($last_modules_set)) {
|
||||
$modules = array_intersect_key($modules, $last_modules_set);
|
||||
|
||||
|
||||
array_walk($modules, function(&$module_data, $module_name) use ($last_modules_set) {
|
||||
$module_data = array_merge($module_data, $last_modules_set[$module_name]);
|
||||
});
|
||||
}
|
||||
$last_modules_set = $modules;
|
||||
|
||||
|
||||
//Restore db connection
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
|
||||
$result = array();
|
||||
foreach ($last_modules_set as $module_name => $module_data) {
|
||||
$value = ui_print_truncate_text(io_safe_output($module_name), 'module_medium', false, true);
|
||||
|
||||
|
||||
$module_data_processed = array_map(function($item) {
|
||||
// data: -> id_module | id_agent | server_name;
|
||||
return implode('|', $item);
|
||||
}, $module_data);
|
||||
$key = implode(';', $module_data_processed);
|
||||
|
||||
|
||||
$result[$key] = $value;
|
||||
}
|
||||
asort($result);
|
||||
}
|
||||
else {
|
||||
if(implode(',', $idAgents) < 0) {
|
||||
$sql = 'SELECT DISTINCT nombre, id_agente_modulo FROM tagente_modulo
|
||||
WHERE nombre IN (
|
||||
SELECT nombre
|
||||
FROM tagente_modulo
|
||||
GROUP BY nombre
|
||||
HAVING count(nombre) = (SELECT count(nombre) FROM tagente_modulo))';
|
||||
}
|
||||
else {
|
||||
$sql = 'SELECT DISTINCT nombre, id_agente_modulo
|
||||
FROM tagente_modulo t1
|
||||
WHERE ' . $filter . '
|
||||
AND t1.delete_pending = 0
|
||||
AND t1.id_agente IN (' . implode(',', $idAgents) . ')';
|
||||
|
||||
if($idAgents[0] < 0){
|
||||
if($selection_mode == 'common'){
|
||||
$sql_agent_total = 'SELECT count(*) FROM tagente WHERE disabled=0';
|
||||
$agent_total = db_get_value_sql($sql_agent_total);
|
||||
$sql = "SELECT tam.nombre, tam.id_agente_modulo
|
||||
FROM tagente_modulo tam
|
||||
JOIN (
|
||||
SELECT COUNT(*) AS num_names, nombre
|
||||
FROM tagente_modulo
|
||||
WHERE disabled=0
|
||||
AND delete_pending=0
|
||||
GROUP BY nombre
|
||||
) AS tj
|
||||
ON tj.num_names = $agent_total
|
||||
AND tj.nombre = tam.nombre ";
|
||||
}
|
||||
else{
|
||||
$sql = 'SELECT nombre, id_agente_modulo
|
||||
FROM tagente_modulo';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$sql = 'SELECT DISTINCT nombre, id_agente_modulo
|
||||
FROM tagente_modulo t1
|
||||
WHERE ' . $filter . '
|
||||
AND t1.delete_pending = 0
|
||||
AND t1.id_agente IN (' . implode(',', $idAgents) . ')';
|
||||
|
||||
if ($selection_mode == 'common') {
|
||||
$sql .= ' AND (
|
||||
SELECT count(nombre)
|
||||
@ -517,10 +573,9 @@ if (is_ajax ()) {
|
||||
$sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)';
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY nombre';
|
||||
|
||||
$nameModules = db_get_all_rows_sql($sql);
|
||||
|
||||
if ($tags != null) {
|
||||
if ((count($tags) >= 1) && ($tags[0] != "") && ($tags[0] != -1)) {
|
||||
$implode_tags = implode(",", $tags);
|
||||
@ -545,11 +600,11 @@ if (is_ajax ()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($nameModules == false) {
|
||||
$nameModules = array();
|
||||
}
|
||||
|
||||
|
||||
$result = array();
|
||||
foreach ($nameModules as $nameModule) {
|
||||
if (empty($serialized))
|
||||
@ -560,11 +615,11 @@ if (is_ajax ()) {
|
||||
$result[io_safe_output($nameModule['nombre']).'$*$'.implode('|', $idAgents)] = ui_print_truncate_text(io_safe_output($nameModule['nombre']), 'module_medium', false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ($get_agent_modules_json) {
|
||||
$id_agent = (int) get_parameter ('id_agent');
|
||||
|
||||
|
@ -275,7 +275,7 @@ if ($id_agent != 0) {
|
||||
}
|
||||
|
||||
$text_module = (string) get_parameter('module_search', '');
|
||||
$id_agent_module = get_parameter('module_search_hidden', 0);
|
||||
$id_agent_module = get_parameter('module_search_hidden', get_parameter('id_agent_module',0));
|
||||
if ($id_agent_module != 0) {
|
||||
$text_module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
||||
if ($text_module == false) {
|
||||
|
@ -283,6 +283,7 @@ enterprise_hook('close_meta_frame');
|
||||
detailRecipient: $.fixedBottomBox({ width: 400, height: window.innerHeight * 0.9 }),
|
||||
page: parameters['page'],
|
||||
emptyMessage: "<?php echo __('No data found'); ?>",
|
||||
foundMessage: "<?php echo __('Found groups'); ?>",
|
||||
tree: data.tree,
|
||||
baseURL: "<?php echo ui_get_full_url(false, false, false, is_metaconsole()); ?>",
|
||||
ajaxURL: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user