diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 592c5072a0..aedd54879c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.771-230517 +Version: 7.0NG.771-230608 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 5dfb14ed12..97fc042f39 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.771-230517" +pandora_version="7.0NG.771-230608" 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/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index e4a37617fc..efb7e45b6f 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,31 +1,31 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.771, GNU/Linux +# Version 7.0NG.771 # Licensed under GPL license v2, -# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas -# http://www.pandorafms.com +# Copyright (c) 2004-2023 Pandora FMS +# https://pandorafms.com # General Parameters # ================== -server_ip localhost -server_path /var/spool/pandora/data_in +server_ip localhost +server_path /var/spool/pandora/data_in temporal /tmp logfile /var/log/pandora/pandora_agent.log #include /etc/pandora/pandora_agent_alt.conf #broker_agent name_agent -# Interval in seconds, 300 by default -interval 300 +# Interval in seconds, 300 by default (5 minutes) +interval 300 # Debug mode renames XML in the temp folder and continues running -debug 0 +debug 0 # Optional. UDP Server to receive orders from outside # By default is disabled, set 1 to enable # Set port (41122 by default) # Set address to restrict who can order a agent restart (0.0.0.0 = anybody) -# + udp_server 0 udp_server_port 41122 udp_server_auth_address 0.0.0.0 @@ -33,12 +33,13 @@ udp_server_auth_address 0.0.0.0 #process_xeyes_start xeyes #process_xeyes_stop killall xeyes -# By default, agent takes machine name -#agent_name adama +# By default, agent takes hostname +#agent_name adama # To define agent name by specific command, define 'agent_name_cmd'. # (In the following example, agent name is 'hostname_IP') -# If set to __rand__ the agent will generate a random name. +# If set to __rand__ the agent will generate a random name, used by default to generate a unique name + #agent_name_cmd LANG=C; /bin/echo -n `hostname`; /bin/echo -n "_"; /bin/echo `/sbin/ifconfig eth0 | /bin/grep 'inet addr' | /usr/bin/awk '{print $2;}' | /usr/bin/cut -d: -f2` agent_name_cmd __rand__ @@ -52,7 +53,7 @@ agent_name_cmd __rand__ #agent_alias_cmd # Agent description -#description This is a demo agent for Linux +#description This is an agent running Linux # Group assigned for this agent (descriptive, p.e: Servers) group Servers @@ -78,20 +79,19 @@ address auto # Those parameters define the geographical position of the agent # gis_exec: Call a script that returns a string with a fixed -# format of latitude,longitude,altitude +# format of latitude, longitude, altitude. Used for custom integration with GIS # i.e.: 41.377,-5.105,2.365 -#gis_exec /tmp/gis.sh +#gis_exec /mypath/my_gis_script.sh # This sets the GIS coordinates as fixed values: -# latitude + #latitude 0 -# longitude #longitude 0 -# altitude #altitude 0 #GPS Position description + #position_description Madrid, centro # By default agent try to take default encoding defined in host. @@ -133,7 +133,8 @@ transfer_mode tentacle # is much more safe #cron_mode -# If set to 1 allows the agent to be configured via the web console (Only Enterprise version) +# If set to 1 allows the agent to be configured via the web console (Only use this in Enterprise version) +# when is set to 1, local .conf file changes are overwritten. Set to 0 if you want to edit the .conf file remote_config 0 # Default 0, set to 1 to avoid module executions and report to server @@ -157,7 +158,7 @@ remote_config 0 # Number of threads to execute modules in parallel #agent_threads 1 -# User the agent will run as +# User the agent will run as. By default uses root, but could be configured to run as other user #pandora_user pandora # Enable or disable XML buffer. @@ -177,9 +178,9 @@ temporal_max_files 1024 # Agent mode: Learn (default), No-learn, Autodisable # agent_mode autodisable -# eHorus agent configuration file path: +# Pandora RC (former eHorus) agent configuration file path. # The agent will create a custom field named eHorusID that contains -# the eHorus agent's identifying key +# the PandoraRC agent's identifying key ehorus_conf /etc/ehorus/ehorus_agent.conf # Secondary groups. You can select several groups separated by comma. @@ -272,10 +273,22 @@ module_plugin autodiscover --default # Plugin for inventory on the agent. #module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route -# Log collection modules. Only for enterprise version, this will collect log files for forensic analysis. -# This is for LOG monitoring, only on enterprise version +# Log collection modules. This will collect log files for forensic analysis and store everything +# This is for LOG monitoring. Different than log monitoring. #module_plugin grep_log_module /var/log/messages Syslog \.\* +# Another samples of monitoring modules + +# Command snapshot + +#module_begin +#module_name process_table +#module_type generic_data_string +#module_exec ps aux +#module_description Command snapshot of running processes +#module_group System +#module_end + #module_begin #module_name HTTPD_Status #module_type generic_proc diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 170eb7f81b..1b874b8456 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.771'; -use constant AGENT_BUILD => '230517'; +use constant AGENT_BUILD => '230608'; # 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 035678a021..47612d85d2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.771 -%define release 230517 +%define release 230608 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 d59e5e8e23..f48f139699 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.771 -%define release 230517 +%define release 230608 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 c634aa6007..112beed258 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.771" -PI_BUILD="230517" +PI_BUILD="230608" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/unix/plugins/grep_log b/pandora_agents/unix/plugins/grep_log index 2143464b48..1ecba6266a 100755 --- a/pandora_agents/unix/plugins/grep_log +++ b/pandora_agents/unix/plugins/grep_log @@ -22,6 +22,11 @@ use strict; use File::Basename; use Scalar::Util qw(looks_like_number); +BEGIN { + eval { + require MIME::Base64; + }; +} # Output format (module or log_module). my $Output = 'module'; @@ -65,6 +70,37 @@ if ( (defined ($ENV{GREP_LOG_TMP})) && (-d $ENV{GREP_LOG_TMP}) ) { $Idx_dir=$ENV{GREP_LOG_TMP}; } +# Define encode_base64 if it is not available via MIME::Base64. +my $encode_sub = defined(&MIME::Base64::encode_base64) ? \&MIME::Base64::encode_base64 : sub { + my ($str, $endl) = @_; + + my @ALPHABET = ('A'..'Z', 'a'..'z', 0..9, '+', '/'); + my $str_len = length($str); + my $str_base64 = ''; + + for (my $i = 0; $i < $str_len; $i += 3) { + my $chunk = substr($str, $i, 3); + my $chunk_len = length($chunk); + + my $num = 0; + $num |= ord(substr($chunk, 0, 1)) << 16 if ($chunk_len >= 1); + $num |= ord(substr($chunk, 1, 1)) << 8 if ($chunk_len >= 2); + $num |= ord(substr($chunk, 2, 1)) if ($chunk_len == 3); + + my $enc_1 = ($num & 0xfc0000) >> 18; + my $enc_2 = ($num & 0x03f000) >> 12; + my $enc_3 = ($num & 0x000fc0) >> 6; + my $enc_4 = ($num & 0x00003f); + + $str_base64 .= $ALPHABET[$enc_1]; + $str_base64 .= $ALPHABET[$enc_2]; + $str_base64 .= $chunk_len >= 2 ? $ALPHABET[$enc_3] : '='; + $str_base64 .= $chunk_len == 3 ? $ALPHABET[$enc_4] : '='; + } + + return $str_base64; +}; + ######################################################################################## # Erase blank spaces before and after the string ######################################################################################## @@ -335,11 +371,13 @@ sub print_log ($) { my $output = "\n"; $output .= "\n"; $output .= "{$line}}) { + $tmp .= $content; + } } + $output .= &$encode_sub($tmp, ''); $output .= "]]>"; $output .= "\n"; diff --git a/pandora_agents/unix/plugins/grep_log_module b/pandora_agents/unix/plugins/grep_log_module index 6fc1cff239..d15a6f7c08 100755 --- a/pandora_agents/unix/plugins/grep_log_module +++ b/pandora_agents/unix/plugins/grep_log_module @@ -22,6 +22,11 @@ use strict; use File::Basename; +BEGIN { + eval { + require MIME::Base64; + }; +} # Output format (module or log_module). my $Output = 'log_module'; @@ -53,6 +58,37 @@ my $Idx_size = 0; # Regular expression to be matched my $Reg_exp = ''; +# Define encode_base64 if it is not available via MIME::Base64. +my $encode_sub = defined(&MIME::Base64::encode_base64) ? \&MIME::Base64::encode_base64 : sub { + my ($str, $endl) = @_; + + my @ALPHABET = ('A'..'Z', 'a'..'z', 0..9, '+', '/'); + my $str_len = length($str); + my $str_base64 = ''; + + for (my $i = 0; $i < $str_len; $i += 3) { + my $chunk = substr($str, $i, 3); + my $chunk_len = length($chunk); + + my $num = 0; + $num |= ord(substr($chunk, 0, 1)) << 16 if ($chunk_len >= 1); + $num |= ord(substr($chunk, 1, 1)) << 8 if ($chunk_len >= 2); + $num |= ord(substr($chunk, 2, 1)) if ($chunk_len == 3); + + my $enc_1 = ($num & 0xfc0000) >> 18; + my $enc_2 = ($num & 0x03f000) >> 12; + my $enc_3 = ($num & 0x000fc0) >> 6; + my $enc_4 = ($num & 0x00003f); + + $str_base64 .= $ALPHABET[$enc_1]; + $str_base64 .= $ALPHABET[$enc_2]; + $str_base64 .= $chunk_len >= 2 ? $ALPHABET[$enc_3] : '='; + $str_base64 .= $chunk_len == 3 ? $ALPHABET[$enc_4] : '='; + } + + return $str_base64; +}; + ############################################################################### # SUB error_msg # Print an error message and exit. @@ -213,11 +249,9 @@ sub print_log (@) { if ($Output eq 'log_module') { my $output = "\n"; $output .= "\n"; + $output .= "base64\n"; $output .= ""; $output .= "\n"; diff --git a/pandora_agents/win32/bin/util/omnishell_client.exe b/pandora_agents/win32/bin/util/omnishell_client.exe index 3c3e4b04cb..e7903b3a77 100644 --- a/pandora_agents/win32/bin/util/omnishell_client.exe +++ b/pandora_agents/win32/bin/util/omnishell_client.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a0d742e4e1944a599fe7609544719c82ab560590784f0a82733fdba8a7964a3 -size 7630848 +oid sha256:ad4d006cf2662a57f2e062b5adbfe8702d2147ec4c4d3dc9a1019938fe7d5b22 +size 16557020 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ecb82d8e7e..70d1a6c4f7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230517} +{230608} ViewReadme {Yes} diff --git a/pandora_agents/win32/modules/pandora_module.cc b/pandora_agents/win32/modules/pandora_module.cc index d5bd1fc21d..4a6382acf6 100644 --- a/pandora_agents/win32/modules/pandora_module.cc +++ b/pandora_agents/win32/modules/pandora_module.cc @@ -520,7 +520,7 @@ Pandora_Module::getXml () { if (this->module_type == TYPE_LOG) { module_xml = "\n\tmodule_name; - module_xml += "]]>\n\t\n\tbase64\n\tdata_list && this->data_list->size () > 1) { list::iterator iter; @@ -532,25 +532,19 @@ Pandora_Module::getXml () { data = *iter; try { - data_clean = strreplace (this->getDataOutput (data), - "%", "%%" ); - data_clean = strreplace (data_clean, "]]>", "]]>getDataOutput(data); } catch (Module_Exception e) { continue; } - - module_xml += data_clean; } } else { data = data_list->front (); try { - data_clean = strreplace (this->getDataOutput (data), "%", "%%" ); - data_clean = strreplace (data_clean, "]]>", "]]>getDataOutput (data); } catch (Module_Exception e) { } } + module_xml += base64Encode(data_clean); module_xml += "]]>"; /* Clean up */ diff --git a/pandora_agents/win32/omnishell/omnishell_client.pl b/pandora_agents/win32/omnishell/omnishell_client.pl index 9132c90d5b..fe7f5696da 100644 --- a/pandora_agents/win32/omnishell/omnishell_client.pl +++ b/pandora_agents/win32/omnishell/omnishell_client.pl @@ -12,6 +12,14 @@ use warnings; use File::Basename; BEGIN { push @INC, '/usr/lib/perl5'; } + +# NOTE: The binary compiled with PAR::Packer for Pandora FMS doesn't work well +# with JSON:XS, probably because JSON::Backend::XS is defined in the __DATA__ +# section of JSON.pm and that doesn't work well with PAR::Filter. If this +# becomes a bottleneck, a workaround would be possible (e.g., redefining +# JSON::Backend::XS here). +BEGIN { $ENV{PERL_JSON_BACKEND} = 'JSON::PP' }; + use PandoraFMS::PluginTools; use PandoraFMS::Omnishell; @@ -90,4 +98,4 @@ if ($@) { exit 0; } -exit 0; \ No newline at end of file +exit 0; diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0eada00935..6451ae8893 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.771 Build 230517") +#define PANDORA_VERSION ("7.0NG.771 Build 230608") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/pandora_strutils.cc b/pandora_agents/win32/pandora_strutils.cc index ea3bbf51f0..83f1019d08 100644 --- a/pandora_agents/win32/pandora_strutils.cc +++ b/pandora_agents/win32/pandora_strutils.cc @@ -24,6 +24,8 @@ #include #include #include // for strchr +#include +#include using namespace Pandora; @@ -56,6 +58,54 @@ Pandora_Strutils::trim (const string str) { return result; } +/** + * Encode the given string to base64. + * Based on: https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64 + * + * @param str String to be encoded. + * + * @return The base64 encoded string. + */ +string +Pandora_Strutils::base64Encode(string str) { + string base64_str; + std::uint32_t temp; + const static char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + std::vector buffer(begin(str), end(str)); + base64_str.reserve(((buffer.size() / 3) + (buffer.size() % 3 > 0)) * 4); + + std::vector::iterator cursor = buffer.begin(); + for(size_t idx = 0; idx < buffer.size() / 3; idx++) { + temp = (*cursor++) << 16; + temp += (*cursor++) << 8; + temp += (*cursor++); + base64_str.append(1, alphabet[(temp & 0x00FC0000) >> 18]); + base64_str.append(1, alphabet[(temp & 0x0003F000) >> 12]); + base64_str.append(1, alphabet[(temp & 0x00000FC0) >> 6]); + base64_str.append(1, alphabet[(temp & 0x0000003F)]); + } + + switch(buffer.size() % 3){ + case 1: + temp = (*cursor++) << 16; + base64_str.append(1, alphabet[(temp & 0x00FC0000) >> 18]); + base64_str.append(1, alphabet[(temp & 0x0003F000) >> 12]); + base64_str.append(2, '='); + break; + case 2: + temp = (*cursor++) << 16; + temp += (*cursor++) << 8; + base64_str.append(1, alphabet[(temp & 0x00FC0000) >> 18]); + base64_str.append(1, alphabet[(temp & 0x0003F000) >> 12]); + base64_str.append(1, alphabet[(temp & 0x00000FC0) >> 6]); + base64_str.append(1, '='); + break; + } + + return base64_str; +} + /** * Convert an unicode string to a ANSI string. * diff --git a/pandora_agents/win32/pandora_strutils.h b/pandora_agents/win32/pandora_strutils.h index c105c9c3a9..fb7562d64d 100644 --- a/pandora_agents/win32/pandora_strutils.h +++ b/pandora_agents/win32/pandora_strutils.h @@ -44,6 +44,7 @@ namespace Pandora_Strutils { string trim (const string str); + string base64Encode(string str); string strUnicodeToAnsi (LPCWSTR s); wstring strAnsiToUnicode (LPCSTR s); string inttostr (const int i); diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index cf97c6d914..0954290825 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.771(Build 230517))" + VALUE "ProductVersion", "(7.0NG.771(Build 230608))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_agents/win32/windows/pandora_wmi.cc b/pandora_agents/win32/windows/pandora_wmi.cc index a7db16b017..a7b2c6302b 100644 --- a/pandora_agents/win32/windows/pandora_wmi.cc +++ b/pandora_agents/win32/windows/pandora_wmi.cc @@ -99,7 +99,7 @@ Pandora_Wmi::isServiceRunning (string service_name) { string query; char *state; string str_state; - int retval; + int retval = -1; query = "SELECT * FROM Win32_Service WHERE Name = \"" + service_name + "\""; @@ -112,23 +112,27 @@ Pandora_Wmi::isServiceRunning (string service_name) { FOR_EACH (quickfix, quickfixes, NULL) { dhGetValue (L"%s", &state, quickfix, L".State"); - str_state = state; - if (str_state == "Running") { - retval = 1; - } - else { - retval = 0; + if (retval == -1) { + str_state = state; + if (str_state == "Running") { + retval = 1; + } + else { + retval = 0; + } } dhFreeString (state); - - return retval; } NEXT_THROW (quickfix); } catch (string errstr) { pandoraLog ("isServiceRunning error. %s", errstr.c_str ()); } - pandoraDebug ("Service %s not found.", service_name.c_str ()); - return 0; + if (retval == -1) { + pandoraDebug ("Service %s not found.", service_name.c_str ()); + return 0; + } + + return retval; } /** @@ -1261,7 +1265,7 @@ Pandora_Wmi::getSystemAddress () { CDispPtr wmi_svc = NULL, nic_info = NULL; VARIANT ip_addresses; char *caption = NULL, *mac_address = NULL; - string ret = ""; + string str_addr, ret = ""; try { @@ -1274,12 +1278,12 @@ Pandora_Wmi::getSystemAddress () { dhGetValue (L"%v", &ip_addresses, nic_info_item, L".IPAddress"); - if (&ip_addresses != NULL) + if (&ip_addresses != NULL && ret == "") { - ret = getIPs(&ip_addresses); - if(ret != "0.0.0.0") { - break; - } + str_addr = getIPs(&ip_addresses); + if (str_addr != "0.0.0.0") { + ret = str_addr; + } } } NEXT_THROW (nic_info_item); } catch (string errstr) { diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7030313b5e..cae40c5d8c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.771-230517 +Version: 7.0NG.771-230608 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 1e7db70601..d4cf13b07b 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.771-230517" +pandora_version="7.0NG.771-230608" package_pear=0 package_pandora=1 diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index bea9dfc771..67ce4e382b 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -185,7 +185,7 @@ if (isset($config['force_instant_logout']) === true header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - if ($config['auth'] === 'saml') { + if ($config['auth'] === 'saml' && empty($public_hash) === true) { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; $as = new SimpleSAML_Auth_Simple('PandoraFMS'); $as->logout(); diff --git a/pandora_console/extensions/grafana/.htaccess b/pandora_console/extensions/grafana/.htaccess new file mode 100644 index 0000000000..7b8e46129e --- /dev/null +++ b/pandora_console/extensions/grafana/.htaccess @@ -0,0 +1,7 @@ +# /etc/httpd/conf/httpd.conf -> AllowOverride All -> service httpd restart + +RewriteEngine on + +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME}\.php -f +RewriteRule ^(.*)$ $1.php \ No newline at end of file diff --git a/pandora_console/extensions/grafana/index.php b/pandora_console/extensions/grafana/index.php new file mode 100644 index 0000000000..e925e56233 --- /dev/null +++ b/pandora_console/extensions/grafana/index.php @@ -0,0 +1,66 @@ + 200, + 'message' => 'Access granted', + ]; + } else { + $result_array = [ + 'code' => 403, + 'message' => 'Access forbidden', + ]; + } + } else { + $result_array = [ + 'code' => 401, + 'message' => 'Unauthorized', + ]; + } +} else { + // OPTIONS request automatically works + if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { + $result_array = [ + 'code' => 200, + 'message' => 'Options request accepted', + ]; + } else { + $result_array = [ + 'code' => 401, + 'message' => 'Unauthorized', + ]; + } +} + +// Numeric data in array must be numeric data in json (not text) +$result = json_encode($result_array, JSON_NUMERIC_CHECK); + +echo $result; diff --git a/pandora_console/extensions/grafana/query.php b/pandora_console/extensions/grafana/query.php new file mode 100644 index 0000000000..c5812a32c9 --- /dev/null +++ b/pandora_console/extensions/grafana/query.php @@ -0,0 +1,139 @@ + $target_data['module'], + 'period' => (strtotime($payload['range']['to']) - strtotime($payload['range']['from'])), + 'date' => strtotime($payload['range']['to']), + 'return_data' => 1, + 'show_unknown' => true, + 'fullscale' => (bool) $target_data['tip'], + 'time_interval' => $target_data['interval'], + ]; + + // Get all data. + $data = grafico_modulo_sparse($params); + + $unknown_timestamps = []; + + // Set unknown data as null. + foreach ($data['unknown1']['data'] as $d) { + if (($d[1] == 1 && !$params['fullscale']) || ($d[1] == 0 && $params['fullscale'])) { + $result_data[] = [ + null, + $d[0], + ]; + } + + $unknown_timestamps[] = $d[0]; + } + + // Get each data if not in unknown timestamps + foreach ($data['sum1']['data'] as $d) { + if ($d[1] != false && !in_array($d[0], $unknown_timestamps)) { + $result_data[] = [ + $d[1], + $d[0], + ]; + } + } + + // Sort all data by utimestamp (Grafana needs it). + usort( + $result_data, + function ($a, $b) { + return $a[1] > $b[1] ? 1 : -1; + } + ); + + $rows = []; + + foreach ($result_data as $k => $v) { + if (($result_data[$k][0] !== $result_data[($k - 1)][0] + || $result_data[$k][0] !== $result_data[($k + 1)][0]) + || ($result_data[($k - 1)][0] === null + && $result_data[$k][0] !== null + && $result_data[$k][1] != (strtotime($payload['range']['to']) * 1000)) + || ($result_data[($k - 1)][0] === $result_data[$k][0] && $result_data[$k][1] == (strtotime($payload['range']['to']) * 1000)) + ) { + $rows[] = $result_data[$k]; + } + } + + if (!$params['fullscale']) { + $target_data['target'] .= ' (avg)'; + } + + // Set all target info and data + $result_array[] = [ + 'type' => 'table', + 'target' => $target_data['target'], + 'refId' => $target_data['target'], + 'columns' => [ + [ + 'text' => $target_data['target'], + ], + [ + 'text' => 'Time', + 'type' => 'time', + ], + ], + 'datapoints' => array_values($rows), + ]; + } + } + } + } +} + +// Numeric data in array must be numeric data in json (not text). +$result = json_encode($result_array, JSON_NUMERIC_CHECK); + +echo $result; diff --git a/pandora_console/extensions/grafana/search.php b/pandora_console/extensions/grafana/search.php new file mode 100644 index 0000000000..48a4f819a9 --- /dev/null +++ b/pandora_console/extensions/grafana/search.php @@ -0,0 +1,87 @@ + 0, + 'text' => 'All', + ]; + + // Get groups that match the search + $sql = 'SELECT nombre, id_grupo id FROM tgrupo WHERE LOWER(nombre) LIKE LOWER("%'.io_safe_input($payload['search']).'%")'; + + // If search is for agents + } else if ($payload['type'] == 'agent') { + // Get agents that match the search + $sql = 'SELECT a.alias nombre, a.id_agente id FROM tagente a, tgrupo g WHERE a.disabled = 0 AND a.id_grupo = g.id_grupo AND LOWER(a.alias) LIKE LOWER("%'.io_safe_input($payload['search']).'%")'; + + // If search group is not all, add extra filter + if ($payload['extra'] != 0) { + $sql .= ' AND g.id_grupo = "'.io_safe_input($payload['extra']).'"'; + } + + // If search is for modules + } else if ($payload['type'] == 'module') { + // Get modules that match the search (not string) + $sql = 'SELECT m.nombre nombre, m.id_agente_modulo id FROM tagente_modulo m, tagente a, ttipo_modulo t WHERE m.disabled = 0 AND m.id_agente = a.id_agente AND t.id_tipo = m.id_tipo_modulo AND a.id_agente = "'.io_safe_input($payload['extra']).'" AND LOWER(m.nombre) LIKE LOWER("%'.io_safe_input($payload['search']).'%") AND t.nombre NOT LIKE "%string"'; + } + + // Run query + $sql_results = db_get_all_rows_sql($sql); + + foreach ($sql_results as $sql_result) { + // If search is for groups, only add those with permissions + if ($payload['type'] == 'group') { + if (check_acl($user_in_db, $sql_result['id'], 'AR')) { + $result_array[] = [ + 'value' => $sql_result['id'], + 'text' => io_safe_output($sql_result['nombre']), + ]; + } + } else { + $result_array[] = [ + 'value' => $sql_result['id'], + 'text' => io_safe_output($sql_result['nombre']), + ]; + } + } + } + } +} + +$result = json_encode($result_array, JSON_UNESCAPED_UNICODE); + +echo $result; diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index e554b34b51..6d7ac7e4f6 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -31,7 +31,7 @@ global $config; check_login(); // ACL Check. -if (!check_acl($config['id_user'], 0, 'AR')) { +if (check_acl($config['id_user'], 0, 'AR') === 0 && check_acl($config['id_user'], 0, 'RR') === 0) { db_pandora_audit( AUDIT_LOG_ACL_VIOLATION, 'Trying to access Module Groups view' diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index b14ce6c8b8..14ae13c04b 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -186,10 +186,6 @@ function pandora_realtime_graphs() $table->data[] = $data; - if ($graph == 'snmp_interface' || $graph == 'snmp_module') { - echo snmp_browser_print_container(true, '100%', '60%', 'none'); - } - // Print the relative path to AJAX calls. html_print_input_hidden('rel_path', get_parameter('rel_path', '')); @@ -224,7 +220,7 @@ function pandora_realtime_graphs() false, '', 'white-box-content', - 'box-flat white_table_graph' + 'box-flat white_table_graph fixed_filter_bar top_0px_important mrgn_btn_35px_imp' ); $chart[time()]['graph'] = '0'; @@ -266,6 +262,16 @@ function pandora_realtime_graphs() ] ); + if ($graph == 'snmp_interface' || $graph == 'snmp_module') { + html_print_div( + [ + 'class' => 'white_box', + 'id' => 'graph_snmp_interface', + 'content' => snmp_browser_print_container(true, '100%', '60%', '', false, false), + ] + ); + } + // echo $canvas; // Define a custom action to save // the OID selected in the SNMP browser to the form. diff --git a/pandora_console/extensions/resource_exportation.php b/pandora_console/extensions/resource_exportation.php index 905b389eee..77c4024628 100755 --- a/pandora_console/extensions/resource_exportation.php +++ b/pandora_console/extensions/resource_exportation.php @@ -453,7 +453,7 @@ function resource_exportation_extension_main() true ) ); - $table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', ['mode' => 'link'], true); + $table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr("report");', ['mode' => 'link'], true); $table->data[1][] = html_print_label_input_block( __('Visual console'), @@ -465,7 +465,7 @@ function resource_exportation_extension_main() true ) ); - $table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', ['mode' => 'link'], true); + $table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr("visual_console");', ['mode' => 'link'], true); if ($hook_enterprise === true) { add_rows_for_enterprise($table->data); diff --git a/pandora_console/extras/mr/64.sql b/pandora_console/extras/mr/64.sql index 9408ab3ca5..d18bd229f3 100644 --- a/pandora_console/extras/mr/64.sql +++ b/pandora_console/extras/mr/64.sql @@ -1,5 +1,69 @@ START TRANSACTION; +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'You know reports of Availability?','They are very useful as they tell you how long (%) a check has been in different states over a period of time, say a week. It offers complete raw data of what has been done in enough detail to convince a vendor or customer.','',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'informe_disponibiliad.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Did you know that you can monitor websites?','In a simple way through standard or transactional HTTP checks through centralized WUX transactions, or decentralized with the UX agent plugin.','https://pandorafms.com/manual/en/documentation/03_monitoring/06_web_monitoring',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'monitorizar_web.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Did you know that each user can have their own Time Zone?','Different time zones can be established for each user, so that it interprets the data taking into account the time difference. Pandora FMS can also have servers and agents in different time zones. All over the world!','',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'usuario_zona_horaria.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Does your network lose packets?','You can measure the packet loss in your network using an agent and a free plugin called “Packet Loss”. This is especially useful on Wi-Fi networks or networks shared with many users. We wrote an article on our blog talking about it, check it out','https://pandorafms.com/blog/packet-loss/',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'tu_red_pierde_paquetes.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Console Internal Audit','The console logs all relevant activities of each user connected to the console. This includes the application of configurations, validation of events and alerts, connection and disconnection, and hundreds of other operations. Security in Pandora FMS has always been one of the design characteristics of its architecture.','https://pandorafms.com/manual/en/documentation/04_using/11_managing_and_administration#log_de_auditoria',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'auditoria.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Two-factor authentication','It is possible to activate (and force its use to all users) a double authentication system (using Google Auth) so that any user authenticates in addition to a password, with a single-use token system, giving the system much more security.','https://pandorafms.com/manual/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'politica_de_pass.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Visual consoles: heat maps','The console allows a series of data to be integrated into a personalized background, which, depending on their value, is represented with one color or another, in real time. The applications are endless, it just depends on your imagination.','https://pandorafms.com/manual/en/documentation/04_using/05_data_presentation_visual_maps#mapa_de_cal',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'mapa_de_calor.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Network links in the visual console','There is a visual console element called “Network link” that allows to visually show the union of two network interfaces, their status and the upload/download traffic, in a very visual way.','https://pandorafms.com/manual/en/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'enlaces_consola_visual.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Google Sheet ','Do you know that you can get the value of a cell from a Google Sheet spreadsheet? We use the API to request the data through a remote plugin. It's perfect for building business dashboards, getting real-time alerts, and creating your own custom reports.','https://pandorafms.com/library/google-sheets-plugin/',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'google_sheets.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Availability graphs','Similar to availability reports, but much more visual, they offer detailed status of a monitor over time. They can be grouped with another module to offer final data taking into account the high availability of a service. They are perfect for use in reports to suppliers and/or customers.','https://pandorafms.com/manual/en/documentation/04_using/08_data_presentation_reports#grafico_de_disp',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'graficas_disponibilidad.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Full resolution graphics','Pandora FMS and other tools, when they have to display a graph, obtain the data from the data source and then “simplify” the graph, since if the data series has 10,000 elements and the graph is only 300 pixels wide, they cannot fit all of them. , so those 10,000 points are “simplified” into only 300. However, when simplifying, “detail” is lost in the graph, and of course we cannot “zoom in”. Pandora FMS graphs allow you to display and use all the data in a graph, which we call "TIP" that shows all the overlapping points and also allows you not to lose resolution when zooming.','',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'dark mode','Do you know that there is a dark mode in Pandora FMS? An administrator can activate it at a global level from the visual configuration options or any user at an individual level, in the user options.','',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Remote monitoring of SNMP devices','Network devices such as switches, APs, routers, and firewalls can be remotely monitored using the SNMP protocol. It is enough to know your IP, the SNMP community and launch an SNMP wizard from the console.','https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'monitorizar_snmp.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Monitoring JMX (Tomcat, Websphere, Weblogic, Jboss, Apache Kafka, Jetty, GlassFish…)','There is an Enterprise plugin that is used to monitor any JMX technology. It can be used locally (as a local plugin) or remotely with the plugin server.','https://pandorafms.com/library/jmx-monitoring/',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'monitorizar_con_jmx.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Monitor routes from one IP to another','There is a special plugin that is used to visually monitor the routes from one IP to another in a visual and dynamic way, as it changes over time.','https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'monitorizar_desde_ip.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'planned stops','It is possible to define, at the agent level and at the module level, periods in which the alerts and/or the collected data are ignored. It is perfect for planning service stops or disconnection of monitored systems. It also affects SLA reporting, preventing those time intervals from being taken into account.','https://pandorafms.com/manual/en/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'paradas_planificadas.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Customize alert emails','Did you know that Pandora alert emails can be customized? You only have to edit the default HTML code of the email type alert actions.','https://pandorafms.com/manual/en/documentation/04_using/01_alerts#editing_an_action',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'personalizar_los_emails.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'password policy','The Pandora FMS console has a credential policy management system, to reinforce local security (in addition to allowing external authentication against LDAP, Active Directory or SAML). Through this system we can force password changes every X days, save a history of passwords used or prevent the use of certain passwords, among other actions.','https://pandorafms.com/manual/en/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Automatic agent provision system','The agent self-provisioning system allows an agent recently entered into the system to automatically apply changes to their configuration (such as moving them from group, assigning them certain values in custom fields) and of course applying certain monitoring policies. It is one of the most powerful functionalities, aimed at managing very large system parks.','https://pandorafms.com/manual/start?id=en/documentation/02_installation/05_configuration_agents#conf',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Automatic agent provision system','The agent self-provisioning system allows an agent recently entered into the system to automatically apply changes to their configuration (such as moving them from group, assigning them certain values in custom fields) and of course applying certain monitoring policies. It is one of the most powerful functionalities, aimed at managing very large system parks.','https://pandorafms.com/manual/start?id=en/documentation/02_installation/05_configuration_agents#conf',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Automatic agent provision system','The agent self-provisioning system allows an agent recently entered into the system to automatically apply changes to their configuration (such as moving them from group, assigning them certain values in custom fields) and of course applying certain monitoring policies. It is one of the most powerful functionalities, aimed at managing very large system parks.','https://pandorafms.com/manual/start?id=en/documentation/02_installation/05_configuration_agents#conf',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'ARP tables','Do you know that there is an inventory module to get the ARP tables from your windows servers? It is easy to install and can give you very detailed information about your equipment.','https://pandorafms.com/library/arp-table-windows-local/',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Using custom icons in visual consoles','Thanks to the custom icons, you can create highly customized views, such as the one in the image, which represents racks with the types of servers in the order they are placed within the rack. Perfect for a technician to know exactly what machine is failing. It couldn't be more visual, hence the name.','https://pandorafms.com/manual/start?id=en/documentation/04_using/05_data_presentation_visual_maps',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'iconos_personalizados.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Use Telegram with Pandora FMS','Perfect to receive alerts with embedded graphics and thus customize the reception of notices individually or in a common channel with more people.','https://pandorafms.com/library/telegram-bot-cli/',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'telegram_con_pandora.png','images/tips/'); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Zoom on data graphs','Do you know that Pandora FMS allows you to zoom in on a part of the graph. With that you will expand the information of the graph. If you are looking at a graph for a month and you zoom in, you will be able to see the data for that interval. If you use a graph with full resolution data (we call them TIP graphs) you will be able to see the detail of each piece of data, even if your graph has thousands of samples.','',1); +SELECT @last_id := LAST_INSERT_ID(); +INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'zoom_en_graficas.png','images/tips/'); + +ALTER TABLE `tnetwork_component` ADD COLUMN `target_ip` VARCHAR(255) NOT NULL DEFAULT ''; + UPDATE `tnetwork_component` SET module_enabled=1 WHERE name='Cisco _nameOID_ power state'; @@ -7,4 +71,18 @@ WHERE name='Cisco _nameOID_ power state'; ALTER TABLE `tlayout_data` ADD COLUMN `recursive_group` TINYINT NOT NULL DEFAULT '0' AFTER `fill_color`; +ALTER TABLE `tlayout_template_data` +ADD COLUMN `recursive_group` TINYINT NOT NULL DEFAULT '0' AFTER `fill_color`; + +ALTER TABLE `tusuario` +ADD COLUMN `metaconsole_section` VARCHAR(255) NOT NULL DEFAULT 'Default' AFTER `data_section`; + +ALTER TABLE `tusuario` +ADD COLUMN `metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '' AFTER `metaconsole_section`; + +ALTER TABLE `tusuario` +ADD COLUMN `metaconsole_default_event_filter` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `default_event_filter`; + +UPDATE tconfig SET value = 'Renaissance' WHERE token LIKE 'lts_name'; + COMMIT; diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index bd5d791b96..1081952031 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -263,7 +263,7 @@ switch ($login_screen) { } if ($config['auth'] == 'saml') { - echo '