diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index 5f755ae4af..0d640badaa 100644
--- a/pandora_agents/unix/AIX/pandora_agent.conf
+++ b/pandora_agents/unix/AIX/pandora_agent.conf
@@ -87,6 +87,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 960dd1248c..2785fcb150 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.727-180927
+Version: 7.0NG.727-181010
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 53f00ab6fc..33335ae56b 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.727-180927"
+pandora_version="7.0NG.727-181010"
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 bfe673cf6c..53dd20cf4f 100644
--- a/pandora_agents/unix/Darwin/pandora_agent.conf
+++ b/pandora_agents/unix/Darwin/pandora_agent.conf
@@ -117,6 +117,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
#remote_config 1
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf
index d829dfe933..3590ee6551 100644
--- a/pandora_agents/unix/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf
@@ -130,6 +130,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
remote_config 0
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
#proxy_mode 1
diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf
index 29dc961d62..aa1dcb1592 100644
--- a/pandora_agents/unix/HP-UX/pandora_agent.conf
+++ b/pandora_agents/unix/HP-UX/pandora_agent.conf
@@ -89,6 +89,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf
index c97d6b489f..fc55d1d872 100644
--- a/pandora_agents/unix/Linux/pandora_agent.conf
+++ b/pandora_agents/unix/Linux/pandora_agent.conf
@@ -136,6 +136,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
remote_config 0
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1
diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf
index e493e71850..7a47602abc 100644
--- a/pandora_agents/unix/NT4/pandora_agent.conf
+++ b/pandora_agents/unix/NT4/pandora_agent.conf
@@ -41,9 +41,9 @@ udp_server_auth_address 0.0.0.0
# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers
-
-# Group password (if defined).
-#group_password
+
+# Group password (if defined).
+#group_password
# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it's inestable. 1 to enable
@@ -102,6 +102,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
remote_config 0
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# Number of threads to execute modules in parallel
#agent_threads 1
diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf
index 6954f557e0..42d8c19a25 100644
--- a/pandora_agents/unix/NetBSD/pandora_agent.conf
+++ b/pandora_agents/unix/NetBSD/pandora_agent.conf
@@ -98,6 +98,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
#remote_config 1
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
#proxy_mode 1
diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf
index 8fe67c12d0..625bc89848 100644
--- a/pandora_agents/unix/SunOS/pandora_agent.conf
+++ b/pandora_agents/unix/SunOS/pandora_agent.conf
@@ -92,6 +92,9 @@ transfer_mode tentacle
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
#remote_config 1
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# If set to 1 start Drone Agent's Proxy Mode
#proxy_mode 1
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 02d8dbef17..7cf0c1e9a0 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.727';
-use constant AGENT_BUILD => '180927';
+use constant AGENT_BUILD => '181010';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@@ -186,6 +186,7 @@ my %DefaultConf = (
'xml_buffer' => 0,
'custom_id' => '',
'url_address' => '',
+ 'standby' => 0,
);
my %Conf = %DefaultConf;
@@ -1333,6 +1334,41 @@ sub check_collections () {
}
}
+################################################################################
+# Sleep function
+################################################################################
+sub sleep_agent {
+ my ($main_agent, $iter_base_time) = @_;
+
+ # Sleep if main agent
+ if ($main_agent != 0) {
+ foreach my $broker_pid (@BrokerPid) {
+ waitpid ($broker_pid, 0);
+ }
+
+ # Cron mode
+ exit (0) if ($Conf{'cron_mode'} == 1);
+
+ $iter_base_time += $Conf{'intensive_interval'};
+ my $now = time();
+
+ my $interval_remain = $iter_base_time - $now;
+
+ if ($interval_remain >= 0) {
+ sleep ($interval_remain);
+ } else {
+ # don't sleep if iteraion took more than "intensive_interval" seconds
+ $iter_base_time = $now; # use current time as base time
+ }
+ }
+ # Finish if broker agent
+ else {
+ exit (0);
+ }
+
+ return $iter_base_time;
+}
+
###############################################################################
# Return the MD5 checksum of the given string as a hex string.
# Pseudocode from: http://en.wikipedia.org/wiki/MD5#Pseudocode
@@ -2959,6 +2995,12 @@ while (1) {
}
}
+ # Do not report to server if standby mode is enabled
+ if ($Conf{'standby'} eq '1' && $Conf{'debug'} ne '1') {
+ $iter_base_time = sleep_agent($main_agent, $iter_base_time);
+ next;
+ }
+
my $address;
if(defined($Conf{'address'})) {
@@ -3161,31 +3203,8 @@ while (1) {
$SIG{'INT'} = \&udp_server_signal;
}
- # Sleep if main agent
- if ($main_agent != 0) {
- foreach my $broker_pid (@BrokerPid) {
- waitpid ($broker_pid, 0);
- }
-
- # Cron mode
- last if ($Conf{'cron_mode'} == 1);
-
- $iter_base_time += $Conf{'intensive_interval'};
- my $now = time();
-
- my $interval_remain = $iter_base_time - $now;
-
- if ($interval_remain >= 0) {
- sleep ($interval_remain);
- } else {
- # don't sleep if iteraion took more than "intensive_interval" seconds
- $iter_base_time = $now; # use current time as base time
- }
- }
- # Finish if broker agent
- else {
- exit (0);
- }
+ # Sleep agent function
+ $iter_base_time = sleep_agent($main_agent, $iter_base_time);
}
__END__
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index d1a9aff7a2..e0f718e4ae 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.727
-%define release 180927
+%define release 181010
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@@ -24,7 +24,7 @@ Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
Requires: fileutils textutils unzip
Requires: util-linux procps grep
Requires: /sbin/ip /bin/awk
-Requires: perl perl(Sys::Syslog)
+Requires: perl perl(Sys::Syslog) perl(IO::Compress::Zip)
# Required by plugins
#Requires: sh-utils sed passwd net-tools rpm
AutoReq: 0
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 6ca9c63f76..0c87f9e690 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.727
-%define release 180927
+%define release 181010
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 691f92b58e..b0ee6ccceb 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.727"
-PI_BUILD="180927"
+PI_BUILD="181010"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf
index e8caadc9c3..0901ac5234 100644
--- a/pandora_agents/win32/bin/pandora_agent.conf
+++ b/pandora_agents/win32/bin/pandora_agent.conf
@@ -82,6 +82,9 @@ server_port 41121
# Debug mode renames XML in the temp folder and continues running
# debug 1
+# Default 0, set to 1 to avoid module executions and report to server
+# standby 1
+
# XML encoding (ISO-8859-1 by default). Most windows servers experience problems when you set to UTF-8. Other special codepages may be specified here.
#encoding ISO-8859-1
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index f9b33a9d34..6ca4584dc3 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{180927}
+{181010}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/modules/pandora_module_logchannel.cc b/pandora_agents/win32/modules/pandora_module_logchannel.cc
index 2c7c056565..4ec72df63c 100755
--- a/pandora_agents/win32/modules/pandora_module_logchannel.cc
+++ b/pandora_agents/win32/modules/pandora_module_logchannel.cc
@@ -67,16 +67,16 @@ Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source
// Set the type filter
int type_number = -1;
- if (upper_type.compare("ERROR") == 0) {
- type_number = EVENTLOG_ERROR_TYPE;
+ if (upper_type.compare("CRITICAL") == 0) {
+ type_number = WINEVENT_LEVEL_CRITICAL;
+ } else if (upper_type.compare("ERROR") == 0) {
+ type_number = WINEVENT_LEVEL_ERROR;
} else if (upper_type.compare("WARNING") == 0) {
- type_number = EVENTLOG_WARNING_TYPE;
- } else if (upper_type.compare("INFORMATION") == 0) {
- type_number = EVENTLOG_INFORMATION_TYPE;
- } else if (upper_type.compare("AUDIT SUCCESS") == 0) {
- type_number = EVENTLOG_AUDIT_SUCCESS;
- } else if (upper_type.compare("AUDIT FAILURE") == 0) {
- type_number = EVENTLOG_AUDIT_FAILURE;
+ type_number = WINEVENT_LEVEL_WARNING;
+ } else if (upper_type.compare("INFO") == 0) {
+ type_number = WINEVENT_LEVEL_INFO;
+ } else if (upper_type.compare("VERBOSE") == 0) {
+ type_number = WINEVENT_LEVEL_VERBOSE;
}
// Append type to log query
if (type_number != -1) {
diff --git a/pandora_agents/win32/modules/pandora_module_logchannel.h b/pandora_agents/win32/modules/pandora_module_logchannel.h
index 14617037c6..19cde78b93 100755
--- a/pandora_agents/win32/modules/pandora_module_logchannel.h
+++ b/pandora_agents/win32/modules/pandora_module_logchannel.h
@@ -29,6 +29,13 @@
// Log event read buffer size
#define BUFFER_SIZE 1024
+// WINEVENT consts
+#define WINEVENT_LEVEL_CRITICAL 1
+#define WINEVENT_LEVEL_ERROR 2
+#define WINEVENT_LEVEL_WARNING 3
+#define WINEVENT_LEVEL_INFO 4
+#define WINEVENT_LEVEL_VERBOSE 5
+
// Types for pointers to Wevtapi.dll functions
typedef EVT_HANDLE WINAPI (*EvtQueryT) (EVT_HANDLE Session, LPCWSTR Path, LPCWSTR Query, DWORD Flags);
typedef WINBOOL WINAPI (*EvtNextT) (EVT_HANDLE ResultSet, DWORD EventArraySize, EVT_HANDLE* EventArray, DWORD Timeout, DWORD Flags, PDWORD Returned);
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 4b3f32d9ac..3caa06fa7a 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.727(Build 180927)")
+#define PANDORA_VERSION ("7.0NG.727(Build 181010)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc
index e843cdbc05..275ee60724 100644
--- a/pandora_agents/win32/pandora_windows_service.cc
+++ b/pandora_agents/win32/pandora_windows_service.cc
@@ -1869,7 +1869,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
server_addr = conf->getValue ("server_ip");
- if (this->broker_modules != NULL) {
+ if (this->broker_modules != NULL && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
this->broker_modules->goFirst ();
while (! this->broker_modules->isLast ()) {
@@ -1937,7 +1937,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
}
}
- if (data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) {
+ if ((data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
// Send the XML
if (!server_addr.empty ()) {
@@ -1997,7 +1997,7 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
execution_number++;
- if (this->modules != NULL) {
+ if (this->modules != NULL && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
this->modules->goFirst ();
while (! this->modules->isLast ()) {
@@ -2057,7 +2057,7 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
}
}
- if (forced_run == 1 || data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) {
+ if ((forced_run == 1 || data_flag == 1 || this->timestamp + this->interval_sec <= this->run_time) && !(conf->getValue ("standby") == "1" && !getPandoraDebug())) {
// Send the XML
if (!server_addr.empty ()) {
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index fd82225cbf..0d6f00b0cb 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.727(Build 180927))"
+ VALUE "ProductVersion", "(7.0NG.727(Build 181010))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 54a24c2f2c..98acd458a4 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.727-180927
+Version: 7.0NG.727-181010
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 18673a2151..3ca2b46cf9 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.727-180927"
+pandora_version="7.0NG.727-181010"
package_pear=0
package_pandora=1
diff --git a/pandora_console/attachment/.htaccess b/pandora_console/attachment/.htaccess
index 815f1e1776..d6a661a7f8 100644
--- a/pandora_console/attachment/.htaccess
+++ b/pandora_console/attachment/.htaccess
@@ -1,2 +1,3 @@
Order deny,allow
Deny from All
+Allow from localhost
\ No newline at end of file
diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php
index 9a4f66935c..b7eca3b3e9 100644
--- a/pandora_console/extensions/module_groups.php
+++ b/pandora_console/extensions/module_groups.php
@@ -17,103 +17,21 @@
global $config;
-if (is_ajax ()) {
- check_login ();
-
- require_once('include/functions_agents.php');
-
- $get_info_alert_module_group = (bool)get_parameter('get_info_alert_module_group');
- $module_group = (int)get_parameter('module_group');
- $id_agent_group = (int)get_parameter('id_agent_group');
-
- $data = false;
- if ($get_info_alert_module_group) {
- $agents = agents_get_group_agents($id_agent_group);
- if (!empty($agents)) {
- $alerts = agents_get_alerts_simple(array_keys($agents));
- foreach ($alerts as $alert) {
- $module = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module']));
- if ($module_group == $module['id_module_group']) {
- if ($alert["times_fired"] > 0) {
- $data = true;
- echo '' . __('Number fired of alerts').': ' . $alert["times_fired"] . '
';
- $agent = db_get_row('tagente', 'id_agente', $module['id_agente']);
- echo '' . __('Agent').': ';
- echo io_safe_output($agent['nombre']) . '
';
- echo '' . __('Module') . ': ';
- echo io_safe_output($module['nombre']) . '
';
- $template = db_get_row('talert_templates', 'id' , $alert['id_alert_template']);
- echo '' . __('Alert template') . ': ';
- echo io_safe_output($template['name']) . '
';
-
- // This prevent from templates without predefined actions
- if (empty($template['id_alert_action']))
- $template_id_alert_action = "''";
- else
- $template_id_alert_action = $template['id_alert_action'];
-
- // True if the alert only has the default template action
- $default_action = false;
- // Try to get actions for the current alert
- $sql = 'SELECT t2.name
- FROM talert_template_module_actions t1
- INNER JOIN talert_actions t2
- INNER JOIN talert_template_modules t3
- ON t3.id = t1.id_alert_template_module
- AND t1.id_alert_action = t2.id
- WHERE (t3.id_alert_template = ' . $template['id'] . ' AND
- t3.id_agent_module = ' . $module['id_agente_modulo'] . ');';
-
- $actions = db_get_all_rows_sql($sql);
-
- // If this alert doesn't have actions try to get default action from template
- if ($actions === false) {
- $sql = 'SELECT name
- FROM talert_actions
- WHERE (id = ' . $template_id_alert_action . ');';
-
- $default_action = true;
-
- $actions = db_get_all_rows_sql($sql);
- }
-
- if ($actions === false) {
- $actions = array();
- }
-
- echo '' . __('Actions') . ': ' . '
';
- echo '
" . __('Legend') . " | |
" . __("Orange cell when the module group and agent have at least one alarm fired.") . " | |
" . __("Red cell when the module group and agent have at least one module in critical status and the others in any status") . " | |
" . __("Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status") . " | |
" . __("Green cell when the module group and agent have all modules in OK status") . " | |
" . __("Grey cell when the module group and agent have at least one in unknown status and the others in green status") . " | |
" .__("Blue cell when the module group and agent have all modules in not init status.") . " |
" . __('Legend') . " | |
" . __("Orange cell when the module group and agent have at least one alarm fired.") . " | |
" . __("Red cell when the module group and agent have at least one module in critical status and the others in any status") . " | |
" . __("Yellow cell when the module group and agent have at least one in warning status and the others in grey or green status") . " | |
" . __("Grey cell when the module group and agent have at least one in unknown status and the others in green status") . " | |
" . __("Green cell when the module group and agent have all modules in OK status") . " | |
" .__("Blue cell when the module group and agent have all modules in not init status.") . " |
Warning
The names of the modules of a satellite should not be
altered manually. Unless you are absolutely certain of
the process, do not alter these names.
![]() | Warning |
Warning
If you change the name of this module, various features
associated with this module, such as network maps,
interface graphs or other network modules, may no longer
work. If you are not completely sure of the process, please
do not change the name of the module.
![]() | Warning |
"; echo __('Search') . ' ' . html_print_input_text ('search_string', $search_string, '', 15, 255, true); + html_print_input_hidden ('search', 1); echo " | "; echo "";
html_print_submit_button (__('Filter'), 'filter', false, 'class="sub search"');
diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php
index 0b9207a817..0527bea08d 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_common.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_common.php
@@ -160,7 +160,7 @@ else{
$table_simple->data[0][0] = __('Name');
$table_simple->data[0][1] = html_print_input_text_extended ('name',
- io_safe_input(html_entity_decode($name)), 'text-name', '', 45, 100, $disabledBecauseInPolicy, '', $largeClassDisabledBecauseInPolicy, true);
+ io_safe_input(html_entity_decode($name, ENT_QUOTES, "UTF-8")), 'text-name', '', 45, 100, $disabledBecauseInPolicy, '', $largeClassDisabledBecauseInPolicy, true);
//$table_simple->data[0][1] = html_print_input_text ('name',
// io_safe_output($name), '', 45, 100, true, $disabledBecauseInPolicy);
diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php
index e79853b30a..a5085122d0 100644
--- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php
+++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php
@@ -71,7 +71,7 @@ push_table_simple ($data, 'plugin_1');
$data = array ();
$data[0] = 'macro_desc';
$data[0] .= ui_print_help_tip ('macro_help', true);
-$data[1] = html_print_input_text ('macro_name', 'macro_value', '', 100, 255, true);
+$data[1] = html_print_input_text ('macro_name', 'macro_value', '', 100, 1024, true);
$table_simple->colspan['macro_field'][1] = 3;
$table_simple->rowstyle['macro_field'] = 'display:none';
@@ -93,10 +93,10 @@ if (!empty($macros)) {
$m_hide = $m['hide'];
if ($m_hide) {
- $data[1] = html_print_input_password($m['macro'], io_output_password($m['value']), '', 100, 255, true);
+ $data[1] = html_print_input_password($m['macro'], io_output_password($m['value']), '', 100, 1024, true);
}
else {
- $data[1] = html_print_input_text($m['macro'], $m['value'], '', 100, 255, true,
+ $data[1] = html_print_input_text($m['macro'], $m['value'], '', 100, 1024, true,
$disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy);
}
$table_simple->colspan['macro'.$m['macro']][1] = 3;
diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php
index 0af888b5aa..4123ff337a 100644
--- a/pandora_console/godmode/alerts/alert_list.builder.php
+++ b/pandora_console/godmode/alerts/alert_list.builder.php
@@ -219,7 +219,7 @@ $(document).ready (function () {
$("#value", $value).append ("");
}
else {
- $("#value", $value).append (data);
+ $("#value", $value).append (parseInt(data));
}
$loading.hide ();
$value.show ();
diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php
index 0605ab2fed..1737ed1a7d 100644
--- a/pandora_console/godmode/alerts/alert_list.list.php
+++ b/pandora_console/godmode/alerts/alert_list.list.php
@@ -705,18 +705,26 @@ foreach ($simple_alerts as $alert) {
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LW")) {
$data[4] .= ' ';
+
+ $data[4] .= '';
+
}
if(check_acl_one_of_groups ($config['id_user'], $all_groups, "LM")) {
diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php
index a65b925a44..9a6badcc24 100644
--- a/pandora_console/godmode/alerts/alert_list.php
+++ b/pandora_console/godmode/alerts/alert_list.php
@@ -47,6 +47,7 @@ $add_action = (bool) get_parameter ('add_action');
$update_action = (bool) get_parameter ('update_action');
$delete_action = (bool) get_parameter ('delete_action');
$delete_alert = (bool) get_parameter ('delete_alert');
+$update_alert = (bool) get_parameter ('update_alert'); ////
$disable_alert = (bool) get_parameter ('disable_alert');
$enable_alert = (bool) get_parameter ('enable_alert');
$standbyon_alert = (bool) get_parameter ('standbyon_alert');
@@ -67,10 +68,32 @@ $standby = get_parameter('standby','');
$pure = get_parameter('pure', 0);
$messageAction = '';
+if ($update_alert) {
+
+ $id_alert_agent_module = (int) get_parameter ('id_alert_update');
+
+ $id_alert_template = (int) get_parameter ('template');
+ $id_agent_module = (int) get_parameter ('id_agent_module');
+
+ $values_upd = array();
+
+ if (!empty($id_alert_template))
+ $values_upd['id_agent_module'] = $id_agent_module;
+
+ if (!empty($id_alert_template))
+ $values_upd['id_alert_template'] = $id_alert_template;
+
+ $id = alerts_update_alert_agent_module ($id_alert_agent_module, $values_upd);
+
+ $messageAction = ui_print_result_message ($id,
+ __('Successfully updated'), __('Could not be updated'), '', true);
+
+}
+
if ($create_alert) {
$id_alert_template = (int) get_parameter ('template');
$id_agent_module = (int) get_parameter ('id_agent_module');
-
+
if (db_get_value_sql("SELECT COUNT(id)
FROM talert_template_modules
WHERE id_agent_module = " . $id_agent_module . "
@@ -81,7 +104,7 @@ if ($create_alert) {
}
else {
$id = alerts_create_alert_agent_module ($id_agent_module, $id_alert_template);
-
+
$alert_template_name = db_get_value ("name",
"talert_templates","id", $id_alert_template);
$module_name = db_get_value ("nombre",
@@ -116,6 +139,7 @@ if ($create_alert) {
$values['module_action_threshold'] =
(int)get_parameter ('module_action_threshold');
+
alerts_add_alert_agent_module_action ($id, $action_select, $values);
}
}
diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php
index 9b519fa6dd..c8911c0f44 100644
--- a/pandora_console/godmode/events/custom_events.php
+++ b/pandora_console/godmode/events/custom_events.php
@@ -188,7 +188,7 @@ foreach ($fields_available as $key=>$available) {
}
$table->data[0][0] = '' . __('Fields available').'';
-$table->data[1][0] = html_print_select ($fields_available, 'fields_available[]', true, '', '', '', true, true, false, '', false, 'width: 300px');
+$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,
array('id' => 'right', 'title' => __('Add fields to select'))) .
@@ -201,7 +201,7 @@ $table->data[1][1] .= ' ' . $table->data[0][1] = ''; $table->data[0][2] = '' . __('Fields selected') . ''; $table->data[1][2] = html_print_select($result_selected, - 'fields_selected[]', true, '', '', '', true, true, false, '', false, 'width: 300px'); + 'fields_selected[]', true, '', '', 0, true, true, false, '', false, 'width: 300px'); echo ' |