diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh
index 90c4bf6519..10e5534459 100755
--- a/extras/pandora_update_version.sh
+++ b/extras/pandora_update_version.sh
@@ -54,7 +54,8 @@ AGENT_WIN_FILE="$CODEHOME/pandora_agents/win32/pandora.cc"
AGENT_WIN_MPI_FILE="$CODEHOME/pandora_agents/win32/installer/pandora.mpi"
AGENT_WIN_RC_FILE="$CODEHOME/pandora_agents/win32/versioninfo.rc"
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
-PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_server/util/plugin/vmware-plugin.pl \
+PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_server/util/recon_script/vmware-plugin.pl \
+$PANDHOME_ENT/pandora_server/util/recon_script/pcm_client.pl \
$PANDHOME_ENT/pandora_plugins/NGINX/nginx_requests_queued.pl \
$PANDHOME_ENT/pandora_plugins/Sybase/sybase_plugin.pl \
$PANDHOME_ENT/pandora_plugins/SNMP/dynamic_snmp.pl \
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index c9e01190e9..e9d22f629b 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.731-190215
+Version: 7.0NG.731-190226
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index f50b4ee8dc..64c13e926e 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.731-190215"
+pandora_version="7.0NG.731-190226"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 187f94b41d..bb7d98e310 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.731';
-use constant AGENT_BUILD => '190215';
+use constant AGENT_BUILD => '190226';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 16bf75ef2f..d4e33903d4 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.731
-%define release 190215
+%define release 190226
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 1dd06bf43e..87436366bb 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.731
-%define release 190215
+%define release 190226
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 340a0c2712..3ff9b6a963 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.731"
-PI_BUILD="190215"
+PI_BUILD="190226"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index b7dff2f2ec..abdf2e0ce4 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{190215}
+{190226}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 48aba959cb..01f027089d 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.731(Build 190215)")
+#define PANDORA_VERSION ("7.0NG.731(Build 190226)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 2b58063706..cb30f2163d 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.731(Build 190215))"
+ VALUE "ProductVersion", "(7.0NG.731(Build 190226))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 12ecde5daf..fe87752dff 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.731-190215
+Version: 7.0NG.731-190226
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 0171643ae5..60d17de09e 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.731-190215"
+pandora_version="7.0NG.731-190226"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/mr/25.sql b/pandora_console/extras/mr/25.sql
new file mode 100644
index 0000000000..0809bc486e
--- /dev/null
+++ b/pandora_console/extras/mr/25.sql
@@ -0,0 +1,147 @@
+START TRANSACTION;
+
+UPDATE `twidget` SET `unique_name`='example' WHERE `class_name` LIKE 'WelcomeWidget';
+
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
+
+ALTER TABLE `trecon_task` ADD COLUMN `wmi_enabled` tinyint(1) unsigned DEFAULT '0';
+ALTER TABLE `trecon_task` ADD COLUMN `auth_strings` text;
+ALTER TABLE `trecon_task` ADD COLUMN `autoconfiguration_enabled` tinyint(1) unsigned default '0';
+
+
+INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Discovery.Application.VMware', 'Discovery Application script to monitor VMware technologies (ESXi, VCenter, VSphere)', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration file","help":"","value":"","hide":""}}');
+INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Discovery.Cloud', 'Discovery Cloud script to monitor Cloud technologies (AWS.EC2, AWS.S3, AWS.RDS, RDS,ȊWS.EKS)', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration file","help":"","value":"","hide":""}}');
+
+CREATE TABLE IF NOT EXISTS `tevent_extended` (
+ `id` serial PRIMARY KEY,
+ `id_evento` bigint(20) unsigned NOT NULL,
+ `external_id` bigint(20) unsigned,
+ `utimestamp` bigint(20) NOT NULL default '0',
+ `description` text,
+ FOREIGN KEY `tevent_ext_fk`(`id_evento`) REFERENCES `tevento`(`id_evento`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `tnotification_source` (
+ `id` serial,
+ `description` VARCHAR(255) DEFAULT NULL,
+ `icon` text,
+ `max_postpone_time` int(11) DEFAULT NULL,
+ `enabled` int(1) DEFAULT NULL,
+ `user_editable` int(1) DEFAULT NULL,
+ `also_mail` int(1) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `tnotification_source`
+--
+INSERT INTO `tnotification_source`(`description`, `icon`, `max_postpone_time`, `enabled`, `user_editable`, `also_mail`) VALUES
+ ("System status", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Message", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Pending task", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Advertisement", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Official communication", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Sugerence", "icono_info_mr.png", 86400, 1, 1, 0);
+
+-- -----------------------------------------------------
+-- Table `tmensajes`
+-- -----------------------------------------------------
+ALTER TABLE `tmensajes` ADD COLUMN `url` TEXT;
+ALTER TABLE `tmensajes` ADD COLUMN `response_mode` VARCHAR(200) DEFAULT NULL;
+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 INDEX (`id_source`);
+UPDATE `tmensajes` SET `id_source`=(SELECT `id` FROM `tnotification_source` WHERE `description` = "Message");
+ALTER TABLE `tmensajes` ADD CONSTRAINT `tsource_fk` FOREIGN KEY (`id_source`) REFERENCES `tnotification_source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+
+CREATE TABLE IF NOT EXISTS `tnotification_user` (
+ `id_mensaje` INT(10) UNSIGNED NOT NULL,
+ `id_user` VARCHAR(60) NOT NULL,
+ `utimestamp_read` BIGINT(20),
+ `utimestamp_erased` BIGINT(20),
+ `postpone` INT,
+ PRIMARY KEY (`id_mensaje`,`id_user`),
+ FOREIGN KEY (`id_mensaje`) REFERENCES `tmensajes`(`id_mensaje`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_user`) REFERENCES `tusuario`(`id_user`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `tnotification_group` (
+ `id_mensaje` INT(10) UNSIGNED NOT NULL,
+ `id_group` mediumint(4) UNSIGNED NOT NULL,
+ PRIMARY KEY (`id_mensaje`,`id_group`),
+ FOREIGN KEY (`id_mensaje`) REFERENCES `tmensajes`(`id_mensaje`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `tnotification_source_user` (
+ `id_source` BIGINT(20) UNSIGNED NOT NULL,
+ `id_user` VARCHAR(60),
+ `enabled` INT(1) DEFAULT NULL,
+ `also_mail` INT(1) DEFAULT NULL,
+ PRIMARY KEY (`id_source`,`id_user`),
+ FOREIGN KEY (`id_source`) REFERENCES `tnotification_source`(`id`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_user`) REFERENCES `tusuario`(`id_user`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `tnotification_source_group` (
+ `id_source` BIGINT(20) UNSIGNED NOT NULL,
+ `id_group` mediumint(4) unsigned NOT NULL,
+ PRIMARY KEY (`id_source`,`id_group`),
+ INDEX (`id_group`),
+ FOREIGN KEY (`id_source`) REFERENCES `tnotification_source`(`id`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `tnotification_source_group_user`(
+ `id_source` BIGINT(20) UNSIGNED NOT NULL,
+ `id_group` mediumint(4) unsigned NOT NULL,
+ `id_user` VARCHAR(60),
+ `enabled` INT(1) DEFAULT NULL,
+ `also_mail` INT(1) DEFAULT NULL,
+ PRIMARY KEY (`id_source`,`id_user`),
+ FOREIGN KEY (`id_source`) REFERENCES `tnotification_source`(`id`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_user`) REFERENCES `tusuario`(`id_user`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_group`) REFERENCES `tnotification_source_group`(`id_group`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES ('Generate Notification','Internal type','This command allows you to send an internal notification to any user or group.',1,'[\"Destination user\",\"Destination group\",\"Title\",\"Message\",\"Link\",\"Criticity\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
+
+INSERT INTO `tnotification_source_user` (`id_source`, `id_user`, `enabled`, `also_mail`) VALUES ((SELECT `id` FROM `tnotification_source` WHERE `description`="System status"), "admin", 1, 0);
+INSERT INTO `tnotification_source_group` SELECT `id`,0 FROM `tnotification_source` WHERE `description`="Message";
+INSERT INTO `tnotification_user` (`id_mensaje`, `id_user`) SELECT `id_mensaje`, `id_usuario_destino` FROM `tmensajes` WHERE `id_usuario_destino` != '';
+
+INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Apache accesses per client and status',
+'(.*?)\ -.*1.1"\ (\d+)\ \d+',
+'host,status', 1);
+
+INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Apache time per requester and html code',
+'(.*?)\ -.*1.1"\ (\d+)\ (\d+)',
+'origin,respose,_time_', 1);
+
+INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Count output',
+'.*',
+'Coincidences', 0);
+
+INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Events replicated to metaconsole',
+'.* (.*?) .* (\d+) events replicated to metaconsole',
+'server,_events_', 0);
+
+INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Pages with warnings',
+'PHP Warning:.*in (.*?) on',
+'page', 0);
+
+INSERT INTO tlog_graph_models (`title`,`regexp`,`fields`,`average`) VALUES ('Users login',
+'Starting Session \d+\ of user (.*)',
+'user', 0);
+
+COMMIT;
diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php
index 4a0b32de81..519b4b32a5 100644
--- a/pandora_console/extras/pandora_diag.php
+++ b/pandora_console/extras/pandora_diag.php
@@ -137,8 +137,8 @@ function get_logs_size($file)
function get_status_logs($path)
{
$status_server_log = '';
- $size_server_log = get_logs_size($path);
- if ($size_server_log <= 10240) {
+ $size_server_log = number_format(get_logs_size($path));
+ if ($size_server_log <= 1048576) {
$status_server_log = "Normal Status   You have less than 10 MB of logs";
} else {
$status_server_log = "Warning Status   You have more than 10 MB of logs";
@@ -412,11 +412,7 @@ render_info_data(
render_info_data('SELECT COUNT(*) FROM tagente_modulo', 'Total modules');
render_info_data('SELECT COUNT(*) FROM tgrupo', 'Total groups');
render_info_data('SELECT COUNT(*) FROM tagente_datos', 'Total module data records');
- // render_info_data ("SELECT COUNT(*) FROM tagente_datos_string","Total module string data records");
- // render_info_data ("SELECT COUNT(*) FROM tagente_datos_log4x","Total module log4x data records");
render_info_data('SELECT COUNT(*) FROM tagent_access', 'Total agent access record');
- // render_info ("tagente_estado");
- // render_info ("talert_template_modules");
render_info_data('SELECT COUNT(*) FROM tevento', 'Total events');
if ($config['enterprise_installed']) {
@@ -700,7 +696,7 @@ render_info_data(
render_row(status_values($read_rnd_buffer_size_min_rec_value, $read_rnd_buffer_size), 'Read rnd-buffer size ', 'Read rnd-buffer size ');
render_row(status_values($query_cache_min_res_unit_min_rec_value, $query_cache_min_res_unit), 'Query cache min-res-unit ', 'Query cache min-res-unit ');
render_row(status_values($innodb_file_per_table_min_rec_value, $innodb_file_per_table), 'InnoDB file per table ', 'InnoDB file per table ');
- echo "
".__('Tables fragmentation in the PandoraFMS database').' |
';
+ echo "".__('Tables fragmentation in the Pandora FMS database').' |
';
@@ -708,14 +704,14 @@ render_info_data(
render_row(number_format($tables_fragmentation, 2).'%', 'Tables fragmentation (current value)');
render_row(status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation), 'Status fragmentation tables');
- echo "".__(' PandoraFMS logs dates').' |
';
+ echo "".__(' Pandora FMS logs dates').' |
';
- render_row(number_format((get_logs_size($path_server_logs) / 1024), 2).'M', 'Size server logs (current value)');
+ render_row(number_format((get_logs_size($path_server_logs) / 1048576), 3).'M', 'Size server logs (current value)');
render_row(get_status_logs($path_server_logs), 'Status server logs');
- render_row(number_format((get_logs_size($path_console_logs) / 1024), 2).'M', 'Size console logs (current value)');
+ render_row(number_format((get_logs_size($path_console_logs) / 1048576), 3).'M', 'Size console logs (current value)');
render_row(get_status_logs($path_console_logs), 'Status console logs');
- echo "".__(' PandoraFMS Licence Information').' |
';
+ echo "".__(' Pandora FMS Licence Information').' |
';
render_row(html_print_textarea('keys[customer_key]', 10, 255, $settings->customer_key, 'style="height:40px; width:450px;"', true), 'Customer key');
render_row($license['expiry_date'], 'Expires');
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index bedb9927cd..2492a9913f 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -1206,6 +1206,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview',
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '731');
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
-- ---------------------------------------------------------------------
-- Table `tconfig_os`
@@ -1406,12 +1407,16 @@ ALTER TABLE twidget_dashboard MODIFY options LONGTEXT NOT NULL default "";
ALTER TABLE trecon_task ADD `alias_as_name` int(2) unsigned default '0';
ALTER TABLE trecon_task ADD `snmp_enabled` int(2) unsigned default '0';
ALTER TABLE trecon_task ADD `vlan_enabled` int(2) unsigned default '0';
+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';
-- ---------------------------------------------------------------------
-- Table `twidget` AND Table `twidget_dashboard`
-- ---------------------------------------------------------------------
UPDATE twidget_dashboard SET id_widget = (SELECT id FROM twidget WHERE unique_name = 'graph_module_histogram') WHERE id_widget = (SELECT id FROM twidget WHERE unique_name = 'graph_availability');
DELETE FROM twidget WHERE unique_name = 'graph_availability';
+UPDATE `twidget` SET `unique_name`='example' WHERE `class_name` LIKE 'WelcomeWidget';
-- ---------------------------------------------------------------------
-- Table `tbackup` (Extension table. Modify only if exists)
@@ -1816,7 +1821,30 @@ CREATE TABLE IF NOT EXISTS `tlog_graph_models` (
INSERT INTO tlog_graph_models VALUES (1, 'Apache log model',
'^.*?\s+.*".*?\s(\/.*?)\?.*1.1"\s+(.*?)\s+(.*?)\s+',
'pagina, html_err_code, _tiempo_', 1);
-
+
+INSERT INTO tlog_graph_models VALUES (2, 'Apache accesses per client and status',
+'(.*?)\ -.*1.1"\ (\d+)\ \d+',
+'host,status', 1);
+
+INSERT INTO tlog_graph_models VALUES (3, 'Apache time per requester and html code',
+'(.*?)\ -.*1.1"\ (\d+)\ (\d+)',
+'origin,respose,_time_', 1);
+
+INSERT INTO tlog_graph_models VALUES (4, 'Count output',
+'.*',
+'Coincidences', 0);
+
+INSERT INTO tlog_graph_models VALUES (5, 'Events replicated to metaconsole',
+'.* (.*?) .* (\d+) events replicated to metaconsole',
+'server,_events_', 0);
+
+INSERT INTO tlog_graph_models VALUES (6, 'Pages with warnings',
+'PHP Warning:.*in (.*?) on',
+'page', 0);
+
+INSERT INTO tlog_graph_models VALUES (7, 'Users login',
+'Starting Session \d+\ of user (.*)',
+'user', 0);
-- -----------------------------------------------------
-- Add column in table `treport`
-- -----------------------------------------------------
@@ -1856,6 +1884,19 @@ ALTER TABLE `tevento` ADD COLUMN `data` double(22,5) default NULL;
ALTER TABLE `tevento` ADD COLUMN `module_status` int(4) NOT NULL default '0';
+-- ---------------------------------------------------------------------
+-- Table `tevent_extended`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tevent_extended` (
+ `id` serial PRIMARY KEY,
+ `id_evento` bigint(20) unsigned NOT NULL,
+ `external_id` bigint(20) unsigned,
+ `utimestamp` bigint(20) NOT NULL default '0',
+ `description` text,
+ FOREIGN KEY `tevent_ext_fk`(`id_evento`) REFERENCES `tevento`(`id_evento`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
-- -----------------------------------------------------
-- Table `tgis_map_layer_groups`
-- -----------------------------------------------------
@@ -1868,3 +1909,128 @@ CREATE TABLE IF NOT EXISTS `tgis_map_layer_groups` (
FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE,
FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- -----------------------------------------------------
+-- Table `tnotification_source`
+-- -----------------------------------------------------
+CREATE TABLE `tnotification_source` (
+ `id` serial,
+ `description` VARCHAR(255) DEFAULT NULL,
+ `icon` text,
+ `max_postpone_time` int(11) DEFAULT NULL,
+ `enabled` int(1) DEFAULT NULL,
+ `user_editable` int(1) DEFAULT NULL,
+ `also_mail` int(1) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `tnotification_source`
+--
+INSERT INTO `tnotification_source`(`description`, `icon`, `max_postpone_time`, `enabled`, `user_editable`, `also_mail`) VALUES
+ ("System status", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Message", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Pending task", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Advertisement", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Official communication", "icono_info_mr.png", 86400, 1, 1, 0),
+ ("Sugerence", "icono_info_mr.png", 86400, 1, 1, 0);
+
+-- -----------------------------------------------------
+-- Table `tmensajes`
+-- -----------------------------------------------------
+ALTER TABLE `tmensajes` ADD COLUMN `url` TEXT;
+ALTER TABLE `tmensajes` ADD COLUMN `response_mode` VARCHAR(200) DEFAULT NULL;
+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;
+
+
+-- ----------------------------------------------------------------------
+-- Table `tnotification_user`
+-- ----------------------------------------------------------------------
+CREATE TABLE `tnotification_user` (
+ `id_mensaje` INT(10) UNSIGNED NOT NULL,
+ `id_user` VARCHAR(60) NOT NULL,
+ `utimestamp_read` BIGINT(20),
+ `utimestamp_erased` BIGINT(20),
+ `postpone` INT,
+ PRIMARY KEY (`id_mensaje`,`id_user`),
+ FOREIGN KEY (`id_mensaje`) REFERENCES `tmensajes`(`id_mensaje`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_user`) REFERENCES `tusuario`(`id_user`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------------------------------------------------
+-- Table `tnotification_group`
+-- ----------------------------------------------------------------------
+CREATE TABLE `tnotification_group` (
+ `id_mensaje` INT(10) UNSIGNED NOT NULL,
+ `id_group` mediumint(4) UNSIGNED NOT NULL,
+ PRIMARY KEY (`id_mensaje`,`id_group`),
+ FOREIGN KEY (`id_mensaje`) REFERENCES `tmensajes`(`id_mensaje`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------------------------------------------------
+-- Table `tnotification_source_user`
+-- ----------------------------------------------------------------------
+CREATE TABLE `tnotification_source_user` (
+ `id_source` BIGINT(20) UNSIGNED NOT NULL,
+ `id_user` VARCHAR(60),
+ `enabled` INT(1) DEFAULT NULL,
+ `also_mail` INT(1) DEFAULT NULL,
+ PRIMARY KEY (`id_source`,`id_user`),
+ FOREIGN KEY (`id_source`) REFERENCES `tnotification_source`(`id`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_user`) REFERENCES `tusuario`(`id_user`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------------------------------------------------
+-- Table `tnotification_source_group`
+-- ----------------------------------------------------------------------
+CREATE TABLE `tnotification_source_group` (
+ `id_source` BIGINT(20) UNSIGNED NOT NULL,
+ `id_group` mediumint(4) unsigned NOT NULL,
+ PRIMARY KEY (`id_source`,`id_group`),
+ INDEX (`id_group`),
+ FOREIGN KEY (`id_source`) REFERENCES `tnotification_source`(`id`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------------------------------------------------
+-- Table `tnotification_source_user`
+-- ----------------------------------------------------------------------
+CREATE TABLE `tnotification_source_group_user` (
+ `id_source` BIGINT(20) UNSIGNED NOT NULL,
+ `id_group` mediumint(4) unsigned NOT NULL,
+ `id_user` VARCHAR(60),
+ `enabled` INT(1) DEFAULT NULL,
+ `also_mail` INT(1) DEFAULT NULL,
+ PRIMARY KEY (`id_source`,`id_user`),
+ FOREIGN KEY (`id_source`) REFERENCES `tnotification_source`(`id`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_user`) REFERENCES `tusuario`(`id_user`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (`id_group`) REFERENCES `tnotification_source_group`(`id_group`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------------------------------------------------
+-- Add alert command 'Generate notification'
+-- ----------------------------------------------------------------------
+INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES ('Generate Notification','Internal type','This command allows you to send an internal notification to any user or group.',1,'[\"Destination user\",\"Destination group\",\"Title\",\"Message\",\"Link\",\"Criticity\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
+
+-- ----------------------------------------------------------------------
+-- Update message references and pre-configure notifications
+-- ----------------------------------------------------------------------
+INSERT INTO `tnotification_source_user` (`id_source`, `id_user`, `enabled`, `also_mail`) VALUES ((SELECT `id` FROM `tnotification_source` WHERE `description`="System status"), "admin", 1, 0);
+INSERT INTO `tnotification_source_group` SELECT `id`,0 FROM `tnotification_source` WHERE `description`="Message";
+INSERT INTO `tnotification_user` (`id_mensaje`, `id_user`) SELECT `id_mensaje`, `id_usuario_destino` FROM `tmensajes` WHERE `id_usuario_destino` != '';
+-- ----------------------------------------------------------------------
+-- Add custom internal recon scripts
+-- ----------------------------------------------------------------------
+INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Discovery.Application.VMware', 'Discovery Application script to monitor VMware technologies (ESXi, VCenter, VSphere)', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration file","help":"","value":"","hide":""}}');
+INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Discovery.Cloud', 'Discovery Cloud script to monitor Cloud technologies (AWS.EC2, AWS.S3, AWS.RDS, RDS,ȊWS.EKS)', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration file","help":"","value":"","hide":""}}');
diff --git a/pandora_console/general/firts_task/recon_view.php b/pandora_console/general/firts_task/recon_view.php
index 026d0f5673..2377ce7c20 100755
--- a/pandora_console/general/firts_task/recon_view.php
+++ b/pandora_console/general/firts_task/recon_view.php
@@ -15,17 +15,17 @@ global $config;
check_login();
ui_require_css_file('firts_task');
?>
- true, 'message' => __('There are no recon task defined yet.') ]); ?>
+ true, 'message' => __('There are no discovery tasks defined yet.') ]); ?>
- __('Recon server')]); ?>
+ __('Discovery server')]); ?>
-
+
ICMP (pings),
SNMP (detecting the topology of networks and their interfaces), and other customized
@@ -33,8 +33,8 @@ ui_require_css_file('firts_task');
);
?>
-
diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php
index 846f20677b..e35d401502 100644
--- a/pandora_console/general/header.php
+++ b/pandora_console/general/header.php
@@ -1,5 +1,4 @@
cellspacing = 0;
$table->head = [];
$table->data = [];
- $table->style[0] = $table->style['clippy'] = $table->style[1] = $table->style[3] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
+ $table->style['clippy'] = $table->style[1] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = $table->style['notifications'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
$table->style[7] = 'width: 20px; padding-right: 9px;';
$table->style['searchbar'] = 'width: 180px; min-width: 180px;';
$table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
@@ -110,27 +110,6 @@ config_check();
$table->data[0]['searchbar'] = $search_bar;
}
- // Servers check
- $servers = [];
- $servers['all'] = (int) db_get_value('COUNT(id_server)', 'tserver');
- $servers['up'] = (int) servers_check_status();
- $servers['down'] = ($servers['all'] - $servers['up']);
- if ($servers['up'] == 0) {
- // All Servers down or no servers at all
- $servers_check_img = html_print_image('images/header_down.png', true, ['alt' => 'cross', 'class' => 'bot', 'title' => __('All systems').': '.__('Down')]);
- } else if ($servers['down'] != 0) {
- // Some servers down
- $servers_check_img = html_print_image('images/header_warning.png', true, ['alt' => 'error', 'class' => 'bot', 'title' => $servers['down'].' '.__('servers down')]);
- } else {
- // All servers up
- $servers_check_img = html_print_image('images/header_ready.png', true, ['alt' => 'ok', 'class' => 'bot', 'title' => __('All systems').': '.__('Ready')]);
- }
-
- unset($servers);
- // Since this is the header, we don't like to trickle down variables.
- $servers_link_open = '';
- $servers_link_close = '';
-
if ($config['show_qr_code_header'] == 0) {
$show_qr_code_header = 'display: none;';
} else {
@@ -175,12 +154,6 @@ config_check();
).'';
}
-
- $table->data[0][0] = $servers_link_open.$servers_check_img.$servers_link_close;
-
-
-
-
// ======= Autorefresh code =============================
$autorefresh_txt = '';
$autorefresh_additional = '';
@@ -254,57 +227,8 @@ config_check();
$table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close;
$table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional;
// ======================================================
- $check_minor_release_available = false;
$pandora_management = check_acl($config['id_user'], 0, 'PM');
- $check_minor_release_available = db_check_minor_relase_available();
-
- if ($check_minor_release_available) {
- if (users_is_admin($config['id_user'])) {
- if ($config['language'] == 'es') {
- set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. '.__('Sobre actualización de revisión menor').'', 'Revisión/es menor/es disponible/s');
- } else {
- set_pandora_error_for_header('There are one or more minor releases waiting for update. '.__('About minor release update').'', 'minor release/s available');
- }
- }
- }
-
- echo '';
-
- if ($config['alert_cnt'] > 0) {
- $maintenance_link = 'javascript:';
- $maintenance_title = __('System alerts detected - Please fix as soon as possible');
- $maintenance_class = $maintenance_id = 'show_systemalert_dialog white';
-
- $maintenance_link_open_txt = '';
- $maintenance_link_open_img = '';
- $maintenance_link_close = '';
- if (!$pandora_management) {
- $maintenance_img = '';
- } else {
- $maintenance_img = $maintenance_link_open_img.html_print_image(
- 'images/header_yellow.png',
- true,
- [
- 'title' => __(
- 'You have %d warning(s)',
- $config['alert_cnt']
- ),
- 'id' => 'yougotalert',
- 'class' => 'bot',
- ]
- ).$maintenance_link_close;
- }
- } else {
- if (!$pandora_management) {
- $maintenance_img = '';
- } else {
- $maintenance_img = html_print_image('images/header_ready.png', true, ['title' => __('There are not warnings'), 'id' => 'yougotalert', 'class' => 'bot']);
- }
- }
-
- $table->data[0][3] = $maintenance_img;
-
// Main help icon
if (!$config['disable_help']) {
$table->data[0][4] = '';
}
+ $notifications_numbers = notifications_get_counters();
+ $table->data[0]['notifications'] = notifications_print_ball(
+ $notifications_numbers['notifications'],
+ $notifications_numbers['last_id']
+ );
+
// Logout
$table->data[0][5] = '';
$table->data[0][5] .= html_print_image('images/header_logout.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
@@ -341,18 +271,6 @@ config_check();
$table->data[0][8] .= '';
$table->data[0][8] .= '';
- // Messages
- $msg_cnt = messages_get_count($config['id_user']);
- if ($msg_cnt > 0) {
- echo '';
-
- $table->data[0][9] = '';
- $table->data[0][9] .= html_print_image('images/header_email.png', true, ['title' => __('You have %d unread message(s)', $msg_cnt), 'id' => 'yougotmail', 'class' => 'bot', 'style' => 'width:24px;']);
- $table->data[0][9] .= '';
- }
-
-
-
html_print_table($table);
unset($table);
@@ -373,6 +291,9 @@ config_check();
+
+
+
+
\ No newline at end of file
diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index 004c947af4..143d6d880b 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -229,14 +229,14 @@ if (!$new_agent) {
$table->data[0][1] .= " ".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'';
}
-$table->data[1][0] = __('Alias');
+$table->data[1][0] = __('Alias').ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'';
$table->data[1][1] = html_print_input_text('alias', $alias, '', 50, 100, true);
if ($new_agent) {
$table->data[1][1] .= html_print_checkbox('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name');
}
$table->data[2][0] = __('IP Address');
-$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true);
+$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).html_print_checkbox('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
if ($id_agente) {
$table->data[2][1] .= ' ';
diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index dfa28988a8..9c10099042 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -81,6 +81,7 @@ $alias_as_name = 0;
$direccion_agente = get_parameter('direccion', '');
$direccion_agente = trim(io_safe_output($direccion_agente));
$direccion_agente = io_safe_input($direccion_agente);
+$unique_ip = 0;
$intervalo = SECONDS_5MINUTES;
$ff_interval = 0;
$quiet_module = 0;
@@ -158,9 +159,11 @@ $module_macros = [];
// Create agent
if ($create_agent) {
$mssg_warning = 0;
- $alias = (string) get_parameter_post('alias', '');
+ $alias_safe_output = io_safe_output(get_parameter('alias', ''));
+ $alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post('direccion', '');
+ $unique_ip = (int) get_parameter_post('unique_ip', 0);
// safe_output only validate ip
$direccion_agente = trim(io_safe_output($direccion_agente));
@@ -216,7 +219,12 @@ if ($create_agent) {
$nombre_agente = $alias;
}
- if (!$exists_alias) {
+ if ($unique_ip && $direccion_agente != '') {
+ $sql = 'SELECT direccion FROM tagente WHERE direccion = "'.$direccion_agente.'"';
+ $exists_ip = db_get_row_sql($sql);
+ }
+
+ if (!$exists_alias && !$exists_ip) {
$id_agente = db_process_sql_insert(
'tagente',
[
@@ -326,6 +334,8 @@ if ($create_agent) {
$agent_creation_error = __('Could not be created');
if ($exists_alias) {
$agent_creation_error = __('Could not be created, because name already exists');
+ } else if ($exists_ip) {
+ $agent_creation_error = __('Could not be created, because IP already exists');
}
}
}
@@ -755,9 +765,11 @@ if ($update_agent) {
$mssg_warning = 0;
$id_agente = (int) get_parameter_post('id_agente');
$nombre_agente = str_replace('`', '‘', (string) get_parameter_post('agente', ''));
- $alias = str_replace('`', '‘', (string) get_parameter_post('alias', ''));
+ $alias_safe_output = io_safe_output(get_parameter('alias', ''));
+ $alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
$direccion_agente = (string) get_parameter_post('direccion', '');
+ $unique_ip = (int) get_parameter_post('unique_ip', 0);
// safe_output only validate ip
$direccion_agente = trim(io_safe_output($direccion_agente));
@@ -860,8 +872,15 @@ if ($update_agent) {
// If there is an agent with the same name, but a different ID
}
+ if ($unique_ip && $direccion_agente != '') {
+ $sql = 'SELECT direccion FROM tagente WHERE direccion = "'.$direccion_agente.'"';
+ $exists_ip = db_get_row_sql($sql);
+ }
+
if ($grupo <= 0) {
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
+ } else if ($exists_ip) {
+ ui_print_error_message(__('Duplicate main IP address'));
} else {
// If different IP is specified than previous, add the IP
if ($direccion_agente != ''
@@ -915,7 +934,7 @@ if ($update_agent) {
$result = db_process_sql_update('tagente', $values, ['id_agente' => $id_agente]);
- if ($result == false && $update_custom_result == false) {
+ if ($result === false && $update_custom_result == false) {
ui_print_error_message(
__('There was a problem updating the agent')
);
diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php
index 0eb5fad7cd..11402c8ca6 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_network.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_network.php
@@ -128,7 +128,7 @@ $snmp_versions['2c'] = 'v. 2c';
$snmp_versions['3'] = 'v. 3';
$data = [];
-$data[0] = __('SNMP community');
+$data[0] = __('SNMP community').ui_print_help_icon('column_macros', true);
$adopt = false;
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && isset($id_agent_module)) {
$adopt = policies_is_module_adopt($id_agent_module);
@@ -277,7 +277,7 @@ if (!isset($id_agent_module)) {
}
$data = [];
-$data[0] = __('Auth user');
+$data[0] = __('Auth user').ui_print_help_icon('column_macros', true);
$data[1] = html_print_input_text(
'snmp3_auth_user',
$snmp3_auth_user,
@@ -290,7 +290,7 @@ $data[1] = html_print_input_text(
'',
$classdisabledBecauseInPolicy
);
-$data[2] = __('Auth password').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
+$data[2] = __('Auth password').ui_print_help_icon('column_macros', true).ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[3] = html_print_input_password(
'snmp3_auth_pass',
$snmp3_auth_pass,
@@ -312,7 +312,7 @@ push_table_simple($data, 'field_snmpv3_row1');
$data = [];
$data[0] = __('Privacy method');
$data[1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true, false, false, '', $disabledBecauseInPolicy);
-$data[2] = __('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
+$data[2] = __('Privacy pass').ui_print_help_icon('column_macros', true).ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[3] = html_print_input_password(
'snmp3_privacy_pass',
$snmp3_privacy_pass,
diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php
index e7f38447cf..d15cd6477f 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php
@@ -60,7 +60,7 @@ $data[3] = html_print_input_text(
push_table_simple($data, 'target_ip');
$data = [];
-$data[0] = __('Username');
+$data[0] = __('Username').ui_print_help_icon('column_macros', true);
$data[1] = html_print_input_text(
'plugin_user',
$plugin_user,
@@ -73,7 +73,7 @@ $data[1] = html_print_input_text(
'',
$classdisabledBecauseInPolicy
);
-$data[2] = __('Password');
+$data[2] = __('Password').ui_print_help_icon('column_macros', true);
$data[3] = html_print_input_password(
'plugin_pass',
$plugin_pass,
diff --git a/pandora_console/godmode/agentes/status_monitor_custom_fields.php b/pandora_console/godmode/agentes/status_monitor_custom_fields.php
new file mode 100644
index 0000000000..7e9ae48bdd
--- /dev/null
+++ b/pandora_console/godmode/agentes/status_monitor_custom_fields.php
@@ -0,0 +1,272 @@
+ 'status_monitor_fields',
+ 'value' => $status_monitor_fields,
+ ];
+
+ // update 'status_monitor_fields' in tconfig table to keep the value at update.
+ $result = db_process_sql_update(
+ 'tconfig',
+ $values,
+ ['token' => 'status_monitor_fields']
+ );
+
+ ui_print_result_message($result, __('Successfully updated'), __('Could not be updated'));
+
+ $config['status_monitor_fields'] = $status_monitor_fields;
+}
+
+$fields_selected = [];
+$status_monitor_fields = '';
+$fields_selected = explode(',', $config['status_monitor_fields']);
+
+$result_selected = [];
+
+// show list of fields selected.
+if ($fields_selected[0] != '') {
+ foreach ($fields_selected as $field_selected) {
+ switch ($field_selected) {
+ case 'policy':
+ $result = __('Policy');
+ break;
+
+ case 'agent':
+ $result = __('Agent');
+ break;
+
+ case 'data_type':
+ $result = __('Data type');
+ break;
+
+ case 'module_name':
+ $result = __('Module name');
+ break;
+
+ case 'server_type':
+ $result = __('Server type');
+ break;
+
+ case 'interval':
+ $result = __('Interval');
+ break;
+
+ case 'status':
+ $result = __('Status');
+ break;
+
+ case 'graph':
+ $result = __('Graph');
+ break;
+
+ case 'warn':
+ $result = __('Warn');
+ break;
+
+ case 'data':
+ $result = __('Data');
+ break;
+
+ case 'timestamp':
+ $result = __('Timestamp');
+ break;
+
+ case 'to_critical':
+ $result = __('Last status change');
+ break;
+ }
+
+ $result_selected[$field_selected] = $result;
+ }
+}
+
+echo ''.__('Show monitor detail fields').'
';
+
+$table = new stdClass();
+$table->width = '100%';
+$table->class = 'databox filters';
+
+$table->size = [];
+// ~ $table->size[0] = '20%';
+$table->size[1] = '10px';
+// ~ $table->size[2] = '20%';
+$table->style[0] = 'text-align:center;';
+$table->style[2] = 'text-align:center;';
+
+$table->data = [];
+
+$fields_available = [];
+
+$fields_available['policy'] = __('Policy');
+$fields_available['agent'] = __('Agent');
+$fields_available['data_type'] = __('Data type');
+$fields_available['module_name'] = __('Module name');
+$fields_available['server_type'] = __('Server type');
+$fields_available['interval'] = __('Interval');
+$fields_available['status'] = __('Status');
+$fields_available['graph'] = __('Graph');
+$fields_available['warn'] = __('Warn');
+$fields_available['data'] = __('Data');
+$fields_available['timestamp'] = __('Timestamp');
+$fields_available['to_critical'] = __('Last status change');
+
+// remove fields already selected
+foreach ($fields_available as $key => $available) {
+ foreach ($result_selected as $selected) {
+ if ($selected == $available) {
+ unset($fields_available[$key]);
+ }
+ }
+}
+
+$table->data[0][0] = ''.__('Fields available').'';
+$table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px');
+$table->data[1][1] = ''.html_print_image(
+ 'images/darrowright.png',
+ true,
+ [
+ 'id' => 'right',
+ 'title' => __('Add fields to select'),
+ ]
+).'';
+$table->data[1][1] .= '
'.html_print_image(
+ 'images/darrowleft.png',
+ true,
+ [
+ 'id' => 'left',
+ 'title' => __('Delete fields to select'),
+ ]
+).'';
+
+$table->data[0][1] = '';
+$table->data[0][2] = ''.__('Fields selected').'';
+$table->data[1][2] = html_print_select(
+ $result_selected,
+ 'fields_selected[]',
+ true,
+ '',
+ '',
+ 0,
+ true,
+ true,
+ false,
+ '',
+ false,
+ 'width: 300px'
+);
+
+echo '