diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index 17af72510d..245a30ef4c 100644
--- a/pandora_agents/pc/AIX/pandora_agent.conf
+++ b/pandora_agents/pc/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, AIX version
+# Version 7.0NG.725, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf
index 5ddcfbf6d9..0fc2927c2f 100644
--- a/pandora_agents/pc/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, FreeBSD Version
+# Version 7.0NG.725, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf
index a1c9b17c55..c97115d409 100644
--- a/pandora_agents/pc/HP-UX/pandora_agent.conf
+++ b/pandora_agents/pc/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, HP-UX Version
+# Version 7.0NG.725, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf
index d62e268b24..a0d7d5ea8d 100644
--- a/pandora_agents/pc/Linux/pandora_agent.conf
+++ b/pandora_agents/pc/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, GNU/Linux
+# Version 7.0NG.725, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf
index 1450b7dc3b..995d0d33d7 100644
--- a/pandora_agents/pc/NT4/pandora_agent.conf
+++ b/pandora_agents/pc/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, GNU/Linux
+# Version 7.0NG.725, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf
index 909148bd3d..fa86fe707d 100644
--- a/pandora_agents/pc/SunOS/pandora_agent.conf
+++ b/pandora_agents/pc/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, Solaris Version
+# Version 7.0NG.725, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf
index 5e3194a8cc..d347375de2 100644
--- a/pandora_agents/pc/Win32/pandora_agent.conf
+++ b/pandora_agents/pc/Win32/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
-# Version 7.0NG.724
+# Version 7.0NG.725
# 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
diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf
index 3b9fe9a7a7..965020560c 100644
--- a/pandora_agents/shellscript/aix/pandora_agent.conf
+++ b/pandora_agents/shellscript/aix/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.724, AIX version
+# Version 7.0NG.725, AIX version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
index 79d8968952..edca5a3c52 100644
--- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
+++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.724
+# Version 7.0NG.725
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena
diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
index e3dfd27731..edec1bb26c 100644
--- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf
+++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.724, HPUX Version
+# Version 7.0NG.725, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index 8acf764a5b..dfe908bae8 100644
--- a/pandora_agents/shellscript/linux/pandora_agent.conf
+++ b/pandora_agents/shellscript/linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724
+# Version 7.0NG.725
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
index a2019f25da..9b1c31e469 100644
--- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf
+++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724
+# Version 7.0NG.725
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf
index 7bd610392f..c7806abd5c 100644
--- a/pandora_agents/shellscript/openWRT/pandora_agent.conf
+++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724
+# Version 7.0NG.725
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf
index 010e99f76b..17bd56f29d 100644
--- a/pandora_agents/shellscript/solaris/pandora_agent.conf
+++ b/pandora_agents/shellscript/solaris/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.724, Solaris version
+# Version 7.0NG.725, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index babed637b9..95cb035609 100644
--- a/pandora_agents/unix/AIX/pandora_agent.conf
+++ b/pandora_agents/unix/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, AIX version
+# Version 7.0NG.725, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index c12981cb8e..2b8a981307 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.724-180723
+Version: 7.0NG.725-180808
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 cbb7845984..a9781baa56 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.724-180723"
+pandora_version="7.0NG.725-180808"
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/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf
index 3b3ca87c5b..c7f2a3547c 100644
--- a/pandora_agents/unix/Darwin/pandora_agent.conf
+++ b/pandora_agents/unix/Darwin/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, GNU/Linux
+# Version 7.0NG.725, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf
index 3b103eab67..f0568cae8f 100644
--- a/pandora_agents/unix/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, FreeBSD Version
+# Version 7.0NG.725, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf
index e8473cc321..77b678de67 100644
--- a/pandora_agents/unix/HP-UX/pandora_agent.conf
+++ b/pandora_agents/unix/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, HP-UX Version
+# Version 7.0NG.725, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf
index a3dd4cccac..754470aa4c 100644
--- a/pandora_agents/unix/Linux/pandora_agent.conf
+++ b/pandora_agents/unix/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, GNU/Linux
+# Version 7.0NG.725, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf
index 19b8c551e1..dde28ceef5 100644
--- a/pandora_agents/unix/NT4/pandora_agent.conf
+++ b/pandora_agents/unix/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, GNU/Linux
+# Version 7.0NG.725, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf
index cf1aaf60b7..682fd6f270 100644
--- a/pandora_agents/unix/NetBSD/pandora_agent.conf
+++ b/pandora_agents/unix/NetBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, NetBSD Version
+# Version 7.0NG.725, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf
index dcd12cda47..7bdcf6fbde 100644
--- a/pandora_agents/unix/SunOS/pandora_agent.conf
+++ b/pandora_agents/unix/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.724, Solaris Version
+# Version 7.0NG.725, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index cef976d906..47bf96bc69 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
-use constant AGENT_VERSION => '7.0NG.724';
-use constant AGENT_BUILD => '180723';
+use constant AGENT_VERSION => '7.0NG.725';
+use constant AGENT_BUILD => '180808';
# 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 d3d19defea..e39eeb3fdc 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.724
-%define release 180723
+%define version 7.0NG.725
+%define release 180808
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 a89db9d8ad..5c8ee9b653 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.724
-%define release 180723
+%define version 7.0NG.725
+%define release 180808
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 5ec0844d5c..cdc4dae675 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
-PI_VERSION="7.0NG.724"
-PI_BUILD="180723"
+PI_VERSION="7.0NG.725"
+PI_BUILD="180808"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/unix/plugins/grep_log b/pandora_agents/unix/plugins/grep_log
index ad45ab2943..2e17210a51 100755
--- a/pandora_agents/unix/plugins/grep_log
+++ b/pandora_agents/unix/plugins/grep_log
@@ -325,7 +325,9 @@ sub print_log ($) {
$output .= "')), false);
+ html_print_input_hidden ('custom_action', urlencode (base64_encode('
')), false);
html_print_input_hidden ('incremental_base', '0');
echo '';
diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.js b/pandora_console/extensions/realtime_graphs/realtime_graphs.js
index 6c535f2e5d..c909fc5b01 100644
--- a/pandora_console/extensions/realtime_graphs/realtime_graphs.js
+++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.js
@@ -1,192 +1,186 @@
-var max_data_plot = 100;
+(function () {
+ var numberOfPoints = 100;
+ var refresh = parseInt($('#refresh').val());
+ var incremental = $('#checkbox-incremental').is(':checked') || $('#hidden-incremental').val() == 1;
+ var lastIncVal = null;
+ var intervalRef = null;
+ var currentXHR = null;
-var options = {
- legend: { container: $("#chartLegend") },
- xaxis: {
- tickFormatter: function (timestamp, axis) {
- var date = new Date(timestamp * 1000);
-
- var server_timezone_offset = get_php_value('timezone_offset');
- var local_timezone_offset = date.getTimezoneOffset()*60*-1;
-
- if (server_timezone_offset != local_timezone_offset) {
- // If timezone of server and client is different, adjust the time to the server
- date = new Date((timestamp + (server_timezone_offset - local_timezone_offset)) * 1000);
+ var plot;
+ var plotOptions = {
+ legend: { container: $("#chartLegend") },
+ xaxis: {
+ tickFormatter: function (timestamp, axis) {
+ var date = new Date(timestamp * 1000);
+
+ var server_timezone_offset = get_php_value('timezone_offset');
+ var local_timezone_offset = date.getTimezoneOffset()*60*-1;
+
+ if (server_timezone_offset != local_timezone_offset) {
+ // If timezone of server and client is different, adjust the time to the server
+ date = new Date((timestamp + (server_timezone_offset - local_timezone_offset)) * 1000);
+ }
+
+ var hours = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
+ var minutes = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
+ var seconds = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
+ var formattedTime = hours + ':' + minutes + ':' + seconds;
+ return formattedTime;
+ }
+ },
+ series: {
+ lines: {
+ lineWidth: 2,
+ fill: true
+ }
+ },
+ colors: ['#6db431']
+ };
+
+ function updatePlot (data) {
+ plot = $.plot($('.graph'), data, plotOptions);
+ }
+
+ function requestData () {
+ var rel_path = $("#hidden-rel_path").val();
+
+ currentXHR = $.ajax({
+ url: rel_path + "extensions/realtime_graphs/ajax.php",
+ type: "POST",
+ dataType: "json",
+ data: {
+ graph: $('#graph :selected').val(),
+ graph_title: $('#graph :selected').html(),
+ snmp_community: $('#text-snmp_community').val(),
+ snmp_oid: $('#text-snmp_oid').val(),
+ snmp_ver: $('#snmp_version :selected').val(),
+ snmp_address: $('#text-ip_target').val(),
+ refresh: refresh
+ },
+ success: function (serie) {
+ var timestamp = serie.data[0][0];
+ var data = plot.getData();
+
+ if (data.length === 0) {
+ for (i = 0; i < numberOfPoints; i++) {
+ var step = i * (refresh / 1000);
+ serie.data.unshift([timestamp - step, 0]);
}
- var hours = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
- var minutes = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
- var seconds = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
- var formattedTime = hours + ':' + minutes + ':' + seconds;
- return formattedTime;
+ serie = [serie];
+ updatePlot(serie);
+ return;
}
+
+ data[0].label = serie.label;
+ if (data[0].data.length >= numberOfPoints) {
+ data[0].data.shift();
+ }
+
+ if (incremental) {
+ var currentVal = serie.data[0][1];
+ // Try to avoid the first value, cause we need at least two values to get the increment
+ serie.data[0][1] = lastIncVal == null ? 0 : currentVal - lastIncVal;
+ // Incremental is always positive
+ if (serie.data[0][1] < 0) serie.data[0][1] = 0;
+ // Store the current value to use it into the next request
+ lastIncVal = currentVal;
+ }
+
+ data[0].data.push(serie.data[0]);
+ updatePlot(data);
+ }
+ });
+ }
+
+ function startDataPooling () {
+ intervalRef = window.setInterval(requestData, refresh);
+ }
+
+ function resetDataPooling () {
+ if (currentXHR !== null) currentXHR.abort();
+ // Stop and start the interval
+ window.clearInterval(intervalRef);
+ startDataPooling();
+ }
+
+ function clearGraph () {
+ var data = plot.getData();
+ if (data.length === 0) return;
+
+ for (i = 0; i < data[0].data.length; i ++) {
+ data[0].data[i][1] = 0;
+ }
+ if (incremental) lastIncVal = null;
+
+ updatePlot(data);
+
+ resetDataPooling();
+ }
+
+ // Set the form OID to the value selected in the SNMP browser
+ function setOID () {
+ if ($('#snmp_browser_version').val() == '3') {
+ $('#text-snmp_oid').val($('#table1-0-1').text());
+ } else {
+ $('#text-snmp_oid').val($('#snmp_selected_oid').text());
+ }
+
+ // Close the SNMP browser
+ $('.ui-dialog-titlebar-close').trigger('click');
+ }
+
+ // Show the SNMP browser window
+ function snmpBrowserWindow () {
+
+ // Keep elements in the form and the SNMP browser synced
+ $('#text-target_ip').val($('#text-ip_target').val());
+ $('#text-community').val($('#text-snmp_community').val());
+ $('#snmp_browser_version').val($('#snmp_version').val());
+ $('#snmp3_browser_auth_user').val($('#snmp3_auth_user').val());
+ $('#snmp3_browser_security_level').val($('#snmp3_security_level').val());
+ $('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val());
+ $('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val());
+ $('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
+ $('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val());
+
+ $("#snmp_browser_container").show().dialog ({
+ title: '',
+ resizable: true,
+ draggable: true,
+ modal: true,
+ overlay: {
+ opacity: 0.5,
+ background: "black"
},
- series: {
- lines: {
- lineWidth: 2,
- fill: true
- }
- },
- colors: ['#6db431']
- }
+ width: 920,
+ height: 500
+ });
+ }
-var data = [];
-
-var id = $('.graph').attr('id');
-var plot = $.plot("#" + id, data, options);
-
-
-var refresh = parseInt($('#refresh').val());
-var incremental = $('#checkbox-incremental').is(':checked') || $('#hidden-incremental').val() == 1;
-var incremental_base = 0;
-var last_inc = 0;
-var to;
-
-refresh_graph();
-
-function refresh_graph () {
- var refresh = parseInt($('#refresh').val());
-
- var postvars = new Array();
- var postvars = {};
- postvars['graph'] = $('#graph :selected').val();
- postvars['graph_title'] = $('#graph :selected').html();
-
- postvars['snmp_community'] = $('#text-snmp_community').val();
- postvars['snmp_oid'] = $('#text-snmp_oid').val();
- postvars['snmp_ver'] = $('#snmp_version :selected').val();
- postvars['snmp_address'] = $('#text-ip_target').val();
-
- postvars['refresh'] = refresh;
-
- var rel_path = $("#hidden-rel_path").val();
-
- $.ajax({
- url: rel_path + "extensions/realtime_graphs/ajax.php",
- type: "POST",
- dataType: "json",
- data: postvars,
- success: function(serie) {
- var timestamp = serie.data[0][0];
- data = plot.getData();
- if (data.length == 0) {
- for(i = 0; i < max_data_plot; i ++) {
- step = i * (refresh/1000);
- serie.data.unshift([timestamp-step, 0]);
- }
-
- serie = [serie];
- plot = $.plot("#" + id, serie, options);
- return;
- }
- data[0].label = serie.label;
- if (data[0].data.length >= max_data_plot) {
- data[0].data.shift();
- }
-
- if (incremental) {
- var last_item = parseInt(data[0].data.length)-1;
- var last_value = data[0].data[last_item][1];
-
- var current_value = serie.data[0][1];
-
- serie.data[0][1] = current_value - last_inc;
-
- last_inc = current_value;
-
- // Incremental is always positive
- if (serie.data[0][1] < 0) {
- serie.data[0][1] = 0;
- }
- }
-
- data[0].data.push(serie.data[0]);
- $.plot("#" + id, data, options);
- }
+ $('#graph').change(function() {
+ $('form#realgraph').submit();
});
- to = window.setTimeout(refresh_graph, refresh);
-}
-$('#graph').change(function() {
- $('form#realgraph').submit();
-});
-
-$('#refresh').change(function() {
- var refresh = parseInt($('#refresh').val());
-
- // Stop and start the Timeout
- clearTimeout(to);
- to = window.setTimeout(refresh_graph, refresh);
-});
-
-// Show the SNMP browser window
-function snmpBrowserWindow () {
-
- // Keep elements in the form and the SNMP browser synced
- $('#text-target_ip').val($('#text-ip_target').val());
- $('#text-community').val($('#text-snmp_community').val());
- $('#snmp_browser_version').val($('#snmp_version').val());
- $('#snmp3_browser_auth_user').val($('#snmp3_auth_user').val());
- $('#snmp3_browser_security_level').val($('#snmp3_security_level').val());
- $('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val());
- $('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val());
- $('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
- $('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val());
-
- $("#snmp_browser_container").show().dialog ({
- title: '',
- resizable: true,
- draggable: true,
- modal: true,
- overlay: {
- opacity: 0.5,
- background: "black"
- },
- width: 920,
- height: 500
+ $('#refresh').change(function () {
+ refresh = parseInt($('#refresh').val());
+ resetDataPooling();
});
-}
-// Set the form OID to the value selected in the SNMP browser
-function setOID () {
-
- if($('#snmp_browser_version').val() == '3'){
- $('#text-snmp_oid').val($('#table1-0-1').text());
- } else {
- $('#text-snmp_oid').val($('#snmp_selected_oid').text());
+ $('#checkbox-incremental').change(function() {
+ incremental = $('#checkbox-incremental').is(':checked');
+ clearGraph();
+ });
+
+ updatePlot([]);
+ requestData();
+ startDataPooling();
+
+ // Expose this functions
+ window.realtimeGraphs = {
+ clearGraph: clearGraph,
+ setOID: setOID,
+ snmpBrowserWindow: snmpBrowserWindow
}
-
- // Close the SNMP browser
- $('.ui-dialog-titlebar-close').trigger('click');
-}
-$('#checkbox-incremental').change(function() {
- incremental = $('#checkbox-incremental').is(':checked');
- clearGraph();
-});
-
-function firstNotZero(data) {
- var notZero = 0;
- for(i = 0; i < data[0].data.length; i ++) {
- if (data[0].data[i][1] != 0) {
- return data[0].data[i][1];
- }
- }
-}
-
-function setOnIncremental() {
-
-}
-
-function clearGraph() {
- data = plot.getData();
- if (data.length == 0) {
- return;
- }
-
- for(i = 0; i < data[0].data.length; i ++) {
- data[0].data[i][1] = 0;
- }
-
- $.plot("#" + id, data, options);
-}
+})();
\ No newline at end of file
diff --git a/pandora_console/extras/mr/18.sql b/pandora_console/extras/mr/18.sql
index 66963763d1..04409881c5 100644
--- a/pandora_console/extras/mr/18.sql
+++ b/pandora_console/extras/mr/18.sql
@@ -15,7 +15,57 @@ ALTER TABLE `tservice` ADD COLUMN `evaluate_sla` int(1) NOT NULL DEFAULT '0';
ALTER TABLE `tpolicy_modules` ADD COLUMN `cps` int NOT NULL DEFAULT '0';
DROP INDEX id_policy ON `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`);
-COMMIT;
\ No newline at end of file
+ALTER TABLE `tevento` ADD COLUMN `data` double(22,5) default NULL;
+
+ALTER TABLE `tmetaconsole_event` ADD COLUMN `data` double(22,5) default NULL;
+
+ALTER TABLE `tmetaconsole_event_history` ADD COLUMN `data` double(22,5) default NULL;
+
+ALTER TABLE `tevento` ADD COLUMN `module_status` int(4) NOT NULL default '0';
+
+ALTER TABLE `tmetaconsole_event` ADD COLUMN `module_status` int(4) NOT NULL default '0';
+
+ALTER TABLE `tmetaconsole_event_history` ADD COLUMN `module_status` int(4) NOT NULL default '0';
+
+CREATE TABLE `tautoconfig` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(100) NOT NULL,
+ `order` int(11) NOT NULL DEFAULT '0',
+ `description` text,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+CREATE TABLE `tautoconfig_rules` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `id_autoconfig` int(10) unsigned NOT NULL,
+ `order` int(11) NOT NULL DEFAULT '0',
+ `operator` enum('AND','OR') DEFAULT 'OR',
+ `type` enum('alias','ip-range','group','os','custom-field','script','server-name') DEFAULT 'alias',
+ `value` text,
+ `custom` text,
+ PRIMARY KEY (`id`),
+ KEY `id_autoconfig` (`id_autoconfig`),
+ CONSTRAINT `tautoconfig_rules_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+CREATE TABLE `tautoconfig_actions` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `id_autoconfig` int(10) unsigned NOT NULL,
+ `order` int(11) NOT NULL DEFAULT '0',
+ `action_type` enum('set-group', 'set-secondary-group', 'apply-policy', 'launch-script', 'launch-event', 'launch-alert-action', 'raw-config') DEFAULT 'launch-event',
+ `value` text,
+ `custom` text,
+ PRIMARY KEY (`id`),
+ KEY `id_autoconfig` (`id_autoconfig`),
+ CONSTRAINT `tautoconfig_action_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+COMMIT;
diff --git a/pandora_console/extras/mr/19.sql b/pandora_console/extras/mr/19.sql
new file mode 100644
index 0000000000..97275c0961
--- /dev/null
+++ b/pandora_console/extras/mr/19.sql
@@ -0,0 +1,56 @@
+START TRANSACTION;
+
+-- ---------------------------------------------------------------------
+-- Table `tlayout_template`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tlayout_template` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `id_group` INTEGER UNSIGNED NOT NULL,
+ `background` varchar(200) NOT NULL,
+ `height` INTEGER UNSIGNED NOT NULL default 0,
+ `width` INTEGER UNSIGNED NOT NULL default 0,
+ `background_color` varchar(50) NOT NULL default '#FFF',
+ `is_favourite` INTEGER UNSIGNED NOT NULL default 0,
+ PRIMARY KEY(`id`)
+) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+
+-- ---------------------------------------------------------------------
+-- Table `tlayout_template_data`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `id_layout_template` INTEGER UNSIGNED NOT NULL,
+ `pos_x` INTEGER UNSIGNED NOT NULL default 0,
+ `pos_y` INTEGER UNSIGNED NOT NULL default 0,
+ `height` INTEGER UNSIGNED NOT NULL default 0,
+ `width` INTEGER UNSIGNED NOT NULL default 0,
+ `label` TEXT,
+ `image` varchar(200) DEFAULT "",
+ `type` tinyint(1) UNSIGNED NOT NULL default 0,
+ `period` INTEGER UNSIGNED NOT NULL default 3600,
+ `module_name` text NOT NULL,
+ `agent_name` varchar(600) BINARY NOT NULL default '',
+ `id_layout_linked` INTEGER unsigned NOT NULL default '0',
+ `parent_item` INTEGER UNSIGNED NOT NULL default 0,
+ `enable_link` tinyint(1) UNSIGNED NOT NULL default 1,
+ `id_metaconsole` int(10) NOT NULL default 0,
+ `id_group` INTEGER UNSIGNED NOT NULL default 0,
+ `id_custom_graph` INTEGER UNSIGNED NOT NULL default 0,
+ `border_width` INTEGER UNSIGNED NOT NULL default 0,
+ `type_graph` varchar(50) NOT NULL default 'area',
+ `label_position` varchar(50) NOT NULL default 'down',
+ `border_color` varchar(200) DEFAULT "",
+ `fill_color` varchar(200) DEFAULT "",
+ `show_statistics` tinyint(2) NOT NULL default '0',
+ `id_layout_linked_weight` int(10) NOT NULL default '0',
+ `element_group` int(10) NOT NULL default '0',
+ `show_on_top` tinyint(1) NOT NULL default '0',
+ `clock_animation` varchar(60) NOT NULL default "analogic_1",
+ `time_format` varchar(60) NOT NULL default "time",
+ `timezone` varchar(60) NOT NULL default "Europe/Madrid",
+ PRIMARY KEY(`id`),
+ FOREIGN KEY (`id_layout_template`) REFERENCES tlayout_template(`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+
+COMMIT;
\ No newline at end of file
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 2cb41a72d0..ecb53717a3 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
@@ -1175,13 +1175,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
-INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 18);
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 19);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
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', '724');
+INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '726');
-- ---------------------------------------------------------------------
-- Table `tconfig_os`
@@ -1669,3 +1669,98 @@ create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`(
ALTER TABLE tagente ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0';
ALTER TABLE tmetaconsole_agent ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0';
ALTER TABLE tusuario_perfil ADD COLUMN `is_secondary` tinyint(1) NOT NULL default '0';
+
+-- ---------------------------------------------------------------------
+-- Table `tautoconfig`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tautoconfig` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(100) NOT NULL,
+ `order` int(11) NOT NULL DEFAULT '0',
+ `description` text,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ---------------------------------------------------------------------
+-- Table `tautoconfig_rules`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tautoconfig_rules` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `id_autoconfig` int(10) unsigned NOT NULL,
+ `order` int(11) NOT NULL DEFAULT '0',
+ `operator` enum('AND','OR') DEFAULT 'OR',
+ `type` enum('alias','ip-range','group','os','custom-field','script','server-name') DEFAULT 'alias',
+ `value` text,
+ `custom` text,
+ PRIMARY KEY (`id`),
+ KEY `id_autoconfig` (`id_autoconfig`),
+ CONSTRAINT `tautoconfig_rules_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ---------------------------------------------------------------------
+-- Table `tautoconfig_actions`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tautoconfig_actions` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `id_autoconfig` int(10) unsigned NOT NULL,
+ `order` int(11) NOT NULL DEFAULT '0',
+ `action_type` enum('set-group', 'set-secondary-group', 'apply-policy', 'launch-script', 'launch-event', 'launch-alert-action', 'raw-config') DEFAULT 'launch-event',
+ `value` text,
+ `custom` text,
+ PRIMARY KEY (`id`),
+ KEY `id_autoconfig` (`id_autoconfig`),
+ CONSTRAINT `tautoconfig_action_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ---------------------------------------------------------------------
+-- Table `tlayout_template`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tlayout_template` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL,
+ `id_group` INTEGER UNSIGNED NOT NULL,
+ `background` varchar(200) NOT NULL,
+ `height` INTEGER UNSIGNED NOT NULL default 0,
+ `width` INTEGER UNSIGNED NOT NULL default 0,
+ `background_color` varchar(50) NOT NULL default '#FFF',
+ `is_favourite` INTEGER UNSIGNED NOT NULL default 0,
+ PRIMARY KEY(`id`)
+) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+
+-- ---------------------------------------------------------------------
+-- Table `tlayout_template_data`
+-- ---------------------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `id_layout_template` INTEGER UNSIGNED NOT NULL,
+ `pos_x` INTEGER UNSIGNED NOT NULL default 0,
+ `pos_y` INTEGER UNSIGNED NOT NULL default 0,
+ `height` INTEGER UNSIGNED NOT NULL default 0,
+ `width` INTEGER UNSIGNED NOT NULL default 0,
+ `label` TEXT,
+ `image` varchar(200) DEFAULT "",
+ `type` tinyint(1) UNSIGNED NOT NULL default 0,
+ `period` INTEGER UNSIGNED NOT NULL default 3600,
+ `module_name` text NOT NULL,
+ `agent_name` varchar(600) BINARY NOT NULL default '',
+ `id_layout_linked` INTEGER unsigned NOT NULL default '0',
+ `parent_item` INTEGER UNSIGNED NOT NULL default 0,
+ `enable_link` tinyint(1) UNSIGNED NOT NULL default 1,
+ `id_metaconsole` int(10) NOT NULL default 0,
+ `id_group` INTEGER UNSIGNED NOT NULL default 0,
+ `id_custom_graph` INTEGER UNSIGNED NOT NULL default 0,
+ `border_width` INTEGER UNSIGNED NOT NULL default 0,
+ `type_graph` varchar(50) NOT NULL default 'area',
+ `label_position` varchar(50) NOT NULL default 'down',
+ `border_color` varchar(200) DEFAULT "",
+ `fill_color` varchar(200) DEFAULT "",
+ `show_statistics` tinyint(2) NOT NULL default '0',
+ `id_layout_linked_weight` int(10) NOT NULL default '0',
+ `element_group` int(10) NOT NULL default '0',
+ `show_on_top` tinyint(1) NOT NULL default '0',
+ `clock_animation` varchar(60) NOT NULL default "analogic_1",
+ `time_format` varchar(60) NOT NULL default "time",
+ `timezone` varchar(60) NOT NULL default "Europe/Madrid",
+ PRIMARY KEY(`id`),
+ FOREIGN KEY (`id_layout_template`) REFERENCES tlayout_template(`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE = InnoDB DEFAULT CHARSET=utf8;
diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php
index b60388e6fa..3bad38b982 100644
--- a/pandora_console/godmode/alerts/alert_actions.php
+++ b/pandora_console/godmode/alerts/alert_actions.php
@@ -370,12 +370,8 @@ foreach ($actions as $action) {
$data[0] = ''.
$action['name'].'';
$data[1] = ui_print_group_icon ($action["id_group"], true) .' ';
- $hack_id_group_all = $action["id_group"];
- if ($hack_id_group_all == 0) {
- //To avoid check all groups instead the pseudo-group all
- $hack_id_group_all = -1;
- }
- if (check_acl($config['id_user'], $hack_id_group_all, "LM")) {
+
+ if (check_acl($config['id_user'], $action["id_group"], "LM")) {
$data[2] = '' .
html_print_image("images/copy.png", true) . '';
diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php
index a356b7bc47..9b519fa6dd 100644
--- a/pandora_console/godmode/events/custom_events.php
+++ b/pandora_console/godmode/events/custom_events.php
@@ -65,13 +65,13 @@ if ($fields_selected[0]!='') {
foreach ($fields_selected as $field_selected) {
switch ($field_selected) {
case 'id_evento':
- $result = __('Event id');
+ $result = __('Event Id');
break;
case 'evento':
- $result = __('Event name');
+ $result = __('Event Name');
break;
case 'id_agente':
- $result = __('Agent name');
+ $result = __('Agent Name');
break;
case 'id_usuario':
$result = __('User');
@@ -86,10 +86,10 @@ if ($fields_selected[0]!='') {
$result = __('Timestamp');
break;
case 'event_type':
- $result = __('Event type');
+ $result = __('Event Type');
break;
case 'id_agentmodule':
- $result = __('Agent module');
+ $result = __('Module Name');
break;
case 'id_alert_am':
$result = __('Alert');
@@ -107,7 +107,7 @@ if ($fields_selected[0]!='') {
$result = __('Source');
break;
case 'id_extra':
- $result = __('Extra id');
+ $result = __('Extra Id');
break;
case 'owner_user':
$result = __('Owner');
@@ -119,8 +119,15 @@ if ($fields_selected[0]!='') {
$result = __('Instructions');
break;
case 'server_name':
- $result = __('Server name');
+ $result = __('Server Name');
break;
+ case 'data':
+ $result = __('Data');
+ break;
+ case 'module_status':
+ $result = __('Module Status');
+ break;
+
}
$result_selected[$field_selected] = $result;
}
@@ -149,25 +156,27 @@ $table->data = array();
$fields_available = array();
-$fields_available['id_evento'] = __('Event id');
-$fields_available['evento'] = __('Event name');
-$fields_available['id_agente'] = __('Agent name');
+$fields_available['id_evento'] = __('Event Id');
+$fields_available['evento'] = __('Event Name');
+$fields_available['id_agente'] = __('Agent Name');
$fields_available['id_usuario'] = __('User');
$fields_available['id_grupo'] = __('Group');
$fields_available['estado'] = __('Status');
$fields_available['timestamp'] = __('Timestamp');
-$fields_available['event_type'] = __('Event type');
-$fields_available['id_agentmodule'] = __('Agent module');
+$fields_available['event_type'] = __('Event Type');
+$fields_available['id_agentmodule'] = __('Module Name');
$fields_available['id_alert_am'] = __('Alert');
$fields_available['criticity'] = __('Severity');
$fields_available['user_comment'] = __('Comment');
$fields_available['tags'] = __('Tags');
$fields_available['source'] = __('Source');
-$fields_available['id_extra'] = __('Extra id');
+$fields_available['id_extra'] = __('Extra Id');
$fields_available['owner_user'] = __('Owner');
$fields_available['ack_utimestamp'] = __('ACK Timestamp');
$fields_available['instructions'] = __('Instructions');
-$fields_available['server_name'] = __('Server name');
+$fields_available['server_name'] = __('Server Name');
+$fields_available['data'] = __('Data');
+$fields_available['module_status'] = __('Module Status');
//remove fields already selected
foreach ($fields_available as $key=>$available) {
diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php
index 87fb1b3173..e7f92d4594 100755
--- a/pandora_console/godmode/massive/massive_edit_modules.php
+++ b/pandora_console/godmode/massive/massive_edit_modules.php
@@ -650,25 +650,25 @@ $table->data['edit16'][1] = html_print_input_text ('max_retries', '', '', 5, 10,
__('Number of retries that the module will attempt to run.'), true);
$table->data['edit22'][0] = __('Web checks').ui_print_help_icon ("web_checks", true);;
-$table->data['edit22'][1] = '';
+$table->data['edit22'][1] = '';
$table->data['edit16'][2] = __('Port');
$table->data['edit16'][3] = html_print_input_text ('tcp_port', '', '', 5, 20, true);
$table->data['edit17'][0] = __('TCP send') . ' ' . ui_print_help_icon ("tcp_send", true);
-$table->data['edit17'][1] = html_print_textarea ('tcp_send', 2, 65, '', '', true);
+$table->data['edit17'][1] = html_print_textarea ('tcp_send2', 2, 65, '', '', true);
$table->data['edit17'][2] = __('TCP receive');
$table->data['edit17'][3] = html_print_textarea ('tcp_rcv', 2, 65, '', '', true);
$table->data['edit18'][0] = __('WMI query') . ui_print_help_icon ('wmiquery', true);
-$table->data['edit18'][1] = html_print_input_text ('snmp_oid', '', '', 35, 255, true);
+$table->data['edit18'][1] = html_print_input_text ('wmi_query', '', '', 35, 255, true);
$table->data['edit18'][2] = __('Key string');
-$table->data['edit18'][3] = html_print_input_text ('snmp_community', '', '', 20, 60, true);
+$table->data['edit18'][3] = html_print_input_text ('key_string', '', '', 20, 60, true);
$table->data['edit19'][0] = __('Field number') . ui_print_help_icon ('wmifield', true);
-$table->data['edit19'][1] = html_print_input_text ('tcp_port', '', '', 5, 15, true);
+$table->data['edit19'][1] = html_print_input_text ('field_number', '', '', 5, 15, true);
$table->data['edit20'][0] = __('Plugin') . ui_print_help_icon ('plugin_macros', true);
$table->data['edit20'][1] = html_print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name',
@@ -1381,7 +1381,8 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
'id_category', 'disabled_types_event', 'ip_target', "custom_ip_target",
'descripcion', 'min_ff_event_normal', 'min_ff_event_warning',
'min_ff_event_critical', 'each_ff', 'module_ff_interval',
- 'ff_timeout', 'max_timeout','tcp_port','max_retries','tcp_rcv','id_plugin');
+ 'ff_timeout', 'max_timeout','tcp_port','max_retries','tcp_rcv','id_plugin',
+ 'wmi_query','key_string','field_number','tcp_send2','plugin_parameter_text');
$values = array ();
foreach ($fields as $field) {
@@ -1391,61 +1392,55 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
case 'id_plugin':
if ($value != 0) {
- $value_field_1 = get_parameter ('_field1_', '');
- $value_field_1_desc = get_parameter ('desc_field1_', '');
-
- $value_field_2 = get_parameter ('_field2_', '');
- $value_field_2_desc = get_parameter ('desc_field2_', '');
-
- $value_field_3 = get_parameter ('_field3_', '');
- $value_field_3_desc = get_parameter ('desc_field3_', '');
-
- $value_field_4 = get_parameter ('_field4_', '');
- $value_field_4_desc = get_parameter ('desc_field4_', '');
-
- $value_field_5 = get_parameter ('_field5_', '');
- $value_field_5_desc = get_parameter ('desc_field5_', '');
-
- $values['macros'] = '{"1":{"macro":"_field1_","desc":"'.io_safe_input($value_field_1_desc).'","help":"'.io_safe_input($value_field_1_desc).'","value":"'.$value_field_1.'"}';
-
- if($value_field_2_desc != ''){
- $values['macros'] .= ',"2":{"macro":"_field2_","desc":"'.io_safe_input($value_field_2_desc).'","help":"'.io_safe_input($value_field_2_desc).'","value":"'.$value_field_2.'"}';
-
- if($value_field_3_desc != ''){
- $values['macros'] .= ',"3":{"macro":"_field3_","desc":"'.io_safe_input($value_field_3_desc).'","help":"'.io_safe_input($value_field_3_desc).'","value":"'.$value_field_3.'"}';
+ $value_field_1 = get_parameter ('_field1_', '');
+ $value_field_1_desc = get_parameter ('desc_field1_', '');
- if($value_field_4_desc != ''){
- $values['macros'] .= ',"4":{"macro":"_field4_","desc":"'.io_safe_input($value_field_4_desc).'","help":"'.io_safe_input($value_field_4_desc).'","value":"'.$value_field_4.'"}';
-
- if($value_field_5_desc != ''){
- $values['macros'] .= ',"5":{"macro":"_field5_","desc":"'.io_safe_input($value_field_5_desc).'","help":"'.io_safe_input($value_field_5_desc).'","value":"'.$value_field_5.'"}';
- }
- else{
- $values['macros'] .= '}';
- }
-
+ $value_field_2 = get_parameter ('_field2_', '');
+ $value_field_2_desc = get_parameter ('desc_field2_', '');
+
+ $value_field_3 = get_parameter ('_field3_', '');
+ $value_field_3_desc = get_parameter ('desc_field3_', '');
+
+ $value_field_4 = get_parameter ('_field4_', '');
+ $value_field_4_desc = get_parameter ('desc_field4_', '');
+
+ $value_field_5 = get_parameter ('_field5_', '');
+ $value_field_5_desc = get_parameter ('desc_field5_', '');
+
+ $values['macros'] = '{"1":{"macro":"_field1_","desc":"'.io_safe_input($value_field_1_desc).'","help":"'.io_safe_input($value_field_1_desc).'","value":"'.$value_field_1.'"}';
+
+ if($value_field_2_desc != ''){
+ $values['macros'] .= ',"2":{"macro":"_field2_","desc":"'.io_safe_input($value_field_2_desc).'","help":"'.io_safe_input($value_field_2_desc).'","value":"'.$value_field_2.'"}';
+
+ if($value_field_3_desc != ''){
+ $values['macros'] .= ',"3":{"macro":"_field3_","desc":"'.io_safe_input($value_field_3_desc).'","help":"'.io_safe_input($value_field_3_desc).'","value":"'.$value_field_3.'"}';
+
+ if($value_field_4_desc != ''){
+ $values['macros'] .= ',"4":{"macro":"_field4_","desc":"'.io_safe_input($value_field_4_desc).'","help":"'.io_safe_input($value_field_4_desc).'","value":"'.$value_field_4.'"}';
+
+ if($value_field_5_desc != ''){
+ $values['macros'] .= ',"5":{"macro":"_field5_","desc":"'.io_safe_input($value_field_5_desc).'","help":"'.io_safe_input($value_field_5_desc).'","value":"'.$value_field_5.'"}';
+ }
+ else{
+ $values['macros'] .= '}';
+ }
+
+ }
+ else{
+ $values['macros'] .= '}';
+ }
+
+ }
+ else{
+ $values['macros'] .= '}';
+ }
}
else{
$values['macros'] .= '}';
}
-
- }
- else{
- $values['macros'] .= '}';
- }
-
}
- else{
- $values['macros'] .= '}';
- }
-
-
-
- }
-
-
-
break;
+
case 'module_interval':
if ($value != 0) {
$values[$field] = $value;
@@ -1470,6 +1465,32 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
}
}
break;
+ case 'wmi_query':
+ if ($value != '') {
+ $values['snmp_oid'] = $value;
+ }
+ break;
+ case 'key_string':
+ if ($value != '') {
+ $values['snmp_community'] = $value;
+ }
+ break;
+ case 'field_number':
+ if ($value != '') {
+ $values['tcp_port'] = $value;
+ }
+ break;
+
+ case 'tcp_send2':
+ if ($value != '') {
+ $values['tcp_send'] = $value;
+ }
+ break;
+ case 'plugin_parameter_text':
+ if ($value != '') {
+ $values['plugin_parameter'] = $value;
+ }
+ break;
default:
if ($value != '') {
$values[$field] = $value;
@@ -1477,7 +1498,7 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
break;
}
}
-
+
// Specific snmp reused fields
if (get_parameter ('tcp_send', '') == 3) {
$plugin_user_snmp = get_parameter ('plugin_user_snmp', '');
diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php
index fdf4b71360..f9b6632c23 100644
--- a/pandora_console/godmode/menu.php
+++ b/pandora_console/godmode/menu.php
@@ -101,12 +101,12 @@ if (check_acl ($config['id_user'], 0, "PM")) {
$sub["godmode/modules/manage_network_templates"]["text"] = __('Module templates');
$sub["godmode/modules/manage_network_templates"]["id"] = 'Module templates';
enterprise_hook ('inventory_submenu');
+ enterprise_hook ('autoconfiguration_menu');
}
if (check_acl ($config['id_user'], 0, "AW")) {
enterprise_hook ('policies_menu');
enterprise_hook('agents_submenu');
}
-
if (check_acl ($config['id_user'], 0, "AW")) {
$sub["gmassive"]["text"] = __('Bulk operations');
$sub["gmassive"]["id"] = 'Bulk operations';
diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php
index b21ec23f3d..03e49e2769 100644
--- a/pandora_console/godmode/reporting/map_builder.php
+++ b/pandora_console/godmode/reporting/map_builder.php
@@ -22,6 +22,9 @@ $vconsoles_read = check_acl ($config['id_user'], 0, "VR");
$vconsoles_write = check_acl ($config['id_user'], 0, "VW");
$vconsoles_manage = check_acl ($config['id_user'], 0, "VM");
+$is_enterprise = enterprise_include_once('include/functions_policies.php');
+$is_metaconsole = is_metaconsole();
+
if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
db_pandora_audit("ACL Violation",
"Trying to access map builder");
@@ -29,19 +32,64 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
exit;
}
+if(!$is_metaconsole){
+ $url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
+ $url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite';
+ $url_visual_console_template = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template';
+ $url_visual_console_template_wizard = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template_wizard';
+}
+else{
+ $url_visual_console = 'index.php?sec=screen&sec2=screens/screens&action=visualmap';
+ $url_visual_console_favorite = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_favorite';
+ $url_visual_console_template = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_template';
+ $url_visual_console_template_wizard = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_wizard';
+}
+
$pure = (int)get_parameter('pure', 0);
$hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
-$buttons['visual_console_favorite'] = array('active' => false,
- 'text' => '' .
- html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .'');
+$buttons['visual_console'] = array(
+ 'active' => true,
+ 'text' => '' .
+ html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console List'))) .''
+);
-if (!defined('METACONSOLE')) {
+$buttons['visual_console_favorite'] = array(
+ 'active' => false,
+ 'text' => '' .
+ html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .''
+);
+
+if($is_enterprise){
+ $buttons['visual_console_template'] = array(
+ 'active' => false,
+ 'text' => '' .
+ html_print_image ("images/templates.png", true, array ("title" => __('Visual Console Template'))) .''
+ );
+
+ $buttons['visual_console_template_wizard'] = array(
+ 'active' => false,
+ 'text' => '' .
+ html_print_image ("images/wand.png", true, array ("title" => __('Visual Console Template Wizard'))) .''
+ );
+}
+
+if (!$is_metaconsole) {
ui_print_page_header(
__('Reporting') .' » ' . __('Visual Console'),
- "images/op_reporting.png", false, "map_builder", false, $buttons);
+ "images/op_reporting.png",
+ false,
+ "map_builder",
+ false,
+ $buttons
+ );
+}
+else{
+ ui_meta_print_header(
+ __('Visual console') . " » " . $visualConsoleName, "",
+ $buttons);
}
$id_layout = (int) get_parameter ('id_layout');
@@ -62,7 +110,7 @@ if ($delete_layout || $copy_layout) {
require ("general/noaccess.php");
exit;
}
-
+
$group_id = db_get_value("id_group", "tlayout", "id", $id_layout);
if ($group_id === false) {
db_pandora_audit("ACL Violation",
diff --git a/pandora_console/godmode/reporting/visual_console_favorite.php b/pandora_console/godmode/reporting/visual_console_favorite.php
index d8f58da452..b04d06b028 100644
--- a/pandora_console/godmode/reporting/visual_console_favorite.php
+++ b/pandora_console/godmode/reporting/visual_console_favorite.php
@@ -17,10 +17,13 @@ global $config;
require_once ($config['homedir'] . '/include/functions_visual_map.php');
// ACL for the general permission
-$vconsoles_read = check_acl ($config['id_user'], 0, "VR");
-$vconsoles_write = check_acl ($config['id_user'], 0, "VW");
+$vconsoles_read = check_acl ($config['id_user'], 0, "VR");
+$vconsoles_write = check_acl ($config['id_user'], 0, "VW");
$vconsoles_manage = check_acl ($config['id_user'], 0, "VM");
+$is_enterprise = enterprise_include_once('include/functions_policies.php');
+$is_metaconsole = is_metaconsole();
+
if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
db_pandora_audit("ACL Violation",
"Trying to access map builder");
@@ -28,15 +31,55 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
exit;
}
-$buttons['map_builder'] = array('active' => false,
- 'text' => '' .
- html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console'))) .'');
+if(!$is_metaconsole){
+ $url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
+ $url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite';
+ $url_visual_console_template = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template';
+ $url_visual_console_template_wizard = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template_wizard';
+}
+else{
+ $url_visual_console = 'index.php?sec=screen&sec2=screens/screens&action=visualmap';
+ $url_visual_console_favorite = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_favorite';
+ $url_visual_console_template = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_template';
+ $url_visual_console_template_wizard = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_wizard';
+}
-if (!defined('METACONSOLE')) {
+$buttons['visual_console'] = array(
+ 'active' => false,
+ 'text' => '' .
+ html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console List'))) .''
+);
+
+$buttons['visual_console_favorite'] = array(
+ 'active' => true,
+ 'text' => '' .
+ html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .''
+);
+
+if($is_enterprise){
+ $buttons['visual_console_template'] = array(
+ 'active' => false,
+ 'text' => '' .
+ html_print_image ("images/templates.png", true, array ("title" => __('Visual Console Template'))) .''
+ );
+
+ $buttons['visual_console_template_wizard'] = array(
+ 'active' => false,
+ 'text' => '' .
+ html_print_image ("images/wand.png", true, array ("title" => __('Visual Console Template Wizard'))) .''
+ );
+}
+
+if (!$is_metaconsole) {
ui_print_page_header(
__('Reporting') .' » ' . __('Visual Favourite Console'),
"images/op_reporting.png", false, "map_builder", false, $buttons);
}
+else{
+ ui_meta_print_header(
+ __('Visual console') . " » " . $visualConsoleName, "",
+ $buttons);
+}
$search = (string) get_parameter("search","");
$ag_group = (int) get_parameter("ag_group",0);
@@ -48,7 +91,7 @@ if(!is_metaconsole()){
action='index.php?sec=network&sec2=godmode/reporting/visual_console_favorite'>";
} else {
echo "