Merge remote-tracking branch 'origin/develop' into ent-4610-Alertas-de-logs

Conflicts:
	pandora_console/extras/mr/33.sql
	pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
	pandora_console/godmode/agentes/configurar_agente.php
	pandora_console/godmode/wizards/Wizard.main.php
	pandora_console/include/functions_agents.php
	pandora_console/include/styles/alert.css
	pandora_console/pandoradb.sql
	pandora_server/lib/PandoraFMS/Recon/Base.pm
This commit is contained in:
fbsanchez 2019-11-22 15:49:07 +01:00
commit 5423e78d62
72 changed files with 760 additions and 308 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.740-191118
Version: 7.0NG.741
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.740-191118"
pandora_version="7.0NG.741"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -54,8 +54,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.740';
use constant AGENT_BUILD => '191118';
use constant AGENT_VERSION => '7.0NG.741';
use constant AGENT_BUILD => '191122';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.740(Build 191118)")
#define PANDORA_VERSION ("7.0NG.741(Build 191122)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.740(Build 191118))"
VALUE "ProductVersion", "(7.0NG.741(Build 191122))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.740-191118
Version: 7.0NG.741
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.740-191118"
pandora_version="7.0NG.741"
package_pear=0
package_pandora=1

View File

@ -30,6 +30,15 @@
global $config;
check_login();
// ACL Check
if (!check_acl($config['id_user'], 0, 'AR')) {
db_pandora_audit(
'ACL Violation',
'Trying to access Module Groups view'
);
include 'general/noaccess.php';
exit;
}
if (is_ajax()) {
$get_info_alert_module_group = (bool) get_parameter('get_info_alert_module_group');
@ -82,6 +91,16 @@ function mainModuleGroups()
$agent_group_search = get_parameter('agent_group_search', '');
$module_group_search = get_parameter('module_group_search', '');
// Check the user's group permissions.
$user_groups = users_get_groups($config['user'], 'AR');
$info = array_filter(
$info,
function ($v, $k) use ($user_groups) {
return $user_groups[$v['id']] != null;
},
ARRAY_FILTER_USE_BOTH
);
$info = array_filter(
$info,
function ($v, $k) use ($agent_group_search) {
@ -265,7 +284,7 @@ function mainModuleGroups()
text-align: center;
';
if (true) {
if ($info && $array_module_group) {
$table = new StdClass();
$table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;';
$table->width = '100%';
@ -296,22 +315,22 @@ function mainModuleGroups()
$url = 'index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group='.$key.'&modulegroup='.$k;
if ($array_data[$key][$k]['alerts_module_count'] != 0) {
$color = '#FFA631';
$color = COL_ALERTFIRED;
// Orange when the cell for this model group and agent has at least one alert fired.
} else if ($array_data[$key][$k]['critical_module_count'] != 0) {
$color = '#e63c52';
$color = COL_CRITICAL;
// Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
} else if ($array_data[$key][$k]['warning_module_count'] != 0) {
$color = '#f3b200';
$color = COL_WARNING;
// Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
} else if ($array_data[$key][$k]['unknown_module_count'] != 0) {
$color = '#B2B2B2 ';
$color = COL_UNKNOWN;
// Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
} else if ($array_data[$key][$k]['normal_module_count'] != 0) {
$color = '#82b92e';
$color = COL_NORMAL;
// Green when the cell for this model group and agent has OK state all modules.
} else if ($array_data[$key][$k]['notInit_module_count'] != 0) {
$color = '#5BB6E5';
$color = COL_NOTINIT;
// Blue when the cell for this module group and all modules have not init value.
}
@ -359,7 +378,7 @@ function mainModuleGroups()
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_WARNING.";'></div></td><td>".__('Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_UNKNOWN.";'></div></td><td>".__('Grey cell when the module group and agent have at least one in unknown status and the others in green status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NORMAL.";'></div></td><td>".__('Green cell when the module group and agent have all modules in OK status').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_MAINTENANCE.";'></div></td><td>".__('Blue cell when the module group and agent have all modules in not init status.').'</td></tr>';
echo "<tr><td class='legend_square_simple'><div style='background-color: ".COL_NOTINIT.";'></div></td><td>".__('Blue cell when the module group and agent have all modules in not init status.').'</td></tr>';
echo '</table>';
echo '</div>';
} else {

View File

@ -8,6 +8,14 @@ INSERT INTO `ttipo_modulo` VALUES
(36,'remote_cmd_string', 10, 'Remote execution, alphanumeric data', 'mod_remote_cmd_string.png'),
(37,'remote_cmd_inc', 10, 'Remote execution, incremental data', 'mod_remote_cmd_inc.png');
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('N.&#x20;total&#x20;processes','Number&#x20;of&#x20;running&#x20;processes&#x20;in&#x20;a&#x20;Windows&#x20;system.',11,34,0,0,300,0,'tasklist&#x20;/NH&#x20;|&#x20;find&#x20;/c&#x20;/v&#x20;&quot;&quot;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Free&#x20;space&#x20;in&#x20;C:','Free&#x20;space&#x20;available&#x20;in&#x20;C:',11,34,0,0,300,0,'powershell&#x20;$obj=&#40;Get-WmiObject&#x20;-class&#x20;&quot;Win32_LogicalDisk&quot;&#x20;-namespace&#x20;&quot;root&#92;CIMV2&quot;&#41;&#x20;;&#x20;$obj.FreeSpace[0]&#x20;*&#x20;100&#x20;/$obj.Size[0]','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;uptime','System&#x20;uptime',43,36,0,0,300,0,'uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;processes','Running&#x20;processes',43,34,0,0,300,0,'ps&#x20;elf&#x20;|&#x20;wc&#x20;-l','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;system&#x20;load','Current&#x20;load&#x20;&#40;5&#x20;min&#41;',43,34,0,0,300,0,'uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;available&#x20;memory&#x20;percent','Available&#x20;memory&#x20;%',43,34,0,0,300,0,'free&#x20;|&#x20;grep&#x20;Mem&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$NF/$2&#x20;*&#x20;100}&#039;','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;available&#x20;disk&#x20;/','Available&#x20;free&#x20;space&#x20;in&#x20;mountpoint&#x20;/',43,34,0,0,300,0,'df&#x20;/&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;%&#039;','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default '';
ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL;
ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL;

View File

@ -60,6 +60,10 @@ ALTER TABLE `tlocal_component` ADD COLUMN `dynamic_next` bigint(20) NOT NULL def
ALTER TABLE `tlocal_component` ADD COLUMN `dynamic_two_tailed` tinyint(1) unsigned default '0';
ALTER TABLE `tlocal_component` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
ALTER TABLE `tlocal_component` MODIFY COLUMN `ff_type` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `dynamic_next` bigint(20) NOT NULL DEFAULT '0',
MODIFY COLUMN `dynamic_two_tailed` tinyint(1) unsigned NULL DEFAULT '0';
-- -----------------------------------------------------
-- Table `tpolicy_modules`
-- -----------------------------------------------------
@ -138,6 +142,10 @@ CREATE TABLE IF NOT EXISTS `tpolicy_modules` (
ALTER TABLE `tpolicy_modules` ADD COLUMN `dynamic_next` bigint(20) NOT NULL default '0';
ALTER TABLE `tpolicy_modules` ADD COLUMN `dynamic_two_tailed` tinyint(1) unsigned default '0';
ALTER TABLE `tpolicy_modules` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
ALTER TABLE `tpolicy_modules` MODIFY COLUMN `ip_target` varchar(100) NULL DEFAULT '',
MODIFY COLUMN `ff_type` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `dynamic_next` bigint(20) NOT NULL DEFAULT '0',
MODIFY COLUMN `dynamic_two_tailed` tinyint(1) unsigned NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tpolicies`
@ -187,6 +195,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` (
ALTER TABLE `tpolicy_agents` ADD COLUMN `id_node` int(10) NOT NULL DEFAULT '0';
ALTER TABLE `tpolicy_agents` ADD UNIQUE(`id_policy`, `id_agent`, `id_node`);
ALTER TABLE `tpolicy_agents` DROP INDEX `id_policy`, ADD UNIQUE INDEX `id_policy` (`id_policy`, `id_agent`, `id_node`), DROP INDEX `id_policy_2`;
-- -----------------------------------------------------
-- Table `tpolicy_groups`
@ -377,6 +386,12 @@ ALTER TABLE tmetaconsole_setup ADD COLUMN `meta_dbhost` text;
ALTER TABLE tmetaconsole_setup ADD COLUMN `meta_dbport` text;
ALTER TABLE tmetaconsole_setup ADD COLUMN `meta_dbname` text;
ALTER TABLE `tmetaconsole_setup` MODIFY COLUMN `meta_dbuser` text NULL,
MODIFY COLUMN `meta_dbpass` text NULL,
MODIFY COLUMN `meta_dbhost` text NULL,
MODIFY COLUMN `meta_dbport` text NULL,
MODIFY COLUMN `meta_dbname` text NULL;
-- ---------------------------------------------------------------------
-- Table `tprofile_view`
-- ---------------------------------------------------------------------
@ -786,23 +801,6 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` (
PRIMARY KEY(`id_rc`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tnews`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnews` (
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`author` varchar(255) NOT NULL DEFAULT '',
`subject` varchar(255) NOT NULL DEFAULT '',
`text` TEXT NOT NULL,
`timestamp` DATETIME NOT NULL DEFAULT 0,
`id_group` int(10) NOT NULL default 0,
`modal` tinyint(1) DEFAULT 0,
`expire` tinyint(1) DEFAULT 0,
`expire_timestamp` DATETIME NOT NULL DEFAULT 0,
PRIMARY KEY(`id_news`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE treport_content_template ADD COLUMN `historical_db` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE treport_content_template ADD COLUMN `lapse_calc` tinyint(1) default '0';
ALTER TABLE treport_content_template ADD COLUMN `lapse` int(11) default '300';
@ -824,6 +822,26 @@ ALTER TABLE `treport_content_template` ADD COLUMN `current_month` TINYINT(1) DEF
ALTER TABLE `treport_content_template` ADD COLUMN `failover_mode` tinyint(1) DEFAULT '1';
ALTER TABLE `treport_content_template` ADD COLUMN `failover_type` tinyint(1) DEFAULT '1';
ALTER TABLE `treport_content_template` ADD COLUMN `uncompressed_module` TINYINT DEFAULT '0';
ALTER TABLE `treport_content_template` MODIFY COLUMN `historical_db` tinyint(1) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `lapse_calc` tinyint(1) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `lapse` int(11) unsigned NOT NULL DEFAULT '300',
MODIFY COLUMN `visual_format` tinyint(1) unsigned NOT NULL DEFAULT '0';
-- ----------------------------------------------------------------------
-- Table `tnews`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnews` (
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`author` varchar(255) NOT NULL DEFAULT '',
`subject` varchar(255) NOT NULL DEFAULT '',
`text` TEXT NOT NULL,
`timestamp` DATETIME NOT NULL DEFAULT 0,
`id_group` int(10) NOT NULL default 0,
`modal` tinyint(1) DEFAULT 0,
`expire` tinyint(1) DEFAULT 0,
`expire_timestamp` DATETIME NOT NULL DEFAULT 0,
PRIMARY KEY(`id_news`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- -----------------------------------------------------
-- Table `treport_content_sla_com_temp` (treport_content_sla_combined_template)
@ -1070,6 +1088,14 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` (
FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `tmetaconsole_agent` ADD COLUMN `remote` tinyint(1) NOT NULL DEFAULT '0',
ADD COLUMN `cascade_protection_module` int(10) unsigned NULL DEFAULT '0',
ADD COLUMN `transactional_agent` tinyint(1) NOT NULL DEFAULT '0',
ADD COLUMN `alias` varchar(600) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
MODIFY COLUMN `update_secondary_groups` tinyint(1) NOT NULL DEFAULT '0',
MODIFY COLUMN `alias_as_name` tinyint(2) NOT NULL DEFAULT '0',
ADD INDEX `id_tagente_idx` (`id_tagente`);
-- ---------------------------------------------------------------------
-- Table `ttransaction`
-- ---------------------------------------------------------------------
@ -1125,6 +1151,8 @@ CREATE TABLE IF NOT EXISTS `titem` (
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `titem` MODIFY COLUMN `source_data` varchar(250) NULL DEFAULT '';
-- ---------------------------------------------------------------------
-- Table `tmap`
-- ---------------------------------------------------------------------
@ -1151,7 +1179,6 @@ CREATE TABLE IF NOT EXISTS `tmap` (
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `trel_item`
-- ---------------------------------------------------------------------
@ -1169,6 +1196,10 @@ CREATE TABLE IF NOT EXISTS `trel_item` (
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `trel_item` MODIFY COLUMN `id_map` int(10) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `id_parent_source_data` int(10) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `id_child_source_data` int(10) unsigned NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `talert_templates`
-- ---------------------------------------------------------------------
@ -1192,6 +1223,11 @@ ALTER TABLE talert_snmp ADD COLUMN `al_field12` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_snmp ADD COLUMN `al_field13` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_snmp ADD COLUMN `al_field14` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_snmp ADD COLUMN `al_field15` TEXT NOT NULL DEFAULT "";
ALTER TABLE `talert_snmp` MODIFY COLUMN `al_field11` text NOT NULL,
MODIFY COLUMN `al_field12` text NOT NULL,
MODIFY COLUMN `al_field13` text NOT NULL,
MODIFY COLUMN `al_field14` text NOT NULL,
MODIFY COLUMN `al_field15` text NOT NULL;
-- ---------------------------------------------------------------------
-- Table `talert_snmp_action`
@ -1206,6 +1242,7 @@ ALTER TABLE talert_snmp_action ADD COLUMN `al_field15` TEXT NOT NULL DEFAULT "";
-- Table `tserver`
-- ----------------------------------------------------------------------
ALTER TABLE tserver ADD COLUMN `server_keepalive` int(11) DEFAULT 0;
ALTER TABLE `tserver` MODIFY COLUMN `server_keepalive` int(11) NOT NULL DEFAULT '0';
-- ----------------------------------------------------------------------
-- Table `tagente_estado`
@ -1217,6 +1254,11 @@ ALTER TABLE tagente_estado ADD COLUMN last_unknown_update bigint(20) NOT NULL de
ALTER TABLE `tagente_estado` ADD COLUMN `ff_normal` int(4) unsigned default '0';
ALTER TABLE `tagente_estado` ADD COLUMN `ff_warning` int(4) unsigned default '0';
ALTER TABLE `tagente_estado` ADD COLUMN `ff_critical` int(4) unsigned default '0';
ALTER TABLE `tagente_estado` MODIFY COLUMN `datos` mediumtext NOT NULL,
MODIFY COLUMN `known_status` tinyint(4) NULL DEFAULT '0',
MODIFY COLUMN `last_known_status` tinyint(4) NULL DEFAULT '0',
MODIFY COLUMN `last_dynamic_update` bigint(20) NOT NULL DEFAULT '0',
MODIFY COLUMN `last_unknown_update` bigint(20) NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `talert_actions`
@ -1240,6 +1282,11 @@ ALTER TABLE talert_actions ADD COLUMN `field12_recovery` TEXT NOT NULL DEFAULT "
ALTER TABLE talert_actions ADD COLUMN `field13_recovery` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_actions ADD COLUMN `field14_recovery` TEXT NOT NULL DEFAULT "";
ALTER TABLE talert_actions ADD COLUMN `field15_recovery` TEXT NOT NULL DEFAULT "";
ALTER TABLE `talert_actions` MODIFY COLUMN `field11` text NOT NULL,
MODIFY COLUMN `field12` text NOT NULL,
MODIFY COLUMN `field13` text NOT NULL,
MODIFY COLUMN `field14` text NOT NULL,
MODIFY COLUMN `field15` text NOT NULL;
-- ---------------------------------------------------------------------
-- Table `talert_commands`
@ -1253,15 +1300,12 @@ UPDATE `talert_actions` SET `field4` = 'text/html', `field4_recovery` = 'text/ht
DELETE FROM `talert_commands` WHERE `id` = 11;
ALTER TABLE `talert_commands` MODIFY COLUMN `id_group` mediumint(8) unsigned NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tmap`
-- ---------------------------------------------------------------------
ALTER TABLE tmap MODIFY `id_user` varchar(128);
-- ---------------------------------------------------------------------
-- Table `titem`
-- ---------------------------------------------------------------------
ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
ALTER TABLE `tmap` MODIFY COLUMN `id_user` varchar(250) NOT NULL DEFAULT '';
-- ---------------------------------------------------------------------
-- Table `tconfig`
@ -1336,6 +1380,8 @@ ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL;
ALTER TABLE tevent_filter ADD COLUMN `user_comment` text NOT NULL;
ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL;
ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL;
ALTER TABLE `tevent_filter` MODIFY COLUMN `user_comment` text NOT NULL;
-- ---------------------------------------------------------------------
-- Table `tusuario`
-- ---------------------------------------------------------------------
@ -1350,7 +1396,11 @@ ALTER TABLE `tusuario` ADD COLUMN `default_custom_view` int(10) unsigned NULL de
ALTER TABLE `tusuario` ADD COLUMN `ehorus_user_level_user` VARCHAR(60);
ALTER TABLE `tusuario` ADD COLUMN `ehorus_user_level_pass` VARCHAR(45);
ALTER TABLE `tusuario` ADD COLUMN `ehorus_user_level_enabled` TINYINT(1);
ALTER TABLE `tusuario` MODIFY COLUMN `default_event_filter` int(10) unsigned NOT NULL DEFAULT '0',
ADD INDEX `fk_filter_id` (`id_filter`),
ADD CONSTRAINT `fk_filter_id` FOREIGN KEY `fk_filter_id` (`id_filter`) REFERENCES `tevent_filter` (`id_filter`) ON DELETE SET NULL ON UPDATE RESTRICT,
DROP FOREIGN KEY `fk_id_filter`,
DROP INDEX `fk_id_filter`;
-- ---------------------------------------------------------------------
@ -1361,14 +1411,23 @@ ALTER TABLE tagente_modulo ADD COLUMN `dynamic_two_tailed` tinyint(1) unsigned d
ALTER TABLE tagente_modulo ADD COLUMN `parent_module_id` int(10) unsigned NOT NULL default 0;
ALTER TABLE `tagente_modulo` ADD COLUMN `cps` int NOT NULL default 0;
ALTER TABLE `tagente_modulo` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
ALTER TABLE `tagente_modulo` ADD COLUMN `ff_normal` int(4) unsigned default '0';
ALTER TABLE `tagente_modulo` ADD COLUMN `ff_warning` int(4) unsigned default '0';
ALTER TABLE `tagente_modulo` ADD COLUMN `ff_critical` int(4) unsigned default '0';
ALTER TABLE `tagente_modulo` DROP COLUMN `ff_normal`,
DROP COLUMN `ff_warning`,
DROP COLUMN `ff_critical`,
MODIFY COLUMN `ff_type` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `dynamic_next` bigint(20) NOT NULL DEFAULT '0',
MODIFY COLUMN `dynamic_two_tailed` tinyint(1) unsigned NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tagente_datos`
-- ---------------------------------------------------------------------
ALTER TABLE tagente_datos MODIFY `datos` double(22,5);
ALTER TABLE `tagente_datos` DROP INDEX `data_index1`, ADD INDEX `data_index1` (`id_agente_modulo`, `utimestamp`);
-- ---------------------------------------------------------------------
-- Table `tagente_datos_string`
-- ---------------------------------------------------------------------
ALTER TABLE `tagente_datos_string` MODIFY COLUMN `datos` mediumtext NOT NULL, DROP INDEX `data_string_index_1`, ADD INDEX `data_string_index_1` (`id_agente_modulo`, `utimestamp`);
-- ---------------------------------------------------------------------
-- Table `tagente_datos_inc`
@ -1384,6 +1443,7 @@ ALTER TABLE tnetwork_component ADD COLUMN `dynamic_min` int(4) default '0';
ALTER TABLE tnetwork_component ADD COLUMN `dynamic_next` bigint(20) NOT NULL default '0';
ALTER TABLE tnetwork_component ADD COLUMN `dynamic_two_tailed` tinyint(1) unsigned default '0';
ALTER TABLE `tnetwork_component` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
ALTER TABLE `tnetwork_component` MODIFY COLUMN `ff_type` tinyint(1) unsigned NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tagente`
@ -1398,6 +1458,12 @@ ALTER TABLE `tagente` ADD COLUMN `cps` int NOT NULL default 0;
UPDATE tagente SET tagente.alias = tagente.nombre;
ALTER TABLE `tagente` MODIFY COLUMN `remote` tinyint(1) NOT NULL DEFAULT '0',
MODIFY COLUMN `cascade_protection_module` int(10) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `update_secondary_groups` tinyint(1) NOT NULL DEFAULT '0',
MODIFY COLUMN `alias` varchar(600) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
MODIFY COLUMN `alias_as_name` tinyint(2) NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tservice`
-- ---------------------------------------------------------------------
@ -1417,6 +1483,8 @@ ALTER TABLE tlayout MODIFY `name` varchar(600) NOT NULL;
UPDATE tlayout SET is_favourite = 1 WHERE name REGEXP '^&#40;' OR name REGEXP '^\\[';
ALTER TABLE `tlayout` MODIFY COLUMN `is_favourite` int(10) unsigned NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tlayout_data`
-- ---------------------------------------------------------------------
@ -1435,6 +1503,13 @@ ALTER TABLE `tlayout_data` ADD COLUMN `linked_layout_status_as_service_warning`
ALTER TABLE `tlayout_data` ADD COLUMN `linked_layout_status_as_service_critical` FLOAT(20, 3) NOT NULL default 0;
ALTER TABLE `tlayout_data` ADD COLUMN `linked_layout_node_id` INT(10) NOT NULL default 0;
ALTER TABLE `tlayout_data` ADD COLUMN `cache_expiration` INTEGER UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `tlayout_data` MODIFY COLUMN `type_graph` varchar(50) NOT NULL DEFAULT 'area',
MODIFY COLUMN `label_position` varchar(50) NOT NULL DEFAULT 'down',
MODIFY COLUMN `linked_layout_node_id` int(10) NOT NULL DEFAULT '0',
MODIFY COLUMN `linked_layout_status_type` enum('default','weight','service') NULL DEFAULT 'default',
MODIFY COLUMN `element_group` int(10) NOT NULL DEFAULT '0',
MODIFY COLUMN `linked_layout_status_as_service_warning` float(20,3) NOT NULL DEFAULT '0.000',
MODIFY COLUMN `linked_layout_status_as_service_critical` float(20,3) NOT NULL DEFAULT '0.000';
-- ---------------------------------------------------------------------
-- Table `tagent_custom_fields`
@ -1456,6 +1531,7 @@ ALTER TABLE tgraph ADD COLUMN `summatory_series` tinyint(1) UNSIGNED NOT NULL de
ALTER TABLE tgraph ADD COLUMN `average_series` tinyint(1) UNSIGNED NOT NULL default '0';
ALTER TABLE tgraph ADD COLUMN `modules_series` tinyint(1) UNSIGNED NOT NULL default '0';
ALTER TABLE tgraph ADD COLUMN `fullscale` tinyint(1) UNSIGNED NOT NULL default '0';
ALTER TABLE `tgraph` MODIFY COLUMN `percentil` tinyint(1) unsigned NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tnetflow_filter`
@ -1501,12 +1577,19 @@ ALTER TABLE `treport_content` ADD COLUMN `failover_mode` tinyint(1) DEFAULT '0';
ALTER TABLE `treport_content` ADD COLUMN `failover_type` tinyint(1) DEFAULT '0';
ALTER table `treport_content` MODIFY COLUMN `name` varchar(300) NULL;
ALTER TABLE `treport_content` ADD COLUMN `uncompressed_module` TINYINT DEFAULT '0';
ALTER TABLE `treport_content` MODIFY COLUMN `historical_db` tinyint(1) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `lapse_calc` tinyint(1) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `lapse` int(11) unsigned NOT NULL DEFAULT '300',
MODIFY COLUMN `visual_format` tinyint(1) unsigned NOT NULL DEFAULT '0',
MODIFY COLUMN `failover_mode` tinyint(1) NULL DEFAULT '1',
MODIFY COLUMN `failover_type` tinyint(1) NULL DEFAULT '1';
-- ---------------------------------------------------------------------
-- Table `tmodule_relationship`
-- ---------------------------------------------------------------------
ALTER TABLE tmodule_relationship ADD COLUMN `id_server` varchar(100) NOT NULL DEFAULT '';
ALTER TABLE `tmodule_relationship` ADD COLUMN `type` ENUM('direct', 'failover') DEFAULT 'direct';
ALTER TABLE `tmodule_relationship` MODIFY COLUMN `id_server` varchar(100) NOT NULL DEFAULT '';
-- ---------------------------------------------------------------------
-- Table `tpolicy_module`
@ -1537,6 +1620,14 @@ ALTER TABLE trecon_task ADD `wmi_enabled` tinyint(1) unsigned DEFAULT '0';
ALTER TABLE trecon_task ADD `auth_strings` text;
ALTER TABLE trecon_task ADD `autoconfiguration_enabled` tinyint(1) unsigned default '0';
ALTER TABLE trecon_task ADD `summary` text;
ALTER TABLE `trecon_task` ADD COLUMN `type` int(11) NOT NULL DEFAULT '0',
MODIFY COLUMN `alias_as_name` tinyint(2) NOT NULL DEFAULT '0',
MODIFY COLUMN `snmp_enabled` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `vlan_enabled` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `wmi_enabled` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `auth_strings` text NULL,
MODIFY COLUMN `autoconfiguration_enabled` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `summary` text NULL;
-- ---------------------------------------------------------------------
-- Table `twidget` AND Table `twidget_dashboard`
@ -1649,12 +1740,14 @@ ALTER TABLE tserver_export MODIFY `name` varchar(600) BINARY NOT NULL default ''
ALTER TABLE tgraph_source ADD COLUMN id_server int(11) UNSIGNED NOT NULL default 0;
ALTER TABLE tgraph_source ADD COLUMN `field_order` int(10) NOT NULL default 0;
ALTER TABLE `tgraph_source` MODIFY COLUMN `id_server` int(11) NOT NULL DEFAULT '0',
MODIFY COLUMN `field_order` int(10) NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tserver_export_data`
-- ---------------------------------------------------------------------
ALTER TABLE tserver_export_data MODIFY `module_name` varchar(600) BINARY NOT NULL default '';
ALTER TABLE tserver_export_data MODIFY `module_name` varchar(600) NOT NULL default '';
-- ---------------------------------------------------------------------
-- Table `tserver`
@ -1939,6 +2032,11 @@ CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
FOREIGN KEY (`id_layout_template`) REFERENCES tlayout_template(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `tlayout_template_data` MODIFY COLUMN `linked_layout_node_id` int(10) NOT NULL DEFAULT '0',
MODIFY COLUMN `linked_layout_status_type` enum('default','weight','service') NULL DEFAULT 'default',
MODIFY COLUMN `linked_layout_status_as_service_warning` float(20,3) NOT NULL DEFAULT '0.000',
MODIFY COLUMN `linked_layout_status_as_service_critical` float(20,3) NOT NULL DEFAULT '0.000';
-- ---------------------------------------------------------------------
-- Table `tlog_graph_models`
-- ---------------------------------------------------------------------
@ -1984,6 +2082,7 @@ INSERT INTO tlog_graph_models VALUES (7, 'Users&#x20;login',
ALTER TABLE `treport` ADD COLUMN `hidden` tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `treport` ADD COLUMN `orientation` varchar(25) NOT NULL default 'vertical';
ALTER TABLE `treport` MODIFY COLUMN `hidden` tinyint(1) NULL DEFAULT '0' AFTER `non_interactive`;
ALTER TABLE `trecon_task` ADD COLUMN `snmp_version` varchar(5) NOT NULL default '1';
ALTER TABLE `trecon_task` ADD COLUMN `snmp_auth_user` varchar(255) NOT NULL default '';
@ -2120,7 +2219,8 @@ ALTER TABLE `tmensajes` ADD COLUMN `citicity` INT(10) UNSIGNED DEFAULT '0';
ALTER TABLE `tmensajes` ADD COLUMN `id_source` BIGINT(20) UNSIGNED NOT NULL;
ALTER TABLE `tmensajes` ADD COLUMN `subtype` VARCHAR(255) DEFAULT '';
ALTER TABLE `tmensajes` ADD CONSTRAINT `tsource_fk` FOREIGN KEY (`id_source`) REFERENCES `tnotification_source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tmensajes` DROP COLUMN `id_usuario_destino`,
ADD UNIQUE INDEX `id_mensaje` (`id_mensaje`);
-- ----------------------------------------------------------------------
-- Table `tnotification_user`
@ -2222,7 +2322,7 @@ ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT
-- Add column in table `tnetflow_filter`
-- ----------------------------------------------------------------------
ALTER TABLE `tnetflow_filter` DROP COLUMN `output`;
ALTER TABLE `tnetflow_filter` MODIFY COLUMN `router_ip` text NOT NULL;
-- ----------------------------------------------------------------------
-- Update table `tuser_task`
@ -2241,6 +2341,17 @@ INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
ALTER TABLE `talert_templates` MODIFY COLUMN `field11` text NOT NULL,
MODIFY COLUMN `field12` text NOT NULL,
MODIFY COLUMN `field13` text NOT NULL,
MODIFY COLUMN `field14` text NOT NULL,
MODIFY COLUMN `field15` text NOT NULL,
MODIFY COLUMN `field11_recovery` text NOT NULL,
MODIFY COLUMN `field12_recovery` text NOT NULL,
MODIFY COLUMN `field13_recovery` text NOT NULL,
MODIFY COLUMN `field14_recovery` text NOT NULL,
MODIFY COLUMN `field15_recovery` text NOT NULL;
-- ---------------------------------------------------------------------
-- Table `tvisual_console_items_cache`
-- ---------------------------------------------------------------------
@ -2268,7 +2379,7 @@ CREATE TABLE `tvisual_console_elements_cache` (
CREATE TABLE IF NOT EXISTS `tcredential_store` (
`identifier` varchar(100) NOT NULL,
`id_group` mediumint(4) unsigned NOT NULL DEFAULT 0,
`product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM',
`product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE') default 'CUSTOM',
`username` text,
`password` text,
`extra_1` text,
@ -2353,13 +2464,23 @@ CREATE TABLE `tremote_command_target` (
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
=========
-- ---------------------------------------------------------------------
-- Table `trecon_script`
-- ---------------------------------------------------------------------
ALTER TABLE `trecon_script` ADD COLUMN `type` int(11) NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------
-- Table `tusuario_perfil`
-- ---------------------------------------------------------------------
ALTER TABLE `tusuario_perfil` MODIFY COLUMN `no_hierarchy` tinyint(1) NOT NULL DEFAULT '0';
-- Extra tnetwork_component
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (786,'N.&#x20;total&#x20;processes','Number&#x20;of&#x20;running&#x20;processes&#x20;in&#x20;a&#x20;Windows&#x20;system.',11,34,0,0,300,0,'tasklist&#x20;/NH&#x20;|&#x20;findstr&#x20;/c&#x20;/v&#x20;&quot;&quot;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (787,'Free&#x20;space&#x20;in&#x20;C:','Free&#x20;space&#x20;available&#x20;in&#x20;C:',11,34,0,0,300,0,'powershell&#x20;$obj=&#40;Get-WmiObject&#x20;-class&#x20;&quot;Win32_LogicalDisk&quot;&#x20;-namespace&#x20;&quot;root&#92;CIMV2&quot;&#41;&#x20;;&#x20;$obj.FreeSpace&#x20;*&#x20;100&#x20;/$obj.Size','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (788,'Linux&#x20;uptime','System&#x20;uptime',43,36,0,0,300,0,'uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (789,'Linux&#x20;processes','Running&#x20;processes',43,34,0,0,300,0,'ps&#x20;elf&#x20;|&#x20;wc&#x20;-l','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (790,'Linux&#x20;system&#x20;load','Current&#x20;load&#x20;&#40;5&#x20;min&#41;',43,34,0,0,300,0,'uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (791,'Linux&#x20;available&#x20;memory&#x20;percent','Available&#x20;memory&#x20;%',43,34,0,0,300,0,'free&#x20;|&#x20;grep&#x20;Mem&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$NF/$2&#x20;*&#x20;100}&#039;','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (792,'Linux&#x20;available&#x20;disk&#x20;/','Available&#x20;free&#x20;space&#x20;in&#x20;mountpoint&#x20;/',43,34,0,0,300,0,'df&#x20;/&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;%&#039;','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('N.&#x20;total&#x20;processes','Number&#x20;of&#x20;running&#x20;processes&#x20;in&#x20;a&#x20;Windows&#x20;system.',11,34,0,0,300,0,'tasklist&#x20;/NH&#x20;|&#x20;find&#x20;/c&#x20;/v&#x20;&quot;&quot;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Free&#x20;space&#x20;in&#x20;C:','Free&#x20;space&#x20;available&#x20;in&#x20;C:',11,34,0,0,300,0,'powershell&#x20;$obj=&#40;Get-WmiObject&#x20;-class&#x20;&quot;Win32_LogicalDisk&quot;&#x20;-namespace&#x20;&quot;root&#92;CIMV2&quot;&#41;&#x20;;&#x20;$obj.FreeSpace[0]&#x20;*&#x20;100&#x20;/$obj.Size[0]','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;uptime','System&#x20;uptime',43,36,0,0,300,0,'uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;processes','Running&#x20;processes',43,34,0,0,300,0,'ps&#x20;elf&#x20;|&#x20;wc&#x20;-l','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;system&#x20;load','Current&#x20;load&#x20;&#40;5&#x20;min&#41;',43,34,0,0,300,0,'uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;available&#x20;memory&#x20;percent','Available&#x20;memory&#x20;%',43,34,0,0,300,0,'free&#x20;|&#x20;grep&#x20;Mem&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$NF/$2&#x20;*&#x20;100}&#039;','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux&#x20;available&#x20;disk&#x20;/','Available&#x20;free&#x20;space&#x20;in&#x20;mountpoint&#x20;/',43,34,0,0,300,0,'df&#x20;/&#x20;|&#x20;tail&#x20;-n&#x20;+2&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;%&#039;','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);

View File

@ -340,7 +340,7 @@ if ($config['menu_type'] == 'classic') {
'title' => __('Feedback'),
'id' => 'feedback-header',
'alt' => __('Feedback'),
'style' => 'cursor: pointer; width: 27px;',
'style' => 'cursor: pointer;',
]
);
$header_feedback .= '</div>';

View File

@ -95,6 +95,8 @@ $custom_fields = [
'custom_title1_login',
'custom_title2_login',
'rb_product_name',
'custom_docs_url',
'custom_support_url',
];
foreach ($custom_fields as $field) {
@ -112,21 +114,33 @@ $support_logo = ui_get_support_logo();
echo '<div id="login_body" '.$login_body_style.'>';
echo '<div id="header_login">';
echo '<div id="list_icon_docs_support"><ul>';
if ($docs_logo !== false) {
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
}
echo '<div id="list_icon_docs_support"><ul>';
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank">'.__('Docs').'</li>';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($support_logo !== false) {
echo '<li id="li_margin_left"><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
if (isset($config['custom_docs_url'])) {
if ($docs_logo !== false) {
echo '<li><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
}
echo '<li><a href="'.$config['custom_support_url'].'" target="_blank">'.__('Support').'</li>';
} else {
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
echo '<li>'.__('Support').'</li>';
echo '<li><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'.__('Docs').'</li>';
} else if (!$custom_conf_enabled) {
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank">'.__('Docs').'</li>';
}
if (isset($config['custom_support_url'])) {
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($support_logo !== false) {
echo '<li id="li_margin_left"><a href="'.ui_get_full_external_url($config['custom_support_url']).'" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
}
echo '<li><a href="'.ui_get_full_external_url($config['custom_support_url']).'" target="_blank">'.__('Support').'</li>';
} else {
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
echo '<li>'.__('Support').'</li>';
}
} else if (!$custom_conf_enabled) {
echo '<li id="li_margin_left"><a href="https://support.artica.es" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
echo '<li><a href="https://support.artica.es" target="_blank">'.__('Docs').'</li>';
}
echo '</ul></div>';

View File

@ -108,9 +108,15 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
}
}
if (!$custom_conf_enabled) {
if (!$custom_conf_enabled || isset($config['custom_docs_url_alt'])) {
if (isset($config['custom_docs_url_alt'])) {
$docs_url = $config['custom_docs_url_alt'];
} else {
$docs_url = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration';
}
echo '
<a href="https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration" target="_blank">
<a href="'.ui_get_full_external_url($docs_url).'" target="_blank">
<div class="modalwikibutto cerrar">
<span class="modalwikibuttontex">'.__('Documentation').'
</span>

View File

@ -486,19 +486,6 @@ if ($id_agente) {
$agent_wizard['active'] = false;
}
$is_sap = agents_get_sap_agents($id_agente);
if ($is_sap) {
$saptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=sap_view&page=1&id_agente='.$id_agente.'">'.html_print_image('images/sap_icon.png', true, ['title' => __('SAP view')]).'</a>';
if ($tab == 'sap_view') {
$saptab['active'] = true;
} else {
$saptab['active'] = false;
}
} else {
$saptab = '';
}
$total_incidents = agents_get_count_incidents($id_agente);
@ -545,7 +532,6 @@ if ($id_agente) {
'group' => $grouptab,
'gis' => $gistab,
'agent_wizard' => $agent_wizard,
'sap_view' => $saptab,
];
} else {
$onheader = [
@ -561,7 +547,6 @@ if ($id_agente) {
'group' => $grouptab,
'gis' => $gistab,
'agent_wizard' => $agent_wizard,
'sap_view' => $saptab,
];
}
@ -708,36 +693,33 @@ if ($id_agente) {
}
break;
case 'sap_view':
$tab_description = '- '.__('SAP view');
$help_header = 'sap_view';
$tab_name = 'SAP View';
break;
default:
// Default.
break;
}
ui_print_page_header(
agents_get_alias($id_agente),
'images/setup.png',
false,
$help_header,
true,
$onheader,
false,
'',
$config['item_title_size_text'],
'',
ui_print_breadcrums(
[
__('Resources'),
__('Manage agents'),
'<span class="breadcrumb_active">'.$tab_name.'</span>',
]
)
);
$pure = get_parameter('pure', 0);
if (!$pure) {
ui_print_page_header(
agents_get_alias($id_agente),
'images/setup.png',
false,
$help_header,
true,
$onheader,
false,
'',
$config['item_title_size_text'],
'',
ui_print_breadcrums(
[
__('Resources'),
__('Manage agents'),
'<span class="breadcrumb_active">'.$tab_name.'</span>',
]
)
);
}
} else {
// Create agent.
ui_print_page_header(
@ -2369,10 +2351,6 @@ switch ($tab) {
include 'agent_wizard.php';
break;
case 'sap_view':
include 'general/sap_view.php';
break;
default:
if (enterprise_hook('switch_agent_tab', [$tab])) {
// This will make sure that blank pages will have at least some

View File

@ -329,13 +329,20 @@ if (!$edit) {
}
// Removed web analysis and log4x from select.
$tipe_not_in = '24, 25';
// TODO: FIX credential store for remote command in metaconsole.
if (is_metaconsole()) {
$tipe_not_in = '24, 25, 34, 35, 36, 37';
}
$sql = sprintf(
'SELECT id_tipo, descripcion, nombre, categoria
FROM ttipo_modulo
WHERE categoria IN (%s)
AND id_tipo NOT IN (24, 25)
AND id_tipo NOT IN (%s)
ORDER BY id_tipo ASC',
implode(',', $categories)
implode(',', $categories),
$tipe_not_in
);
$type_names = db_get_all_rows_sql($sql);

View File

@ -1105,6 +1105,57 @@ $table->data['edit1'][1] = '<table width="100%">';
// Store the macros in base64 into a hidden control to move between pages
$table->data['edit21'][0] = html_print_input_hidden('macros', base64_encode($macros), true);
$table->colspan['edit23'][1] = 3;
$table->data['edit23'][0] = __('Command');
$table->data['edit23'][1] = html_print_input_text_extended(
'tcp_send',
'',
'command_text',
'',
100,
10000,
false,
'',
'',
true
);
require_once $config['homedir'].'/include/class/CredentialStore.class.php';
$array_credential_identifier = CredentialStore::getKeys('CUSTOM');
$table->data['edit24'][0] = __('Credential identifier');
$table->data['edit24'][1] = html_print_select(
$array_credential_identifier,
'custom_string_1',
'',
'',
__('None'),
'',
true,
false,
false
);
$array_os = [
'inherited' => __('Inherited'),
'linux' => __('Linux'),
'windows' => __('Windows'),
];
$table->data['edit24'][2] = __('Target OS');
$table->data['edit24'][3] = html_print_select(
$array_os,
'custom_string_2',
'',
'',
'',
'',
true,
false,
false,
''
);
if (!empty($id_plugin)) {
$preload = db_get_sql("SELECT description FROM tplugin WHERE id = $id_plugin");
$preload = io_safe_output($preload);
@ -1221,6 +1272,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").hide ();
var params = {
@ -1296,6 +1349,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").show ();
switch($('#module_type').val()) {
@ -1353,6 +1408,13 @@ $(document).ready (function () {
$("#edit1-1-str,#edit1-3-str,#delete_table-edit15,#delete_table-edit3-2," +
"#delete_table-edit3-3,#delete_table-edit35").hide();
break;
case '34':
case '35':
case '36':
case '37':
$("#edit1-1-min,#edit1-1-max,#edit1-3-min,#edit1-3-max").show();
$("#edit1-1-str,#edit1-3-str,#delete_table-edit5").hide();
break;
default:
}
}
@ -1391,6 +1453,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").hide ();
$('input[type=checkbox]').attr('checked', false);
$('input[type=checkbox]').attr('disabled', true);
@ -1447,6 +1511,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").hide ();
}
}
@ -1497,6 +1563,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").show ();
}
else {
@ -1528,6 +1596,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").hide ();
}
}
@ -1618,6 +1688,8 @@ $(document).ready (function () {
"tr#delete_table-edit20, " +
"tr#delete_table-edit21, " +
"tr#delete_table-edit22, " +
"tr#delete_table-edit23, " +
"tr#delete_table-edit24, " +
"tr#delete_table-edit15").hide ();
jQuery.post ("ajax.php",
@ -1858,6 +1930,9 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
'field_number',
'tcp_send2',
'plugin_parameter_text',
'command_text',
'command_credential_identifier',
'command_os',
];
$values = [];

View File

@ -837,7 +837,7 @@ class Wizard
$first_block_printed = true;
}
$output .= '<div class="edit_discovery_info" style="'.$row['style'].'">';
$output .= '<div class="edit_discovery_info '.$row['class'].'" style="'.$row['style'].'">';
foreach ($row['columns'] as $column) {
$width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;';

View File

@ -68,6 +68,10 @@ class Diagnostics extends Wizard
// Check access.
check_login();
$this->url = ui_get_full_url(
'index.php?sec=gextensions&sec2=tools/diagnostics'
);
$this->ajaxController = $page;
$this->pdf = $pdf;
$this->product_name = io_safe_output(get_product_name());
@ -123,15 +127,34 @@ class Diagnostics extends Wizard
{
global $config;
if ($this->pdf === true) {
$this->exportPDF();
exit;
}
ui_require_css_file('diagnostics');
$pdf_url = $this->url.'&pdf=true';
$pdf_img = html_print_image(
'images/pdf.png',
true,
['title' => __('Export to PDF')]
);
$header_buttons = [
'csv' => [
'active' => false,
'text' => '<a target="_new" href="'.$pdf_url.'">'.$pdf_img.'</a>',
],
];
// Header.
ui_print_page_header(
__('%s Diagnostic tool', $this->product_name),
'images/gm_massive_operations.png',
false,
'diagnostic_tool_tab',
true
true,
$header_buttons
);
// Print all Methods Diagnostic Info.
@ -2080,6 +2103,11 @@ class Diagnostics extends Wizard
enterprise_include_once('/include/class/Pdf.class.php');
$mpdf = new Pdf([]);
// Ignore pending HTML outputs.
while (@ob_end_clean()) {
$ignore_me;
}
// ADD style.
$mpdf->addStyle($config['homedir'].'/include/styles/diagnostics.css');
@ -2112,6 +2140,8 @@ class Diagnostics extends Wizard
// Write html filename.
$mpdf->writePDFfile($filename);
exit;
}

View File

@ -20,8 +20,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC191118';
$pandora_version = 'v7.0NG.740';
$build_version = 'PC191122';
$pandora_version = 'v7.0NG.741';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -1042,6 +1042,8 @@ function events_get_all(
}
}
$user_admin_group_all = ($user_is_admin && $groups == 0) ? '' : 'tasg.';
// TAgs ACLS.
if (check_acl($config['id_user'], 0, 'ER')) {
$tags_acls_condition = tags_get_acl_tags(
@ -1066,7 +1068,7 @@ function events_get_all(
// Table tag for id_grupo.
'te.',
// Alt table tag for id_grupo.
'tasg.'
$user_admin_group_all
);
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)".
} else if (check_acl($config['id_user'], 0, 'EW')) {
@ -1092,7 +1094,7 @@ function events_get_all(
// Table tag for id_grupo.
'te.',
// Alt table tag for id_grupo.
'tasg.'
$user_admin_group_all
);
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)".
} else if (check_acl($config['id_user'], 0, 'EM')) {
@ -1118,7 +1120,7 @@ function events_get_all(
// Table tag for id_grupo.
'te.',
// Alt table tag for id_grupo.
'tasg.'
$user_admin_group_all
);
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)".
}
@ -1228,8 +1230,11 @@ function events_get_all(
}
// Secondary groups.
db_process_sql('SET group_concat_max_len = 9999999');
$event_lj = events_get_secondary_groups_left_join($table);
$event_lj = '';
if (!$user_is_admin || ($user_is_admin && isset($groups) && $groups > 0)) {
db_process_sql('SET group_concat_max_len = 9999999');
$event_lj = events_get_secondary_groups_left_join($table);
}
$group_selects = '';
if ($group_by != '') {
@ -4559,116 +4564,98 @@ function events_page_comments($event, $ajax=false)
// Comments.
global $config;
$comments = '';
$comments = $event['user_comment'];
if (isset($event['comments'])) {
$comments = explode('<br>', $event['comments']);
}
$table_comments = new stdClass;
$table_comments->width = '100%';
$table_comments->data = [];
$table_comments->head = [];
$table_comments->class = 'table_modal_alternate';
$comments = str_replace(["\n", '&#x0a;'], '<br>', $comments);
$comments = ($event['user_comment'] ?? '');
if (is_array($comments)) {
foreach ($comments as $comm) {
if (empty($comm)) {
continue;
}
$comments_array[] = io_safe_output(json_decode($comm, true));
}
if (empty($comments)) {
$table_comments->style[0] = 'text-align:center;';
$table_comments->colspan[0][0] = 2;
$data = [];
$data[0] = __('There are no comments');
$table_comments->data[] = $data;
} else {
// If comments are not stored in json, the format is old.
$comments_array = json_decode(io_safe_output($comments), true);
}
foreach ($comments_array as $comm) {
// Show the comments more recent first.
if (is_array($comm)) {
$comm = array_reverse($comm);
}
if (empty($comm)) {
$comments_format = 'old';
} else {
$comments_format = 'new';
}
switch ($comments_format) {
case 'new':
if (is_array($comments)) {
foreach ($comments as $comm) {
if (empty($comm)) {
$table_comments->style[0] = 'text-align:center;';
$table_comments->colspan[0][0] = 2;
$data = [];
$data[0] = __('There are no comments');
$table_comments->data[] = $data;
continue;
}
if (isset($comm) === true
&& is_array($comm) === true
) {
$comments_array[] = json_decode(io_safe_output($comm), true);
}
} else {
$comments = str_replace(["\n", '&#x0a;'], '<br>', $comments);
// If comments are not stored in json, the format is old.
$comments_array[] = json_decode(io_safe_output($comments), true);
}
foreach ($comments_array as $comm) {
// Show the comments more recent first.
if (is_array($comm)) {
$comm = array_reverse($comm);
}
if (empty($comm)) {
$comments_format = 'old';
} else {
$comments_format = 'new';
}
switch ($comments_format) {
case 'new':
foreach ($comm as $c) {
$data[0] = '<b>'.$c['action'].' by '.$c['id_user'].'</b>';
$data[0] .= '<br><br><i>'.date($config['date_format'], $c['utimestamp']).'</i>';
$data[1] = '<p style="word-break: break-word;">'.$c['comment'].'</p>';
$table_comments->data[] = $data;
}
}
break;
break;
case 'old':
$comm = explode('<br>', $comments);
case 'old':
$comm = explode('<br>', $comments);
// Split comments and put in table.
$col = 0;
$data = [];
foreach ($comm as $c) {
switch ($col) {
case 0:
$row_text = preg_replace('/\s*--\s*/', '', $c);
$row_text = preg_replace('/\<\/b\>/', '</i>', $row_text);
$row_text = preg_replace('/\[/', '</b><br><br><i>[', $row_text);
$row_text = preg_replace('/[\[|\]]/', '', $row_text);
break;
case 1:
$row_text = preg_replace("/[\r\n|\r|\n]/", '<br>', io_safe_output(strip_tags($c)));
break;
default:
// Ignore.
break;
}
$data[$col] = $row_text;
$col++;
if ($col == 2) {
$col = 0;
$table_comments->data[] = $data;
$data = [];
}
}
if (count($comm) == 1 && $comm[0] == '') {
$table_comments->style[0] = 'text-align:center;';
$table_comments->colspan[0][0] = 2;
// Split comments and put in table.
$col = 0;
$data = [];
$data[0] = __('There are no comments');
$table_comments->data[] = $data;
}
break;
default:
// Ignore.
break;
foreach ($comm as $c) {
switch ($col) {
case 0:
$row_text = preg_replace('/\s*--\s*/', '', $c);
$row_text = preg_replace('/\<\/b\>/', '</i>', $row_text);
$row_text = preg_replace('/\[/', '</b><br><br><i>[', $row_text);
$row_text = preg_replace('/[\[|\]]/', '', $row_text);
break;
case 1:
$row_text = preg_replace("/[\r\n|\r|\n]/", '<br>', io_safe_output(strip_tags($c)));
break;
default:
// Ignore.
break;
}
$data[$col] = $row_text;
$col++;
if ($col == 2) {
$col = 0;
$table_comments->data[] = $data;
$data = [];
}
}
break;
default:
// Ignore.
break;
}
}
}

View File

@ -308,14 +308,13 @@ function groups_get_children($parent, $ignorePropagate=false)
static $groups;
if (empty($groups)) {
$aux_groups = [];
$groups = db_get_all_rows_in_table('tgrupo');
$groups = array_reduce(
$groups,
function ($carry, $item) {
$carry[$item['id_grupo']] = $item;
return $carry;
}
);
foreach ($groups as $key => $value) {
$aux_groups[$value['id_grupo']] = $value;
}
$groups = $aux_groups;
}
$return = [];

View File

@ -5653,11 +5653,11 @@ function ui_get_docs_logo()
global $config;
// Default logo to open version (enterprise_installed function only works in login status).
if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php') || !isset($config['custom_docs_logo'])) {
return 'images/icono_docs.png';
}
if (empty($config['custom_docs_logo'])) {
if ($config['custom_docs_logo'] === '') {
return false;
}
@ -5675,11 +5675,11 @@ function ui_get_support_logo()
global $config;
// Default logo to open version (enterprise_installed function only works in login status).
if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php') || !isset($config['custom_support_logo'])) {
return 'images/icono_support.png';
}
if (empty($config['custom_support_logo'])) {
if ($config['custom_support_logo'] === '') {
return false;
}

View File

@ -0,0 +1,174 @@
/* eslint-disable no-unused-vars */
/* global $, load_modal, generalShowMsg, confirmDialog */
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("html", ev.target.outerHTML);
}
function drop(ev) {
ev.preventDefault();
var data = document.createElement("span");
var content = ev.dataTransfer.getData("html");
if (content.includes("nexo")) {
content = "<br/>" + content;
}
data.innerHTML = content;
document.getElementById(ev.target.id).appendChild(data);
}
function add_alert_action(settings) {
load_modal({
target: $("#modal-add-action-form"),
form: "modal_form_add_actions",
url: settings.url_ajax,
modal: {
title: settings.title,
cancel: settings.btn_cancel,
ok: settings.btn_text
},
onshow: {
page: settings.url,
method: "addAlertActionForm",
extradata: {
id: settings.id
}
},
onsubmit: {
page: settings.url,
method: "addAlertAction",
dataType: "json"
},
ajax_callback: add_alert_action_acept,
idMsgCallback: "msg-add-action"
});
}
function add_alert_action_acept(data, idMsg) {
if (data.error === 1) {
console.log(data.text);
return;
}
if ($("#emptyli-al-" + data.id_alert).length > 0) {
$("#emptyli-al-" + data.id_alert).remove();
}
$.ajax({
method: "post",
url: data.url,
data: {
page: data.page,
method: "addRowActionAjax",
id_alert: data.id_alert,
id_action: data.id_action
},
dataType: "html",
success: function(li) {
$(".ui-dialog-content").dialog("close");
$("#ul-al-" + data.id_alert).append(li);
},
error: function(error) {
console.log(error);
}
});
}
function delete_alert_action(settings) {
confirmDialog({
title: settings.title,
message: settings.msg,
onAccept: function() {
$.ajax({
method: "post",
url: settings.url,
data: {
page: settings.page,
method: "deleteActionAlert",
id_alert: settings.id_alert,
id_action: settings.id_action
},
dataType: "json",
success: function(data) {
// Delete row table.
$(
"#li-al-" + settings.id_alert + "-act-" + settings.id_action
).remove();
var num_row = $("#ul-al-" + settings.id_alert + " li").length;
if (num_row === 0) {
var emptyli =
"<li id='emptyli-al-" +
settings.id_alert +
"'>" +
settings.emptyli +
"</li>";
$("#ul-al-" + settings.id_alert).append(emptyli);
}
},
error: function(error) {
console.log(error);
}
});
}
});
}
function standby_alert(settings) {
confirmDialog({
title: settings.title,
message: settings.msg,
onAccept: function() {
$.ajax({
method: "post",
url: settings.url,
data: {
page: settings.page,
method: "standByAlert",
id_alert: settings.id_alert,
standby: settings.standby
},
dataType: "html",
success: function(data) {
$("#standby-alert-" + settings.id_alert).empty();
$("#standby-alert-" + settings.id_alert).append(data);
},
error: function(error) {
console.log(error);
}
});
}
});
}
function disabled_alert(settings) {
confirmDialog({
title: settings.title,
message: settings.msg,
onAccept: function() {
$.ajax({
method: "post",
url: settings.url,
data: {
page: settings.page,
method: "disabledAlert",
id_alert: settings.id_alert,
disabled: settings.disabled
},
dataType: "json",
success: function(data) {
$("#disabled-alert-" + settings.id_alert).empty();
$("#disabled-alert-" + settings.id_alert).append(data.disabled);
$("#status-alert-" + settings.id_alert).empty();
$("#status-alert-" + settings.id_alert).append(data.status);
},
error: function(error) {
console.log(error);
}
});
}
});
}

View File

@ -570,6 +570,10 @@ function configure_modules_form() {
$("#command_credential_identifier").val(
data["command_credential_identifier"]
);
if (data["command_os"] == 0 || data["command_os"] == "") {
data["command_os"] = "inherited";
}
$("#command_os").val(data["command_os"]);
}
},

View File

@ -128,8 +128,8 @@
</div>
<div style='height: 10px'>
<?php
$version = '7.0NG.740';
$build = '191118';
$version = '7.0NG.741';
$build = '191122';
$banner = "v$version Build $build";
error_reporting(0);
@ -880,6 +880,9 @@ function install_step4()
// $config["custom_title1_login_alt"] = "WELCOME TO Pandora FMS";
// $config["custom_title2_login_alt"] = "NEXT GENERATION";
// $config["rb_product_name_alt"] = "Pandora FMS";
// $config["custom_docs_url_alt"] = "http://wiki.pandorafms.com/";
// $config["custom_support_url_alt"] = "https://support.artica.es";
/*
@ -991,6 +994,8 @@ function install_step4()
// $config["custom_title1_login_alt"] = "WELCOME TO Pandora FMS";
// $config["custom_title2_login_alt"] = "NEXT GENERATION";
// $config["rb_product_name_alt"] = "Pandora FMS";
// $config["custom_docs_url_alt"] = "http://wiki.pandorafms.com/";
// $config["custom_support_url_alt"] = "https://support.artica.es";
/*
----------Attention--------------------

View File

@ -821,8 +821,9 @@ foreach ($agents as $agent) {
$data[2] = ui_print_os_icon($agent['id_os'], false, true);
$data[3] = '<span style="font-size:6.5pt;">'.human_time_description_raw($agent['intervalo']).'</span>';
$data[4] = ui_print_group_icon($agent['id_grupo'], true);
$data[4] = '<a href="'.$config['homeurl'].'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr=60&amp;group_id='.$agent['id_grupo'].'">';
$data[4] .= ui_print_group_icon($agent['id_grupo'], true, 'groups_small', '', false);
$data[4] .= '</a>';
$agent['not_init_count'] = $agent['notinit_count'];
$data[5] = ui_print_type_agent_icon(

View File

@ -1329,6 +1329,19 @@ if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])
}
}
$is_sap = agents_get_sap_agents($id_agente);
if ($is_sap) {
$saptab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=sap_view&page=1&id_agente='.$id_agente.'">'.html_print_image('images/sap_icon.png', true, ['title' => __('SAP view')]).'</a>';
if ($tab == 'sap_view') {
$saptab['active'] = true;
} else {
$saptab['active'] = false;
}
} else {
$saptab = '';
}
$onheader = [
'manage' => $managetab,
'main' => $maintab,
@ -1342,6 +1355,8 @@ $onheader = [
'ux_console' => $ux_console_tab,
'wux_console' => $wux_console_tab,
'url_route_analyzer' => $url_route_analyzer_tab,
'sap_view' => $saptab,
];
// Added after it exists
@ -1505,6 +1520,12 @@ switch ($tab) {
$tab_name = $tab_name_extensions;
break;
case 'sap_view':
$tab_description = '- '.__('SAP view');
$help_header = 'sap_view';
$tab_name = 'SAP View';
break;
default:
$tab_name = '';
$help_header = '';
@ -1612,6 +1633,10 @@ switch ($tab) {
include 'operation/agentes/ehorus.php';
break;
case 'sap_view':
include 'general/sap_view.php';
break;
case 'extension':
$found = false;
foreach ($config['extensions'] as $extension) {

View File

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

View File

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

View File

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

View File

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

View File

@ -3706,4 +3706,4 @@ CREATE TABLE `tremote_command_target` (
PRIMARY KEY (`id`),
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -270,7 +270,7 @@ INSERT INTO `torigen` VALUES
--
-- Identifiers 30 and 31 are reserved for Enterprise data types
INSERT INTO `ttipo_modulo` VALUES
INSERT INTO `ttipo_modulo` VALUES
(1,'generic_data',0,'Generic numeric','mod_data.png'),
(2,'generic_proc',1,'Generic boolean','mod_proc.png'),
(3,'generic_data_string',2,'Generic string','mod_string.png'),
@ -285,15 +285,19 @@ INSERT INTO `ttipo_modulo` VALUES
(15,'remote_snmp',3,'Remote SNMP network agent, numeric data','mod_snmp_data.png'),
(16,'remote_snmp_inc',3,'Remote SNMP network agent, incremental data','mod_snmp_inc.png'),
(17,'remote_snmp_string',5,'Remote SNMP network agent, alphanumeric data','mod_snmp_string.png'),
(18,'remote_snmp_proc',4,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'),
(21,'async_proc', 7, 'Asyncronous proc data', 'mod_async_proc.png'),
(22,'async_data', 6, 'Asyncronous numeric data', 'mod_async_data.png'),
(18,'remote_snmp_proc',4,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'),
(21,'async_proc', 7, 'Asyncronous proc data', 'mod_async_proc.png'),
(22,'async_data', 6, 'Asyncronous numeric data', 'mod_async_data.png'),
(23,'async_string', 8, 'Asyncronous string data', 'mod_async_string.png'),
(25,'web_analysis', 8, 'Web analysis data', 'module-wux.png'),
(30,'web_data',9,'Remote HTTP module to check latency','mod_web_data.png'),
(31,'web_proc',9,'Remote HTTP module to check server response','mod_web_proc.png'),
(32,'web_content_data',9,'Remote HTTP module to retrieve numeric data','mod_web_data.png'),
(33,'web_content_string',9,'Remote HTTP module to retrieve string data','mod_web_data.png'),
(34,'remote_cmd', 10, 'Remote execution, numeric data', 'mod_remote_cmd.png'),
(35,'remote_cmd_proc', 10, 'Remote execution, boolean data', 'mod_remote_cmd_proc.png'),
(36,'remote_cmd_string', 10, 'Remote execution, alphanumeric data', 'mod_remote_cmd_string.png'),
(37,'remote_cmd_inc', 10, 'Remote execution, incremental data', 'mod_remote_cmd_inc.png'),
(100,'keep_alive',-1,'KeepAlive','mod_keepalive.png');
--
@ -982,8 +986,8 @@ INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `t
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (783,'Check&#x20;Informix&#x20;Port','',19,9,0,0,300,1526,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (784,'Check&#x20;port&#x20;DB2','',49,9,0,0,300,50000,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (785,'Packet&#x20;Loss','Measure&#x20;packet&#x20;loss&#x20;in&#x20;the&#x20;network,&#x20;using&#x20;a&#x20;flood&#x20;ping&#x20;&#40;50&#x20;ping&#x20;in&#x20;8&#x20;secons&#41;&#x20;and&#x20;counting&#x20;back&#x20;missing&#x20;packets.&#x20;It&#x20;should&#x20;be&#x20;zero&#x20;on&#x20;most&#x20;cases.&#x20;',10,1,0,0,300,0,'','','','',2,4,9,'','','',0,0,1,10.00,0.00,'',30.00,0.00,'',0,'','','',0,0,0.00000,'%','nowizard','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Test&#x20;time\",\"help\":\"\",\"value\":\"8\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Target&#x20;IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','You&#x20;should&#x20;check&#x20;manually&#x20;the&#x20;packet&#x20;loss&#x20;of&#x20;the&#x20;network&#x20;with&#x20;a&#x20;flood&#x20;ping&#x20;on&#x20;targeted&#x20;host&#x20;&#40;ping&#x20;-c&#x20;100&#x20;-f&#x20;xxxx&#41;.&#x20;Aditionally,&#x20;and&#x20;due&#x20;the&#x20;major&#x20;packet&#x20;loss,&#x20;probably&#x20;you&#x20;can&#x20;see&#x20;a&#x20;simple&#x20;ping&#x20;failing&#x20;here.&#x20;Check&#x20;your&#x20;network&#x20;equipment.','You&#x20;should&#x20;check&#x20;manually&#x20;the&#x20;packet&#x20;loss&#x20;of&#x20;the&#x20;network&#x20;with&#x20;a&#x20;flood&#x20;ping&#x20;on&#x20;targeted&#x20;host&#x20;&#40;ping&#x20;-c&#x20;100&#x20;-f&#x20;xxxx&#41;','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (786,'N.&#x20;total&#x20;processes','Number&#x20;of&#x20;running&#x20;processes&#x20;in&#x20;a&#x20;Windows&#x20;system.',11,34,0,0,300,0,'tasklist&#x20;/NH&#x20;|&#x20;findstr&#x20;/c&#x20;/v&#x20;&quot;&quot;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (787,'Free&#x20;space&#x20;in&#x20;C:','Free&#x20;space&#x20;available&#x20;in&#x20;C:',11,34,0,0,300,0,'powershell&#x20;$obj=&#40;Get-WmiObject&#x20;-class&#x20;&quot;Win32_LogicalDisk&quot;&#x20;-namespace&#x20;&quot;root&#92;CIMV2&quot;&#41;&#x20;;&#x20;$obj.FreeSpace&#x20;*&#x20;100&#x20;/$obj.Size','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (786,'N.&#x20;total&#x20;processes','Number&#x20;of&#x20;running&#x20;processes&#x20;in&#x20;a&#x20;Windows&#x20;system.',11,34,0,0,300,0,'tasklist&#x20;/NH&#x20;|&#x20;find&#x20;/c&#x20;/v&#x20;&quot;&quot;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (787,'Free&#x20;space&#x20;in&#x20;C:','Free&#x20;space&#x20;available&#x20;in&#x20;C:',11,34,0,0,300,0,'powershell&#x20;$obj=&#40;Get-WmiObject&#x20;-class&#x20;&quot;Win32_LogicalDisk&quot;&#x20;-namespace&#x20;&quot;root&#92;CIMV2&quot;&#41;&#x20;;&#x20;$obj.FreeSpace[0]&#x20;*&#x20;100&#x20;/$obj.Size[0]','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (788,'Linux&#x20;uptime','System&#x20;uptime',43,36,0,0,300,0,'uptime&#x20;|sed&#x20;s/us&#92;.*$//g&#x20;|&#x20;sed&#x20;s/,&#92;.*$//g','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (789,'Linux&#x20;processes','Running&#x20;processes',43,34,0,0,300,0,'ps&#x20;elf&#x20;|&#x20;wc&#x20;-l','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (790,'Linux&#x20;system&#x20;load','Current&#x20;load&#x20;&#40;5&#x20;min&#41;',43,34,0,0,300,0,'uptime&#x20;|&#x20;awk&#x20;&#039;{print&#x20;$&#40;NF-1&#41;}&#039;&#x20;|&#x20;tr&#x20;-d&#x20;&#039;,&#039;','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);

View File

@ -32,7 +32,7 @@ global $config;
require_once $config['homedir'].'/include/class/Diagnostics.class.php';
$ajaxPage = 'tools/diagnostics';
$pdf = false;
$pdf = get_parameter('pdf', false);
// Control call flow.

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.740-191118
Version: 7.0NG.741
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.740-191118"
pandora_version="7.0NG.741"
package_cpan=0
package_pandora=1

View File

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

View File

@ -44,8 +44,8 @@ our @EXPORT = qw(
);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.740";
my $pandora_build = "191118";
my $pandora_version = "7.0NG.741";
my $pandora_build = "191122";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -560,7 +560,17 @@ sub exec_network_module ($$$$) {
|| ($id_tipo_modulo == 35)
|| ($id_tipo_modulo == 36)
|| ($id_tipo_modulo == 37)) { # CMD Module
$module_data = enterprise_hook('remote_execution_module',[$pa_config, $dbh, $module, $target_os, $ip_target]);
$module_data = enterprise_hook(
'remote_execution_module',
[
$pa_config,
$dbh,
$module,
$target_os,
$ip_target,
$tcp_port
]
);
if (!defined($module_data) || "$module_data" eq "") {
$module_result = 1;
} else {

View File

@ -31,8 +31,8 @@ use base 'Exporter';
our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.740";
my $pandora_build = "191118";
my $pandora_version = "7.0NG.741";
my $pandora_build = "191122";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

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

View File

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

View File

@ -8,8 +8,8 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.740"
PI_BUILD="191118"
PI_VERSION="7.0NG.741"
PI_BUILD="191122"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.740 PS191118";
my $version = "7.0NG.741 PS191122";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.740 PS191118";
my $version = "7.0NG.741 PS191122";
# save program name for logging
my $progname = basename($0);
@ -118,22 +118,13 @@ sub help_screen{
help_screen_line('--get_planned_downtimes_items', '<name> [<id_group> <type_downtime> <type_execution> <type_periodicity>]', 'Get all items of planned downtimes');
help_screen_line('--set_planned_downtimes_deleted', '<name> ', 'Deleted a planned downtime');
help_screen_line('--get_module_id', '<agent_id> <module_name>', 'Get the id of an module');
<<<<<<< HEAD
help_screen_line('--get_agent_group', '<agent_name>', 'Get the group name of an agent');
help_screen_line('--get_agent_group_id', '<agent_name>', 'Get the group ID of an agent');
help_screen_line('--get_agent_modules', '<agent_name>', 'Get the modules of an agent');
help_screen_line('--get_agents_id_name_by_alias', '<agent_alias>', '[<strict>]', 'List id and alias of agents mathing given alias');
help_screen_line('--get_agents', '[<group_name> <os_name> <status> <max_modules> <filter_substring> <policy_name>]', "Get \n\t list of agents with optative filter parameters");
help_screen_line('--delete_conf_file', '<agent_name>', 'Delete a local conf of a given agent');
help_screen_line('--clean_conf_file', '<agent_name>', "Clean a local conf of a given agent deleting all modules, \n\t policies, file collections and comments");
=======
help_screen_line('--get_agent_group', '<agent_name> [<use_alias>]', 'Get the group name of an agent');
help_screen_line('--get_agent_group_id', '<agent_name> [<use_alias>]', 'Get the group ID of an agent');
help_screen_line('--get_agent_modules', '<agent_name> [<use_alias>]', 'Get the modules of an agent');
help_screen_line('--get_agents_id_name_by_alias', '<agent_alias>', '[<strict>]', 'List id and alias of agents mathing given alias');
help_screen_line('--get_agents', '[<group_name> <os_name> <status> <max_modules> <filter_substring> <policy_name> <use_alias>]', "Get \n\t list of agents with optative filter parameters");
help_screen_line('--delete_conf_file', '<agent_name> [<use_alias>]', 'Delete a local conf of a given agent');
help_screen_line('--clean_conf_file', '<agent_name> [<use_alias>]', "Clean a local conf of a given agent deleting all modules, \n\t policies, file collections and comments");
>>>>>>> origin/develop
help_screen_line('--get_bad_conf_files', '', 'Get the files bad configured (without essential tokens)');
help_screen_line('--locate_agent', '<agent_name> [<use_alias>]', 'Search a agent into of nodes of metaconsole. Only Enterprise.');
help_screen_line('--migration_agent_queue', '<id_node> <source_node_name> <target_node_name> [<db_only>]', 'Migrate agent only metaconsole');
@ -4095,9 +4086,6 @@ sub cli_create_event() {
$id_alert_agent_module = 0;
}
if (defined($comment) && $comment ne '') {
$comment = '<b>-- Added comment by '.$user_name. ' ['. localtime(time).'] --</b><br>'.$comment.'<br>';
}
print_log "[INFO] Adding event '$event' for agent '$agent_name' \n\n";
# Base64 encode custom data
@ -4148,9 +4136,6 @@ sub cli_create_event() {
$id_alert_agent_module = 0;
}
if (defined($comment) && $comment ne '') {
$comment = '<b>-- Added comment by '.$user_name. ' ['. localtime(time).'] --</b><br>'.$comment.'<br>';
}
print_log "[INFO] Adding event '$event' for agent '$agent_name' \n\n";
# Base64 encode custom data