diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 44be2d8fb9..a49cc294bf 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -304,7 +304,6 @@ server_dependencies=" \ perl(Sys::Syslog) \ perl(DBI) \ perl(XML::Simple) \ - perl(Geo::IP) \ perl(IO::Socket::INET6) \ perl(XML::Twig) \ expect \ @@ -344,7 +343,6 @@ ipam_dependencies=" \ perl(Sys::Syslog) \ perl(DBI) \ perl(XML::Simple) \ - perl(Geo::IP) \ perl(IO::Socket::INET6) \ perl(XML::Twig)" execute_cmd "yum install -y $ipam_dependencies" "Installing IPAM Instant client" @@ -521,8 +519,9 @@ include (\$ownDir . "config_process.php"); EO_CONFIG_F cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F +ServerTokens Prod - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride All Require all granted diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index c37b5df13c..72ee496fa0 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -417,7 +417,6 @@ server_dependencies=" \ perl(Sys::Syslog) \ perl(DBI) \ perl(XML::Simple) \ - perl(Geo::IP) \ perl(IO::Socket::INET6) \ perl(XML::Twig) \ expect \ @@ -457,7 +456,6 @@ ipam_dependencies=" \ perl(Sys::Syslog) \ perl(DBI) \ perl(XML::Simple) \ - perl(Geo::IP) \ perl(IO::Socket::INET6) \ perl(XML::Twig)" execute_cmd "dnf install -y $ipam_dependencies" "Installing IPAM Instant client" @@ -632,8 +630,9 @@ include (\$ownDir . "config_process.php"); EO_CONFIG_F cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F +ServerTokens Prod - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride All Require all granted diff --git a/extras/deploy-scripts/pandora_deploy_community_el9.sh b/extras/deploy-scripts/pandora_deploy_community_el9.sh index 176c1bbea8..70b473b49b 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el9.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el9.sh @@ -578,8 +578,9 @@ include (\$ownDir . "config_process.php"); EO_CONFIG_F cat > /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F +ServerTokens Prod - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride All Require all granted diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index 8e1ba6ae63..6d0bb69d06 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -640,8 +640,9 @@ EO_CONFIG_F #Enable allow Override cat > /etc/apache2/conf-enabled/pandora_security.conf << EO_CONFIG_F +ServerTokens Prod - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride All Require all granted diff --git a/extras/docker/centos8/base/Dockerfile b/extras/docker/centos8/base/Dockerfile index 4f9a0c994f..eac2152d3c 100644 --- a/extras/docker/centos8/base/Dockerfile +++ b/extras/docker/centos8/base/Dockerfile @@ -116,7 +116,6 @@ RUN dnf install -y --setopt=tsflags=nodocs \ "perl(Sys::Syslog)" \ "perl(DBI)" \ "perl(XML::Simple)" \ - "perl(Geo::IP)" \ "perl(IO::Socket::INET6)" \ "perl(XML::Twig)" \ expect \ @@ -135,7 +134,7 @@ RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02- # Instant client Oracle RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm # Install IPAM dependencies -RUN dnf install -y "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(Geo::IP)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs +RUN dnf install -y "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs EXPOSE 80 443 41121 162/udp diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 49968aff95..1a93e1bda0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.776-240326 +Version: 7.0NG.776-240402 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 747e9899e7..dd97783482 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.776-240326" +pandora_version="7.0NG.776-240402" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3af86f333a..f8917912c2 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.776'; -use constant AGENT_BUILD => '240326'; +use constant AGENT_BUILD => '240402'; # 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 851b6c2c85..87257d94e7 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.776 -%define release 240326 +%define release 240402 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 5de72b2e89..b10f85df8d 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240326 +%define release 240402 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 1c6192f08e..9c6a6060ee 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240326 +%define release 240402 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index fcfc96c8e2..75e053f16e 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240326 +%define release 240402 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index de189c8c44..95cdfb9cb1 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.776 -%define release 240326 +%define release 240402 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 02d493eaf1..8b89c4b715 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240326" +PI_BUILD="240402" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 84af1757d9..38490f2f6d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240326} +{240402} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ce803f8907..33b0ea0cdf 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.776 Build 240326") +#define PANDORA_VERSION ("7.0NG.776 Build 240402") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8712d35874..c7fc47bd7b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.776(Build 240326))" + VALUE "ProductVersion", "(7.0NG.776(Build 240402))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ee2f075ad5..b1fe76adcb 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.776-240326 +Version: 7.0NG.776-240402 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 0c9e638f55..debdb72758 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.776-240326" +pandora_version="7.0NG.776-240402" package_pear=0 package_pandora=1 diff --git a/pandora_console/api/v2/config/container.php b/pandora_console/api/v2/config/container.php index 4a267619fc..c2c3107b8a 100644 --- a/pandora_console/api/v2/config/container.php +++ b/pandora_console/api/v2/config/container.php @@ -6,6 +6,8 @@ use PandoraFMS\Modules\Events\Repositories\EventRepository; use PandoraFMS\Modules\Events\Repositories\EventRepositoryMySQL; use PandoraFMS\Modules\Groups\Repositories\GroupRepository; use PandoraFMS\Modules\Groups\Repositories\GroupRepositoryMySQL; +use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository; +use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepositoryMySQL; use PandoraFMS\Modules\Shared\Repositories\Repository; use PandoraFMS\Modules\Shared\Repositories\RepositoryMySQL; use PandoraFMS\Modules\Users\Repositories\UserRepository; @@ -15,10 +17,10 @@ use Slim\App; use Slim\Factory\AppFactory; return [ - 'settings' => function () { + 'settings' => function () { return include __DIR__.'/settings.php'; }, - App::class => function (ContainerInterface $container) { + App::class => function (ContainerInterface $container) { AppFactory::setContainer($container); $app = AppFactory::create(); @@ -39,19 +41,22 @@ return [ return $app; }, - Repository::class => function (ContainerInterface $container) { + Repository::class => function (ContainerInterface $container) { return $container->get(RepositoryMySQL::class); }, - TokenRepository::class => function (ContainerInterface $container) { + TokenRepository::class => function (ContainerInterface $container) { return $container->get(TokenRepositoryMySQL::class); }, - UserRepository::class => function (ContainerInterface $container) { + UserRepository::class => function (ContainerInterface $container) { return $container->get(UserRepositoryMySQL::class); }, - GroupRepository::class => function (ContainerInterface $container) { + GroupRepository::class => function (ContainerInterface $container) { return $container->get(GroupRepositoryMySQL::class); }, - EventRepository::class => function (ContainerInterface $container) { + EventRepository::class => function (ContainerInterface $container) { return $container->get(EventRepositoryMySQL::class); }, + PandoraITSMInventoryRepository::class => function (ContainerInterface $container) { + return $container->get(PandoraITSMInventoryRepositoryMySQL::class); + }, ]; diff --git a/pandora_console/api/v2/config/routes.php b/pandora_console/api/v2/config/routes.php index c36454d725..3ef7a03f15 100644 --- a/pandora_console/api/v2/config/routes.php +++ b/pandora_console/api/v2/config/routes.php @@ -9,4 +9,5 @@ return function (App $app) { (include __DIR__.'/../../../include/lib/Modules/Profiles/routes.php')($app); (include __DIR__.'/../../../include/lib/Modules/Tags/routes.php')($app); (include __DIR__.'/../../../include/lib/Modules/Users/routes.php')($app); + (include __DIR__.'/../../../include/lib/Modules/PandoraITSM/routes.php')($app); }; diff --git a/pandora_console/api/v2/public/swagger.json b/pandora_console/api/v2/public/swagger.json index a7a514bedb..c432271fef 100644 --- a/pandora_console/api/v2/public/swagger.json +++ b/pandora_console/api/v2/public/swagger.json @@ -1118,6 +1118,110 @@ ] } }, + "/pandoraITSM/inventory/{idPandoraITSMInventory}": { + "get": { + "tags": ["PandoraITSM"], + "summary": "Show pandoraITSMInventory", + "operationId": "09b6d1f91536441fc65dc66142a6f9cb", + "parameters": [ + { + "$ref": "#/components/parameters/parameterIdPandoraITSMInventory" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ResponsePandoraITSMInventory" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/pandoraITSM/inventory/list": { + "post": { + "tags": ["PandoraITSM"], + "summary": "List pandoraITSMInventories", + "operationId": "149f20397779ed681c1f7680c1214974", + "parameters": [ + { + "$ref": "#/components/parameters/parameterPage" + }, + { + "$ref": "#/components/parameters/parameterSizePage" + }, + { + "$ref": "#/components/parameters/parameterSortField" + }, + { + "$ref": "#/components/parameters/parameterSortDirection" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/requestBodyPandoraITSMInventoryFilter" + }, + "responses": { + "200": { + "description": "List PandoraITSM Inventories Object", + "content": { + "application/json": { + "schema": { + "properties": { + "paginationData": { + "$ref": "#/components/schemas/paginationData" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PandoraITSMInventory" + } + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, "/profile": { "post": { "tags": ["Profiles"], @@ -2081,6 +2185,192 @@ } ] }, + "Event": { + "properties": { + "idEvent": { + "description": "Id event", + "type": "integer", + "readOnly": true, + "nullable": false + }, + "idAgent": { + "description": "Id agent", + "type": "integer", + "default": null, + "nullable": true + }, + "idUser": { + "description": "Id user", + "type": "string", + "default": null, + "nullable": true + }, + "idGroup": { + "description": "Id group", + "type": "integer", + "default": null, + "nullable": true + }, + "status": { + "description": "Event status, the available status are: new, validated, inprocess", + "type": "integer", + "default": "new", + "enum": ["new", "validated", "inprocess"], + "nullable": false + }, + "timestamp": { + "description": "Event registration date", + "type": "string", + "default": null, + "readOnly": true, + "example": "2023-02-21 08:34:16", + "nullable": true + }, + "event": { + "description": "Description event", + "type": "string", + "default": "Event created for api", + "nullable": false + }, + "utimestamp": { + "description": "Event registration date", + "type": "integer", + "default": null, + "readOnly": true, + "example": "1704898868", + "nullable": true + }, + "eventType": { + "description": "Event status, the available status are: going_unknown, unknown, alert_fired, alert_recovered, alert_ceased, alert_manual_validation, recon_host_detected, system, error, new_agent, going_up_critical, going_down_critical, going_up_warning, going_down_warning, going_up_normal, going_down_normal, configuration_change, ncm", + "type": "string", + "default": "unknown", + "enum": [ + "going_unknown", + "unknown", + "alert_fired", + "alert_recovered", + "alert_ceased", + "alert_manual_validation", + "recon_host_detected", + "system", + "error", + "new_agent", + "going_up_critical", + "going_down_critical", + "going_up_warning", + "going_down_warning", + "going_up_normal", + "going_down_normal", + "configuration_change", + "ncm" + ], + "nullable": false + }, + "idAgentModule": { + "description": "Id agent module", + "type": "integer", + "default": null, + "nullable": true + }, + "idAlertAm": { + "description": "Id alert action", + "type": "integer", + "default": null, + "nullable": true + }, + "severity": { + "description": "Event severity, the available severity are: maintenance, informational, normal, warning, critical, minor, major", + "type": "integer", + "default": "maintenance", + "enum": [ + "maintenance", + "informational", + "normal", + "warning", + "critical", + "minor", + "major" + ], + "nullable": false + }, + "tags": { + "description": "Tags", + "type": "string", + "default": null, + "nullable": true + }, + "source": { + "description": "Source", + "type": "string", + "default": null, + "nullable": true + }, + "idExtra": { + "description": "Extra id", + "type": "string", + "default": null, + "nullable": true + }, + "criticalInstructions": { + "description": "Critical instructions", + "type": "string", + "default": null, + "nullable": true + }, + "warningInstructions": { + "description": "Warning instructions", + "type": "string", + "default": null, + "nullable": true + }, + "unknownInstructions": { + "description": "Unknows instructions", + "type": "string", + "default": null, + "nullable": true + }, + "ownerUser": { + "description": "Id user", + "type": "string", + "default": null, + "nullable": true + }, + "ackUtimestamp": { + "description": "Event ack utimestamp", + "type": "integer", + "default": null, + "readOnly": true, + "example": "1704898868", + "nullable": true + }, + "customData": { + "description": "Custom data", + "type": "string", + "default": null, + "nullable": true + }, + "data": { + "description": "Data", + "type": "string", + "default": null, + "nullable": true + }, + "moduleStatus": { + "description": "Module status", + "type": "integer", + "default": null, + "readOnly": true, + "nullable": true + }, + "eventCustomId": { + "description": "Events Custom Id", + "type": "string", + "default": null, + "nullable": true + } + }, + "type": "object" + }, "EventFilter": { "properties": { "idEventFilter": { @@ -2529,6 +2819,96 @@ } ] }, + "PandoraITSMInventory": { + "properties": { + "idPandoraITSMInventory": { + "description": "Id Agent pandoraITSMInventory", + "type": "integer", + "readOnly": true, + "nullable": false + }, + "agentAlias": { + "description": "Agent Name pandoraITSMInventory", + "type": "string", + "default": null, + "nullable": true + }, + "osVersion": { + "description": "Agent os version pandoraITSMInventory", + "type": "string", + "default": null, + "nullable": true + }, + "agentAddress": { + "description": "Agent address pandoraITSMInventory", + "type": "string", + "default": null, + "nullable": true + }, + "agentUrlAddress": { + "description": "Agent url address pandoraITSMInventory", + "type": "string", + "default": null, + "nullable": true + }, + "agentDisabled": { + "description": "Agent disable pandoraITSMInventory", + "type": "boolean", + "default": null, + "nullable": true + }, + "groupName": { + "description": "Agent group name pandoraITSMInventory", + "type": "string", + "default": null, + "nullable": true + }, + "groupId": { + "description": "Agent group id pandoraITSMInventory", + "type": "integer", + "default": null, + "nullable": true + }, + "osName": { + "description": "Agent OS name pandoraITSMInventory", + "type": "string", + "default": null, + "nullable": true + } + }, + "type": "object" + }, + "PandoraITSMInventoryFilter": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/PandoraITSMInventory" + }, + { + "properties": { + "idPandoraITSMInventory": { + "default": null, + "readOnly": false + }, + "freeSearch": { + "description": "Find word in name field.", + "type": "string", + "default": null, + "nullable": true + } + }, + "type": "object" + }, + { + "properties": { + "multipleSearch": { + "$ref": "#/components/schemas/multipleSearch" + } + }, + "type": "object" + } + ] + }, "Profile": { "properties": { "idProfile": { @@ -2707,6 +3087,42 @@ } ] }, + "multipleSearch": { + "properties": { + "field": { + "description": "Field to search of query", + "type": "string", + "nullable": true + }, + "data": { + "description": "Values to search of query IN()", + "type": "array", + "items": { + "type": "integer" + }, + "nullable": true + } + }, + "type": "object" + }, + "multipleSearchString": { + "properties": { + "field": { + "description": "Field to search of query", + "type": "string", + "nullable": true + }, + "data": { + "description": "Values to search of query IN()", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "type": "object" + }, "paginationData": { "description": "Info pagination data", "properties": { @@ -3196,12 +3612,14 @@ "type": "string", "default": null, "nullable": true - }, + } + }, + "type": "object" + }, + { + "properties": { "multipleSearchString": { - "description": "search string in field.", - "type": "string", - "default": null, - "nullable": true + "$ref": "#/components/schemas/multipleSearch" } }, "type": "object" @@ -3316,6 +3734,16 @@ } } }, + "ResponseEvent": { + "description": "Event object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Event" + } + } + } + }, "ResponseEventFilter": { "description": "EventFilter object", "content": { @@ -3336,6 +3764,16 @@ } } }, + "ResponsePandoraITSMInventory": { + "description": "PandoraITSMInventory object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PandoraITSMInventory" + } + } + } + }, "ResponseProfile": { "description": "Profile object", "content": { @@ -3499,6 +3937,16 @@ "default": 1 } }, + "parameterIdEvent": { + "name": "idEvent", + "in": "path", + "description": "Event id", + "required": true, + "schema": { + "type": "integer", + "default": 1 + } + }, "parameterIdEventFilter": { "name": "idEventFilter", "in": "path", @@ -3519,6 +3967,16 @@ "default": 1 } }, + "parameterIdPandoraITSMInventory": { + "name": "idPandoraITSMInventory", + "in": "path", + "description": "PandoraITSMInventory id", + "required": true, + "schema": { + "type": "integer", + "default": 1 + } + }, "parameterIdProfile": { "name": "idProfile", "in": "path", @@ -3642,6 +4100,16 @@ } } }, + "requestBodyEvent": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Event" + } + } + } + }, "requestBodyEventFilter": { "required": true, "content": { @@ -3682,6 +4150,26 @@ } } }, + "requestBodyPandoraITSMInventory": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PandoraITSMInventory" + } + } + } + }, + "requestBodyPandoraITSMInventoryFilter": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PandoraITSMInventoryFilter" + } + } + } + }, "requestBodyProfile": { "required": true, "content": { @@ -3797,6 +4285,10 @@ { "name": "Users", "description": "API Endpoints of users" + }, + { + "name": "PandoraITSM", + "description": "API Endpoints of integration pandoraITSM" } ] } diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index 379ab17621..91943a5994 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -1747,3 +1747,5 @@ enterprise/include/class/MySQL.app.php enterprise/include/class/Oracle.app.php enterprise/include/class/SAP.app.php enterprise/include/class/VMware.app.php +enterprise/include/class/DatabaseHA.class.php +enterprise/godmode/servers/HA_cluster.php diff --git a/pandora_console/extras/demodata/network_maps/1-networkmap.prd b/pandora_console/extras/demodata/network_maps/1-networkmap.prd index bcadf421bd..df1adcbc1c 100644 --- a/pandora_console/extras/demodata/network_maps/1-networkmap.prd +++ b/pandora_console/extras/demodata/network_maps/1-networkmap.prd @@ -53,7 +53,7 @@ refresh[2]="0" source[2]="0" source_data[2]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}" options[2]="" -style[2]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}" +style[2]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-1\"}" id[3]="3" id_map[3]="2" @@ -66,7 +66,7 @@ refresh[3]="0" source[3]="0" source_data[3]="{\"tagente\":{\"nombre\":\"macos-1\"}}" options[3]="" -style[3]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}" +style[3]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-1\"}" id[4]="4" id_map[4]="2" @@ -79,7 +79,7 @@ refresh[4]="0" source[4]="0" source_data[4]="{\"tagente\":{\"nombre\":\"windows-1\"}}" options[4]="" -style[4]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}" +style[4]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-1\"}" id[5]="5" id_map[5]="2" @@ -92,7 +92,7 @@ refresh[5]="0" source[5]="0" source_data[5]="{\"tagente\":{\"nombre\":\"windows-2\"}}" options[5]="" -style[5]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}" +style[5]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-2\"}" id[6]="6" id_map[6]="2" @@ -105,7 +105,7 @@ refresh[6]="0" source[6]="0" source_data[6]="{\"tagente\":{\"nombre\":\"linux-1\"}}" options[6]="" -style[6]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}" +style[6]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-1\"}" id[7]="7" id_map[7]="2" @@ -118,7 +118,7 @@ refresh[7]="0" source[7]="0" source_data[7]="{\"tagente\":{\"nombre\":\"linux-2\"}}" options[7]="" -style[7]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}" +style[7]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-2\"}" id[8]="8" id_map[8]="2" @@ -131,7 +131,7 @@ refresh[8]="0" source[8]="0" source_data[8]="{\"tagente\":{\"nombre\":\"linux-3\"}}" options[8]="" -style[8]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}" +style[8]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-3\"}" id[9]="9" id_map[9]="2" @@ -144,7 +144,7 @@ refresh[9]="0" source[9]="0" source_data[9]="{\"tagente\":{\"nombre\":\"linux-4\"}}" options[9]="" -style[9]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}" +style[9]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-4\"}" id[10]="10" id_map[10]="2" @@ -157,7 +157,7 @@ refresh[10]="0" source[10]="0" source_data[10]="{\"tagente\":{\"nombre\":\"cisco-2\"}}" options[10]="" -style[10]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}" +style[10]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-2\"}" id[11]="11" id_map[11]="2" @@ -170,7 +170,7 @@ refresh[11]="0" source[11]="0" source_data[11]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}" options[11]="" -style[11]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}" +style[11]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-2\"}" id[12]="12" id_map[12]="2" @@ -183,7 +183,7 @@ refresh[12]="0" source[12]="0" source_data[12]="{\"tagente\":{\"nombre\":\"macos-2\"}}" options[12]="" -style[12]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}" +style[12]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-2\"}" id[13]="13" id_map[13]="2" @@ -196,7 +196,7 @@ refresh[13]="0" source[13]="0" source_data[13]="{\"tagente\":{\"nombre\":\"windows-3\"}}" options[13]="" -style[13]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}" +style[13]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-3\"}" id[14]="14" id_map[14]="2" @@ -209,7 +209,7 @@ refresh[14]="0" source[14]="0" source_data[14]="{\"tagente\":{\"nombre\":\"windows-4\"}}" options[14]="" -style[14]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}" +style[14]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-4\"}" id[15]="15" id_map[15]="2" @@ -222,7 +222,7 @@ refresh[15]="0" source[15]="0" source_data[15]="{\"tagente\":{\"nombre\":\"linux-5\"}}" options[15]="" -style[15]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}" +style[15]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-5\"}" id[16]="16" id_map[16]="2" @@ -235,7 +235,7 @@ refresh[16]="0" source[16]="0" source_data[16]="{\"tagente\":{\"nombre\":\"linux-6\"}}" options[16]="" -style[16]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}" +style[16]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-6\"}" id[17]="17" id_map[17]="2" @@ -248,7 +248,7 @@ refresh[17]="0" source[17]="0" source_data[17]="{\"tagente\":{\"nombre\":\"linux-7\"}}" options[17]="" -style[17]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}" +style[17]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-7\"}" id[18]="18" id_map[18]="2" @@ -261,7 +261,7 @@ refresh[18]="0" source[18]="0" source_data[18]="{\"tagente\":{\"nombre\":\"linux-8\"}}" options[18]="" -style[18]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}" +style[18]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-8\"}" id[19]="19" id_map[19]="2" @@ -274,7 +274,7 @@ refresh[19]="0" source[19]="0" source_data[19]="{\"tagente\":{\"nombre\":\"cisco-3\"}}" options[19]="" -style[19]="{\"shape\":\"circle\",\"image\":\"images/networkmap/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}" +style[19]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/cisco@os.svg\",\"width\":null,\"height\":null,\"label\":\"cisco-3\"}" id[20]="20" id_map[20]="2" @@ -287,7 +287,7 @@ refresh[20]="0" source[20]="0" source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" options[20]="" -style[20]="{\"shape\":\"circle\",\"image\":\"images/networkmap/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}" +style[20]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/freebsd@os.svg\",\"width\":null,\"height\":null,\"label\":\"freebsd-3\"}" id[21]="21" id_map[21]="2" @@ -300,7 +300,7 @@ refresh[21]="0" source[21]="0" source_data[21]="{\"tagente\":{\"nombre\":\"macos-3\"}}" options[21]="" -style[21]="{\"shape\":\"circle\",\"image\":\"images/networkmap/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}" +style[21]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/apple@os.svg\",\"width\":null,\"height\":null,\"label\":\"macos-3\"}" id[22]="22" id_map[22]="2" @@ -313,7 +313,7 @@ refresh[22]="0" source[22]="0" source_data[22]="{\"tagente\":{\"nombre\":\"windows-5\"}}" options[22]="" -style[22]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}" +style[22]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-5\"}" id[23]="23" id_map[23]="2" @@ -326,7 +326,7 @@ refresh[23]="0" source[23]="0" source_data[23]="{\"tagente\":{\"nombre\":\"windows-6\"}}" options[23]="" -style[23]="{\"shape\":\"circle\",\"image\":\"images/networkmap/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}" +style[23]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/windows@os.svg\",\"width\":null,\"height\":null,\"label\":\"windows-6\"}" id[24]="24" id_map[24]="2" @@ -339,7 +339,7 @@ refresh[24]="0" source[24]="0" source_data[24]="{\"tagente\":{\"nombre\":\"linux-9\"}}" options[24]="" -style[24]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}" +style[24]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-9\"}" id[25]="25" id_map[25]="2" @@ -352,7 +352,7 @@ refresh[25]="0" source[25]="0" source_data[25]="{\"tagente\":{\"nombre\":\"linux-10\"}}" options[25]="" -style[25]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}" +style[25]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-10\"}" id[26]="26" id_map[26]="2" @@ -365,7 +365,7 @@ refresh[26]="0" source[26]="0" source_data[26]="{\"tagente\":{\"nombre\":\"linux-11\"}}" options[26]="" -style[26]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}" +style[26]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-11\"}" id[27]="27" id_map[27]="2" @@ -378,13 +378,13 @@ refresh[27]="0" source[27]="0" source_data[27]="{\"tagente\":{\"nombre\":\"linux-12\"}}" options[27]="" -style[27]="{\"shape\":\"circle\",\"image\":\"images/networkmap/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}" +style[27]="{\"shape\":\"circle\",\"image\":\"images\/networkmap\/linux@os.svg\",\"width\":null,\"height\":null,\"label\":\"linux-12\"}" [trel_item] id[1]="1" -id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"11\",\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}" +id_parent[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[1]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-1\"}},\"x\":\"1184\",\"y\":\"-25\",\"z\":\"0\"}}" id_map[1]="2" id_parent_source_data[1]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[1]="{\"tagente\":{\"nombre\":\"freebsd-1\"}}" @@ -394,8 +394,8 @@ id_item[1]="0" deleted[1]="0" id[2]="2" -id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}" +id_parent[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[2]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}" id_map[2]="2" id_parent_source_data[2]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[2]="{\"tagente\":{\"nombre\":\"macos-1\"}}" @@ -405,8 +405,8 @@ id_item[2]="0" deleted[2]="0" id[3]="3" -id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}" +id_parent[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[3]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}" id_map[3]="2" id_parent_source_data[3]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[3]="{\"tagente\":{\"nombre\":\"windows-1\"}}" @@ -416,8 +416,8 @@ id_item[3]="0" deleted[3]="0" id[4]="4" -id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}" +id_parent[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[4]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}" id_map[4]="2" id_parent_source_data[4]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[4]="{\"tagente\":{\"nombre\":\"windows-2\"}}" @@ -427,8 +427,8 @@ id_item[4]="0" deleted[4]="0" id[5]="5" -id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}" -id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"4\",\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}" +id_parent[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}" +id_child[5]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-1\"}},\"x\":\"342\",\"y\":\"-273\",\"z\":\"0\"}}" id_map[5]="2" id_parent_source_data[5]="{\"tagente\":{\"nombre\":\"windows-1\"}}" id_child_source_data[5]="{\"tagente\":{\"nombre\":\"linux-1\"}}" @@ -438,8 +438,8 @@ id_item[5]="0" deleted[5]="0" id[6]="6" -id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"8\",\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}" -id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"5\",\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}" +id_parent[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-1\"}},\"x\":\"528\",\"y\":\"-37\",\"z\":\"0\"}}" +id_child[6]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-2\"}},\"x\":\"240\",\"y\":\"-7\",\"z\":\"0\"}}" id_map[6]="2" id_parent_source_data[6]="{\"tagente\":{\"nombre\":\"windows-1\"}}" id_child_source_data[6]="{\"tagente\":{\"nombre\":\"linux-2\"}}" @@ -449,8 +449,8 @@ id_item[6]="0" deleted[6]="0" id[7]="7" -id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}" -id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"6\",\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}" +id_parent[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}" +id_child[7]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-3\"}},\"x\":\"214\",\"y\":\"275\",\"z\":\"0\"}}" id_map[7]="2" id_parent_source_data[7]="{\"tagente\":{\"nombre\":\"windows-2\"}}" id_child_source_data[7]="{\"tagente\":{\"nombre\":\"linux-3\"}}" @@ -460,8 +460,8 @@ id_item[7]="0" deleted[7]="0" id[8]="8" -id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"9\",\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}" -id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}" +id_parent[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-2\"}},\"x\":\"514\",\"y\":\"389\",\"z\":\"0\"}}" +id_child[8]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}" id_map[8]="2" id_parent_source_data[8]="{\"tagente\":{\"nombre\":\"windows-2\"}}" id_child_source_data[8]="{\"tagente\":{\"nombre\":\"linux-4\"}}" @@ -471,8 +471,8 @@ id_item[8]="0" deleted[8]="0" id[9]="9" -id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}" +id_parent[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[9]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}" id_map[9]="2" id_parent_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[9]="{\"tagente\":{\"nombre\":\"cisco-2\"}}" @@ -482,8 +482,8 @@ id_item[9]="0" deleted[9]="0" id[10]="10" -id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"21\",\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}" +id_parent[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[10]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-2\"}},\"x\":\"892\",\"y\":\"-47\",\"z\":\"0\"}}" id_map[10]="2" id_parent_source_data[10]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[10]="{\"tagente\":{\"nombre\":\"freebsd-2\"}}" @@ -493,8 +493,8 @@ id_item[10]="0" deleted[10]="0" id[11]="11" -id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"12\",\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" -id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"20\",\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}" +id_parent[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-1\"}},\"x\":\"854\",\"y\":\"221\",\"z\":\"0\"}}" +id_child[11]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-2\"}},\"x\":\"1150\",\"y\":\"409\",\"z\":\"0\"}}" id_map[11]="2" id_parent_source_data[11]="{\"tagente\":{\"nombre\":\"cisco-1\"}}" id_child_source_data[11]="{\"tagente\":{\"nombre\":\"macos-2\"}}" @@ -504,8 +504,8 @@ id_item[11]="0" deleted[11]="0" id[12]="12" -id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}" -id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}" +id_parent[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}" +id_child[12]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}" id_map[12]="2" id_parent_source_data[12]="{\"tagente\":{\"nombre\":\"cisco-2\"}}" id_child_source_data[12]="{\"tagente\":{\"nombre\":\"windows-3\"}}" @@ -515,8 +515,8 @@ id_item[12]="0" deleted[12]="0" id[13]="13" -id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"22\",\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}" -id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}" +id_parent[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-2\"}},\"x\":\"1036\",\"y\":\"711\",\"z\":\"0\"}}" +id_child[13]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}" id_map[13]="2" id_parent_source_data[13]="{\"tagente\":{\"nombre\":\"cisco-2\"}}" id_child_source_data[13]="{\"tagente\":{\"nombre\":\"windows-4\"}}" @@ -526,8 +526,8 @@ id_item[13]="0" deleted[13]="0" id[14]="14" -id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}" -id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"14\",\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}" +id_parent[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}" +id_child[14]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-5\"}},\"x\":\"314\",\"y\":\"845\",\"z\":\"0\"}}" id_map[14]="2" id_parent_source_data[14]="{\"tagente\":{\"nombre\":\"windows-3\"}}" id_child_source_data[14]="{\"tagente\":{\"nombre\":\"linux-5\"}}" @@ -537,8 +537,8 @@ id_item[14]="0" deleted[14]="0" id[15]="15" -id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"18\",\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}" -id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"15\",\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}" +id_parent[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-3\"}},\"x\":\"686\",\"y\":\"875\",\"z\":\"0\"}}" +id_child[15]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-6\"}},\"x\":\"474\",\"y\":\"1043\",\"z\":\"0\"}}" id_map[15]="2" id_parent_source_data[15]="{\"tagente\":{\"nombre\":\"windows-3\"}}" id_child_source_data[15]="{\"tagente\":{\"nombre\":\"linux-6\"}}" @@ -548,8 +548,8 @@ id_item[15]="0" deleted[15]="0" id[16]="16" -id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}" -id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"16\",\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}" +id_parent[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}" +id_child[16]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-7\"}},\"x\":\"1812\",\"y\":\"1011\",\"z\":\"0\"}}" id_map[16]="2" id_parent_source_data[16]="{\"tagente\":{\"nombre\":\"windows-4\"}}" id_child_source_data[16]="{\"tagente\":{\"nombre\":\"linux-7\"}}" @@ -559,8 +559,8 @@ id_item[16]="0" deleted[16]="0" id[17]="17" -id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"19\",\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}" -id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"17\",\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}" +id_parent[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-4\"}},\"x\":\"1452\",\"y\":\"847\",\"z\":\"0\"}}" +id_child[17]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-8\"}},\"x\":\"1828\",\"y\":\"723\",\"z\":\"0\"}}" id_map[17]="2" id_parent_source_data[17]="{\"tagente\":{\"nombre\":\"windows-4\"}}" id_child_source_data[17]="{\"tagente\":{\"nombre\":\"linux-8\"}}" @@ -570,8 +570,8 @@ id_item[17]="0" deleted[17]="0" id[18]="18" -id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"10\",\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}" -id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}" +id_parent[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-1\"}},\"x\":\"1268\",\"y\":\"235\",\"z\":\"0\"}}" +id_child[18]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}" id_map[18]="2" id_parent_source_data[18]="{\"tagente\":{\"nombre\":\"macos-1\"}}" id_child_source_data[18]="{\"tagente\":{\"nombre\":\"cisco-3\"}}" @@ -581,8 +581,8 @@ id_item[18]="0" deleted[18]="0" id[19]="19" -id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"7\",\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}" -id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" +id_parent[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-4\"}},\"x\":\"226\",\"y\":\"595\",\"z\":\"0\"}}" +id_child[19]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" id_map[19]="2" id_parent_source_data[19]="{\"tagente\":{\"nombre\":\"linux-4\"}}" id_child_source_data[19]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" @@ -592,8 +592,8 @@ id_item[19]="0" deleted[19]="0" id[20]="20" -id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" -id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"30\",\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}" +id_parent[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" +id_child[20]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"macos-3\"}},\"x\":\"-140\",\"y\":\"299\",\"z\":\"0\"}}" id_map[20]="2" id_parent_source_data[20]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" id_child_source_data[20]="{\"tagente\":{\"nombre\":\"macos-3\"}}" @@ -603,8 +603,8 @@ id_item[20]="0" deleted[20]="0" id[21]="21" -id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" -id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"28\",\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}" +id_parent[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" +id_child[21]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-5\"}},\"x\":\"-390\",\"y\":\"385\",\"z\":\"0\"}}" id_map[21]="2" id_parent_source_data[21]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" id_child_source_data[21]="{\"tagente\":{\"nombre\":\"windows-5\"}}" @@ -614,8 +614,8 @@ id_item[21]="0" deleted[21]="0" id[22]="22" -id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" -id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"29\",\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}" +id_parent[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" +id_child[22]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"windows-6\"}},\"x\":\"-470\",\"y\":\"671\",\"z\":\"0\"}}" id_map[22]="2" id_parent_source_data[22]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" id_child_source_data[22]="{\"tagente\":{\"nombre\":\"windows-6\"}}" @@ -625,8 +625,8 @@ id_item[22]="0" deleted[22]="0" id[23]="23" -id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" -id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"24\",\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}" +id_parent[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" +id_child[23]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-9\"}},\"x\":\"-296\",\"y\":\"899\",\"z\":\"0\"}}" id_map[23]="2" id_parent_source_data[23]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" id_child_source_data[23]="{\"tagente\":{\"nombre\":\"linux-9\"}}" @@ -636,8 +636,8 @@ id_item[23]="0" deleted[23]="0" id[24]="24" -id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"31\",\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" -id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"25\",\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}" +id_parent[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"freebsd-3\"}},\"x\":\"-82\",\"y\":\"583\",\"z\":\"0\"}}" +id_child[24]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-10\"}},\"x\":\"-25\",\"y\":\"961\",\"z\":\"0\"}}" id_map[24]="2" id_parent_source_data[24]="{\"tagente\":{\"nombre\":\"freebsd-3\"}}" id_child_source_data[24]="{\"tagente\":{\"nombre\":\"linux-10\"}}" @@ -647,8 +647,8 @@ id_item[24]="0" deleted[24]="0" id[25]="25" -id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}" -id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"26\",\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}" +id_parent[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}" +id_child[25]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-11\"}},\"x\":\"1683\",\"y\":\"13\",\"z\":\"0\"}}" id_map[25]="2" id_parent_source_data[25]="{\"tagente\":{\"nombre\":\"cisco-3\"}}" id_child_source_data[25]="{\"tagente\":{\"nombre\":\"linux-11\"}}" @@ -658,8 +658,8 @@ id_item[25]="0" deleted[25]="0" id[26]="26" -id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"32\",\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}" -id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":\"27\",\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}" +id_parent[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"cisco-3\"}},\"x\":\"1824\",\"y\":\"285\",\"z\":\"0\"}}" +id_child[26]="{\"titem\":{\"id_map\":\"2\",\"type\":\"0\",\"source_data\":{\"tagente\":{\"nombre\":\"linux-12\"}},\"x\":\"2135\",\"y\":\"51\",\"z\":\"0\"}}" id_map[26]="2" id_parent_source_data[26]="{\"tagente\":{\"nombre\":\"cisco-3\"}}" id_child_source_data[26]="{\"tagente\":{\"nombre\":\"linux-12\"}}" diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 91dc80032c..19dfe33d6d 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -2,6 +2,9 @@ START TRANSACTION; DROP TABLE tskin; +ALTER TABLE `tusuario` +ADD COLUMN `stop_lts_modal` TINYINT NOT NULL DEFAULT 0 AFTER `session_max_time_expire`; + -- START MIGRATION MSSQL -- SET @current_app_type = 12; SET @short_name = 'pandorafms.mssql'; @@ -7673,4 +7676,36 @@ UPDATE `trecon_task` -- END MIGRATION SAP DESET -- + +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/06_web_monitoring' WHERE title = '¿Sabías que puedes monitorizar webs?'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp' WHERE title = 'Monitorización remota de dispositivos SNMP'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas' WHERE title = 'Monitorizar rutas desde una IP a otra'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas' WHERE title = 'Paradas planificadas'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/pandorafms/management_and_operation/01_alerts#configuracion_de_correos_para_alertas_en_pandora_fms' WHERE title = 'Personalizar los emails de alerta '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=es/documentation/04_using/05_data_presentation_visual_maps' WHERE title = 'Usando iconos personalizados en consolas visuales '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color' WHERE title = 'Consolas visuales: mapas de calor '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#log_de_auditoria' WHERE title = 'Auditoría interna de la consola '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes' WHERE title = 'Sistema de provisión automática de agentes '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red' WHERE title = 'Enlaces de red en la consola visual '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad' WHERE title = 'Gráficas de disponibilidad '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy' WHERE title = 'Política de contraseñas'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication' WHERE title = 'Autenticación de doble factor '; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/06_web_monitoring' WHERE title = 'Did you know that you can monitor websites?'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/11_managing_and_administration#log_de_auditoria' WHERE title = 'Console Internal Audit'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%' WHERE title = 'Two-factor authentication'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/05_data_presentation_visual_maps#mapa_de_cal' WHERE title = 'Visual consoles: heat maps'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red' WHERE title = 'Network links in the visual console'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/08_data_presentation_reports#grafico_de_disp' WHERE title = 'Availability graphs'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp' WHERE title = 'Remote monitoring of SNMP devices'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas' WHERE title = 'Monitor routes from one IP to another'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/11_managing_and_administration#scheduled_downtimes' WHERE title = 'Scheduled downtimes'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/01_alerts#editing_an_action' WHERE title = 'Customize alert emails'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B' WHERE title = 'password policy'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic agent provision system'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic agent provision system'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/02_installation/05_configuration_agents#conf' WHERE title = 'Automatic agent provision system'; +UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id=en/documentation/04_using/05_data_presentation_visual_maps' WHERE title = 'Using custom icons in visual consoles'; + +DELETE FROM tconfig WHERE `token` = 'legacy_database_ha'; + COMMIT; \ No newline at end of file diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 5502fec94f..1596ec7d80 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -599,21 +599,12 @@ echo sprintf('
', $menuTypeClass); function filter_notification() { let notification_type = ''; $('.notification-item').hide(); - $(".checkbox_filter_notifications:checkbox:checked").each(function() { - notification_type = $(this).val(); - console.log(notification_type); - $('.notification-item[value='+notification_type+']').show(); - if (notification_type == 'All'){ - $('.notification-item').show(); - } - }); + notification_type = $("#notifications_filter_options").val() - if (notification_type == 'All'){ + if (notification_type === 'All') { $('.notification-item').show(); - } - - if (notification_type == ''){ - $('.notification-item').hide(); + } else { + $('.notification-item[value='+notification_type+']').show(); } } @@ -1058,8 +1049,10 @@ echo sprintf('
', $menuTypeClass); }) } }, + closeOnEscape: true, onload: () => { $(document).ready(function () { + $(".ui-dialog-titlebar-close").hide(); var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix"); $(buttonpane).append(`
diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index c69cf0de52..eb3b49c055 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -662,13 +662,16 @@ if ($modules !== false) { $table->width = '100%'; $table->class = 'tactical_table info_table'; $table->head = []; - $table->head['checkbox'] = html_print_checkbox( - 'all_delete', - 0, - false, - true, - false - ); + if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) { + $table->head['checkbox'] = html_print_checkbox( + 'all_delete', + 0, + false, + true, + false + ); + } + $table->head[0] = ''.__('Name').''.ui_get_sorting_arrows( $url_name.'up', $url_name.'down', @@ -1262,23 +1265,11 @@ html_print_div( $('#modal').dialog("close"); }); - $('[id^=checkbox-id_delete]').change(function(){ - if($(this).parent().parent().hasClass('checkselected')){ - $(this).parent().parent().removeClass('checkselected'); - } - else{ - $(this).parent().parent().addClass('checkselected'); - } - }); - - $('[id^=checkbox-all_delete]').change(function(){ if ($("#checkbox-all_delete").prop("checked")) { - $('[id^=checkbox-id_delete]').parent().parent().addClass('checkselected'); $("[name^=id_delete").prop("checked", true); } else{ - $('[id^=checkbox-id_delete]').parent().parent().removeClass('checkselected'); $("[name^=id_delete").prop("checked", false); } }); diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php index 1cba97ca1e..191c1bad69 100644 --- a/pandora_console/godmode/groups/configure_group.php +++ b/pandora_console/godmode/groups/configure_group.php @@ -259,12 +259,12 @@ $table->data[3][1] = html_print_label_input_block( $table->data[4][0] = html_print_label_input_block( __('Contact').ui_print_help_tip(__('Contact information accessible through the _groupcontact_ macro'), true), - html_print_textarea('contact', 4, 40, $contact, "class='min-height-0px'", true) + html_print_input_text('contact', $contact, '', false, '', true) ); $table->data[4][1] = html_print_label_input_block( __('Other').ui_print_help_tip(__('Information accessible through the _group_other_ macro'), true), - html_print_textarea('other', 4, 40, $other, "class='min-height-0px'", true) + html_print_input_text('other', $other, '', false, '', true) ); $table->data[5][0] = html_print_label_input_block( diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 26ab73603c..4bed6d4f35 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -628,7 +628,7 @@ if (is_metaconsole() === true) { $url = 'index.php?sec=advanced&sec2=advanced/massive_operations&tab=massive_agents&pure=0&option=edit_agents'; } -echo '
'; +echo ''; echo html_print_avoid_autocomplete(); $params = [ 'id_group' => ($id_group ?? ''), @@ -651,14 +651,11 @@ echo '
- + \ No newline at end of file + + '0'], + ['id_user' => $config['id_user']], + ); + } + ui_print_result_message( $result, __('Succesful Update the url config vars.'), diff --git a/pandora_console/include/ajax/demo_data.ajax.php b/pandora_console/include/ajax/demo_data.ajax.php index 38b2b55bef..bb92a21540 100644 --- a/pandora_console/include/ajax/demo_data.ajax.php +++ b/pandora_console/include/ajax/demo_data.ajax.php @@ -789,7 +789,6 @@ if ($action === 'create_demo_data') { } // Get last trap in database. - /* $id_trap_begin = db_get_value( 'MAX(id_trap)', @@ -1068,37 +1067,37 @@ if ($action === 'cleanup_demo_data') { $demo_items = db_get_all_rows_in_table('tdemo_data'); - $module_items = array_filter( - $demo_items, + $module_items = array_map( function ($item) { - return ($item['table_name'] === 'tagente_modulo'); - } + $json_data = json_decode($item['item_id'], true); + return $json_data['id_agente_modulo']; + }, + array_filter( + $demo_items, + function ($item) { + return ($item['table_name'] === 'tagente_modulo'); + } + ) ); - $inventory_module_items = array_filter( - $demo_items, + $inventory_module_items = array_map( function ($item) { - return ($item['table_name'] === 'tagent_module_inventory'); - } + $json_data = json_decode($item['item_id'], true); + return $json_data['id_agent_module_inventory']; + }, + array_filter( + $demo_items, + function ($item) { + return ($item['table_name'] === 'tagent_module_inventory'); + } + ) ); - $items_delete_id_bfr = []; - - foreach ($inventory_module_items as $item) { - $items_delete_id_bfr[] = $item['item_id']; - } - - $in_clause = implode(',', $items_delete_id_bfr); + $in_clause = implode(',', $inventory_module_items); // Delete data from tagente_datos_inventory given inventory module id. db_process_sql('DELETE FROM tagente_datos_inventory where id_agent_module_inventory IN ('.$in_clause.')'); - $items_delete_id_bfr = []; - - foreach ($module_items as $item) { - $items_delete_id_bfr[] = $item['item_id']; - } - - $in_clause = implode(',', $items_delete_id_bfr); + $in_clause = implode(',', $module_items); // Delete data from tagente_datos give agent module id. db_process_sql('DELETE FROM tagente_datos where id_agente_modulo IN ('.$in_clause.')'); diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 0e723cafe8..5d6caccbac 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1196,7 +1196,7 @@ if (check_login()) { $data[2] .= ui_print_truncate_text($module['nombre'], 'module_medium', false, true, true, '…', 'font-size: 9pt;'); $data[2] .= ''; if (empty($module['extended_info']) === false) { - $data[2] .= ui_print_help_tip($module['extended_info'], true, '/images/default_list.png'); + $data[2] .= ui_print_help_tip(io_safe_output($module['extended_info']), true, '/images/default_list.png'); } // Adds tag context information. diff --git a/pandora_console/include/ajax/task_to_perform.php b/pandora_console/include/ajax/task_to_perform.php index b943ee29a5..331f1be199 100644 --- a/pandora_console/include/ajax/task_to_perform.php +++ b/pandora_console/include/ajax/task_to_perform.php @@ -48,16 +48,17 @@ if ($check_web) { if ($status_webserver === '1') { $name = array_keys(servers_get_names())[0]; $id_group = get_parameter('id_group', 4); + $agent_name = get_parameter('module_name', 'Web monitoring'); $array_other['data'] = [ - 'Web monitoring', + $agent_name, '', 2, $id_group, 0, 30, 30, - 9, + 11, $name, 0, 0, diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 7292e794aa..5214e4bb23 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -1358,9 +1358,12 @@ class AgentWizard extends HTML $table->rowstyle[$i] = 'color:#ccc;'; $data[0] .= ' '; $data[0] .= html_print_image( - 'images/alert-warning@svg.svg', + 'images/info-warning.svg', true, - ['title' => $msgError] + [ + 'title' => $msgError, + 'class' => 'main_menu_icon', + ] ); } diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index 54408c3cb8..87e24df349 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -262,20 +262,24 @@ class AgentsAlerts extends HTML $data[0] = io_safe_output($agent_module['alias']); $data[1] = io_safe_output($agent_module['nombre']); $uniqid = $agent_module['id_agente_modulo']; - $data[2] = html_print_anchor( - [ - 'href' => sprintf( - 'javascript:show_add_alerts(\'%s\')', - $uniqid - ), - 'content' => html_print_image( - 'images/add_mc.png', - true, - ['class' => 'main_menu_icon invert_filter'] - ), - ], - true - ); + if (check_acl($this->idUser, 0, 'LM')) { + $data[2] = html_print_anchor( + [ + 'href' => sprintf( + 'javascript:show_add_alerts(\'%s\')', + $uniqid + ), + 'content' => html_print_image( + 'images/add_mc.png', + true, + ['class' => 'main_menu_icon invert_filter'] + ), + ], + true + ); + } else { + $data[2] = ''; + } array_push($table->data, $data); diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 9e9a1246b7..24af0a860c 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -3015,7 +3015,7 @@ class ConsoleSupervisor public function checkHaStatus() { global $config; - enterprise_include_once('include/class/DatabaseHA.class.php'); + enterprise_include_once('include/class/NewDatabaseHA.class.php'); $cluster = new DatabaseHA(); $nodes = $cluster->getNodes(); @@ -3038,7 +3038,7 @@ class ConsoleSupervisor 'type' => 'NOTIF.HAMASTER.MESSAGE', 'title' => __('Desynchronized operation on the node '.$node['host']), 'message' => __($message), - 'url' => '__url__/index.php?sec=gservers&sec2=enterprise/godmode/servers/HA_cluster', + 'url' => '__url__/index.php?sec=gservers&sec2=enterprise/godmode/servers/new_HA_cluster', 'icon_notification' => self::ICON_ERROR, ] ); diff --git a/pandora_console/include/class/Prd.class.php b/pandora_console/include/class/Prd.class.php index 00ed86ff40..bd1ab77fb1 100644 --- a/pandora_console/include/class/Prd.class.php +++ b/pandora_console/include/class/Prd.class.php @@ -280,6 +280,13 @@ class Prd */ private $itemsReferences; + /** + * Current prdData. + * + * @var array + */ + private $currentPrdData; + /** * Constructor. @@ -2282,12 +2289,37 @@ class Prd $value = implode($csv_separator, $ref_arr); } else { + $columns_ref = $this->getOneColumnRefs($ref['table']); + $value = $this->searchValue( $ref['columns'], $ref['table'], $ref['id'], $value ); + + // Get reference in value + if ($columns_ref !== false) { + foreach ($columns_ref as $col => $col_ref) { + if (array_key_exists($col, $value[$ref['table']])) { + $sql = sprintf( + 'SELECT * FROM %s WHERE %s = "%s"', + $ref['table'], + $col, + $value[$ref['table']][$col], + ); + $row = db_get_row_sql($sql); + + $this->getReferenceFromValue( + $ref['table'], + $col, + $col_ref, + $row, + $value[$ref['table']][$col] + ); + } + } + } } } @@ -2413,12 +2445,37 @@ class Prd $value = implode($csv_separator, $ref_arr); } else { + $columns_ref = $this->getOneColumnRefs($ref['table']); + $value = $this->searchValue( $ref['columns'], $ref['table'], $ref['id'], $value ); + + // Get reference in value + if ($columns_ref !== false) { + foreach ($columns_ref as $col => $col_ref) { + if (array_key_exists($col, $value[$ref['table']])) { + $sql = sprintf( + 'SELECT * FROM %s WHERE %s = "%s"', + $ref['table'], + $col, + $value[$ref['table']][$col], + ); + $row = db_get_row_sql($sql); + + $this->getReferenceFromValue( + $ref['table'], + $col, + $col_ref, + $row, + $value[$ref['table']][$col] + ); + } + } + } } } } @@ -2435,7 +2492,7 @@ class Prd * * @return boolean */ - private function getValueFromReference($table, $column, $reference, &$value) + private function getValueFromReference($table, $column, $reference, $item, &$value) { if (isset($reference['conditional_refs']) === true) { // Conditional refs. @@ -2445,8 +2502,8 @@ class Prd if (isset($condition['when']) === true && isset($condition['ref']) === true ) { - if (isset($this->currentItem['parsed'][array_key_first($condition['when'])]) === true) { - $compare_value = $this->currentItem['parsed'][array_key_first($condition['when'])]; + if (isset($item[array_key_first($condition['when'])]) === true) { + $compare_value = $item[array_key_first($condition['when'])]; if ($this->evalConditionalRef($compare_value, $condition['when']) === true && empty($value) === false @@ -2656,6 +2713,7 @@ class Prd $result = ''; $prd_data = $this->getOnePrdData($type); + $this->currentPrdData = $prd_data; if (empty($prd_data) === false) { $result .= '[prd_data]'.LINE_BREAK.LINE_BREAK; $result .= 'type="'.$type.'"'.LINE_BREAK; @@ -2903,6 +2961,7 @@ class Prd unset($data_file['prd_data']); $prd_data = $this->getOnePrdData($type); + $this->currentPrdData = $prd_data; if ($prd_data !== false) { // Begin transaction. $db = $config['dbconnection']; @@ -2941,6 +3000,7 @@ class Prd $table, $column, $column_refs[$column], + $this->currentItem['parsed'], $value ); @@ -2968,6 +3028,7 @@ class Prd $table, $column, $json_refs[$column][$json_key], + $this->currentItem['parsed'], $json_value ) === true ) { @@ -3064,8 +3125,42 @@ class Prd && empty($array_value[$ref['table']]) === false ) { $where = ''; + $columns_ref = $this->getOneColumnRefs($ref['table']); foreach ($ref['columns'] as $column_name) { if (isset($array_value[$ref['table']][$column_name])) { + // Get value from crossed reference in current value + if (isset($this->crossed_refs[$ref['table']]) === true + && empty($this->crossed_refs[$ref['table']]['ref']) === false + && in_array($column_name, $this->crossed_refs[$ref['table']]['ref']) + ) { + $parent_table = $this->crossed_refs[$ref['table']]['parent_table']; + foreach ($this->crossed_refs[$ref['table']]['ref'] as $k => $f) { + $itemReference = $this->getItemReference( + $parent_table, + $this->crossed_refs[$parent_table]['value'][$k], + $array_value[$ref['table']][$f] + ); + + if ($itemReference !== false) { + $array_value[$ref['table']][$column_name] = $itemReference; + } + } + } + + if ($columns_ref !== false) { + if (array_key_exists($column_name, $columns_ref)) { + $temp_value = $array_value[$ref['table']][$column_name]; + $temp_value = (is_array($temp_value) ? json_encode($temp_value) : $temp_value); + + // Get value from reference in current value + $ref_value = $this->getValueFromReference($ref['table'], $column_name, $columns_ref[$column_name], $array_value[$ref['table']], $temp_value); + + if ($ref_value === true) { + $array_value[$ref['table']][$column_name] = $temp_value; + } + } + } + $where .= sprintf( "%s = '%s' AND ", $column_name, diff --git a/pandora_console/include/class/WebServerModuleDebug.class.php b/pandora_console/include/class/WebServerModuleDebug.class.php index 872582e6a3..1683d32a9c 100644 --- a/pandora_console/include/class/WebServerModuleDebug.class.php +++ b/pandora_console/include/class/WebServerModuleDebug.class.php @@ -134,7 +134,7 @@ class WebServerModuleDebug extends Wizard public function showWebServerDebug() { // Show QueryResult editor. - ui_query_result_editor('webserverdebug'); + ui_query_result_editor('webserverdebug', false); // Spinner for wait loads. html_print_div( [ diff --git a/pandora_console/include/class/WelcomeWindow.class.php b/pandora_console/include/class/WelcomeWindow.class.php index 69d682a169..2c37f1150e 100644 --- a/pandora_console/include/class/WelcomeWindow.class.php +++ b/pandora_console/include/class/WelcomeWindow.class.php @@ -182,8 +182,10 @@ class WelcomeWindow extends Wizard }) } }, + closeOnEscape: true, onload: () => { $(document).ready(function () { + $(".ui-dialog-titlebar-close").hide(); var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix"); $(buttonpane).append(`
@@ -470,7 +472,7 @@ class WelcomeWindow extends Wizard ], [ 'arguments' => [ - 'label' => __('Cancel'), + 'label' => __('Change'), 'type' => 'button', 'attributes' => [ 'class' => (empty($btn_update_manager_class) === false) ? $btn_update_manager_class : 'invisible_important', @@ -498,7 +500,7 @@ class WelcomeWindow extends Wizard ], [ 'arguments' => [ - 'label' => __('Cancel'), + 'label' => __('Change'), 'type' => 'button', 'attributes' => [ 'class' => (empty($btn_configure_mail_class) === false) ? $btn_configure_mail_class : 'invisible_important', @@ -526,7 +528,7 @@ class WelcomeWindow extends Wizard ], [ 'arguments' => [ - 'label' => __('Cancel'), + 'label' => __('Change'), 'type' => 'button', 'attributes' => [ 'class' => (empty($btn_servers_up_class) === false) ? $btn_servers_up_class : 'invisible_important', @@ -554,7 +556,7 @@ class WelcomeWindow extends Wizard ], [ 'arguments' => [ - 'label' => __('Cancel'), + 'label' => __('Change'), 'type' => 'button', 'attributes' => [ 'class' => (empty($btn_license_valid_class) === false) ? $btn_license_valid_class : 'invisible_important', diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 817bcba26b..3180e9dba1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ use DI\ContainerBuilder; /* * Pandora build version and version */ -$build_version = 'PC240326'; +$build_version = 'PC240402'; $pandora_version = 'v7.0NG.776'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index b426753c9e..60d22cee1e 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1006,13 +1006,14 @@ function get_parameter($name, $default='') function get_parameter_date($name, $default='', $date_format='Y/m/d') { + // TODO: Configure default value. $date_end = get_parameter('date_end', 0); $time_end = get_parameter('time_end'); $datetime_end = strtotime($date_end.' '.$time_end); $custom_date = get_parameter('custom_date', 0); - $range = get_parameter('range', SECONDS_1DAY); - $date_text = get_parameter('range_text', SECONDS_1DAY); + $range = get_parameter($name, SECONDS_1DAY); + $date_text = get_parameter($name.'_text', SECONDS_1DAY); $date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY); $date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less)); $time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less)); @@ -1026,7 +1027,7 @@ function get_parameter_date($name, $default='', $date_format='Y/m/d') $date_end = date('Y/m/d H:i:s', $datetime_end); $period = ($datetime_end - $datetime_init); } else if ($custom_date === '2') { - $date_units = get_parameter('range_units'); + $date_units = get_parameter($name.'_units'); $date_end = date('Y/m/d H:i:s'); $date_init = date('Y/m/d H:i:s', (strtotime($date_end) - ((int) $date_text * (int) $date_units))); $period = (strtotime($date_end) - strtotime($date_init)); @@ -2427,11 +2428,6 @@ function check_login($output=true) return false; } - db_pandora_audit( - AUDIT_LOG_HACK_ATTEMPT, - 'Trying to access without a valid session', - 'N/A' - ); include $config['homedir'].'/general/noaccess.php'; exit; } diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index f7644e8919..12f79aa680 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -2311,27 +2311,36 @@ function agents_get_agent_with_ip($ip_address) /** * Get all IP addresses of an agent * - * @param int Agent id + * @param int Agent id + * @param bool Order by id * * @return array Array with the IP address of the given agent or an empty array. */ -function agents_get_addresses($id_agent) -{ +function agents_get_addresses( + $id_agent, + $order_by_id=false +) { + $order_clause = ($order_by_id === true) ? 'ORDER BY taddress.id_a DESC' : ''; + if (is_array($id_agent)) { $sql = sprintf( 'SELECT ip FROM taddress_agent, taddress WHERE taddress_agent.id_a = taddress.id_a - AND id_agent IN (%s)', - implode(',', $id_agent) + AND id_agent IN (%s) + %s', + implode(',', $id_agent), + $order_clause ); } else { $sql = sprintf( 'SELECT ip FROM taddress_agent, taddress WHERE taddress_agent.id_a = taddress.id_a - AND id_agent = %d', - $id_agent + AND id_agent = %d + %s', + $id_agent, + $order_clause ); } diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index ecfc06c1d1..baf09bd9fc 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -505,10 +505,6 @@ function config_update_config() $error_update[] = __('Enable Update Manager'); } - if (config_update_value('legacy_database_ha', get_parameter('legacy_database_ha'), true) === false) { - $error_update[] = __('Legacy database HA'); - } - if (config_update_value('agent_vulnerabilities', get_parameter('agent_vulnerabilities'), true) === false) { $error_update[] = __('agent_vulnerabilities'); } @@ -1976,6 +1972,27 @@ function config_update_config() $error_update[] = __('Pandora ITSM API agents sync'); } + $ITSM_mode_agents_sync = (int) get_parameter( + 'ITSM_mode_agents_sync', + $config['ITSM_mode_agents_sync'] + ); + if (config_update_value('ITSM_mode_agents_sync', $ITSM_mode_agents_sync, true) === false) { + $error_update[] = __('Pandora ITSM mode agents to synch'); + } + + $ITSM_groups_agents_sync = get_parameter( + 'ITSM_groups_agents_sync', + null + ); + + if (empty($ITSM_groups_agents_sync) === false) { + $ITSM_groups_agents_sync = json_encode($ITSM_groups_agents_sync); + } + + if (config_update_value('ITSM_groups_agents_sync', $ITSM_groups_agents_sync, true) === false) { + $error_update[] = __('Pandora ITSM groups agents to synch'); + } + $incident_default_group = (int) get_parameter('default_group', $config['default_group']); if (empty($incident_default_group) === true) { try { @@ -2430,10 +2447,6 @@ function config_process_config() config_update_value('enable_update_manager', 1); } - if (!isset($config['legacy_database_ha'])) { - config_update_value('legacy_database_ha', 0); - } - if (!isset($config['disabled_newsletter'])) { config_update_value('disabled_newsletter', 0); } @@ -3927,6 +3940,14 @@ function config_process_config() config_update_value('ITSM_agents_sync', 20); } + if (!isset($config['ITSM_mode_agents_sync'])) { + config_update_value('ITSM_mode_agents_sync', 0); + } + + if (!isset($config['ITSM_groups_agents_sync'])) { + config_update_value('ITSM_groups_agents_sync', null); + } + // Module Library. if (!isset($config['module_library_user'])) { config_update_value('module_library_user', ''); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 6da266d07f..be880a3655 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1946,9 +1946,9 @@ function events_get_all( case 'utimestamp': case 'criticity': case 'estado': - if ($a[$sort_field] === $b[$sort_field]) { + if ((isset($a[$sort_field]) === true && isset($b[$sort_field]) === true) && $a[$sort_field] === $b[$sort_field]) { $res = 0; - } else if ($a[$sort_field] > $b[$sort_field]) { + } else if ((isset($a[$sort_field]) === true && isset($b[$sort_field]) === true) && $a[$sort_field] > $b[$sort_field]) { $res = ($order === 'asc') ? 1 : (-1); } else { $res = ($order === 'asc') ? (-1) : 1; @@ -6539,3 +6539,165 @@ function event_print_graph( return $graph; } + + +/** + * Get comments of array events. + * + * @param array $events Array of events. + * @param array $filter Filter of view events. + * + * @return array + */ +function reduce_events_comments($events, $filter=null) +{ + $group_by_server = []; + foreach ($events as $key => $event) { + if (isset($group_by_server[$event['server_id']]) === false) { + $group_by_server[$event['server_id']] = []; + } + + $group_by_server[$event['server_id']][] = $event; + } + + $comments = []; + foreach ($group_by_server as $server_id => $events) { + $events_comments = event_get_comments_with_all_events($events, $filter, $server_id); + foreach ($events_comments as $key => $comment) { + $comments[$server_id.'_'.$comment['id_event']] = $comment; + } + } + + return $comments; +} + + +/** + * Ge all coments of events grouped by server. + * + * @param array $events Array of events. + * @param array $filter Filter of view events. + * @param integer $server_id Id of server. + * + * @return array + */ +function event_get_comments_with_all_events($events, $filter=null, $server_id=0) +{ + $whereGrouped = []; + if (empty($filter) === false) { + if (isset($filter['event_view_hr_cs']) === true && ($filter['event_view_hr_cs'] > 0)) { + $whereGrouped[] = sprintf( + ' AND tevent_comment.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d SECOND) ', + $filter['event_view_hr_cs'] + ); + } else if (isset($filter['event_view_hr']) === true && ($filter['event_view_hr'] > 0)) { + $whereGrouped[] = sprintf( + ' AND tevent_comment.utimestamp > UNIX_TIMESTAMP(now() - INTERVAL %d SECOND) ', + ((int) $filter['event_view_hr'] * 3600) + ); + } + } + + $mode = (int) ($filter['group_rep'] ?? 0); + + $eventsGrouped = []; + $idEvents = []; + $idExtras = []; + $idAgentsModules = []; + $idAgentes = []; + $eventos = []; + foreach ($events as $key => $event) { + // Consider if the event is grouped. + if ($mode === EVENT_GROUP_REP_EVENTS) { + // Default grouped message filtering (evento and estado). + $eventos[] = io_safe_input(io_safe_output($event['evento'])); + + // If id_agente is reported, filter the messages by them as well. + if ((int) $event['id_agente'] > 0) { + $idAgentes[] = (int) $event['id_agente']; + } + + if ((int) $event['id_agentmodule'] > 0) { + $idAgentsModules[] = (int) $event['id_agentmodule']; + } + } else if ($mode === EVENT_GROUP_REP_EXTRAIDS) { + $idExtras[] = io_safe_input(io_safe_output($event['id_extra'])); + } else { + $idEvents[] = $event['id_evento']; + } + } + + if ($mode === EVENT_GROUP_REP_EVENTS) { + // Default grouped message filtering (evento and estado). + $whereGrouped[] = sprintf( + 'AND `tevento`.`evento` IN ("%s")', + implode('","', $eventos) + ); + + // If id_agente is reported, filter the messages by them as well. + if ((int) $event['id_agente'] > 0) { + $whereGrouped[] = sprintf( + ' AND `tevento`.`id_agente` IN (%s)', + implode(',', $idAgentes) + ); + } + + if ((int) $event['id_agentmodule'] > 0) { + $whereGrouped[] = sprintf( + ' AND `tevento`.`id_agentmodule` IN (%s)', + implode(',', $idAgentsModules) + ); + } + } else if ($mode === EVENT_GROUP_REP_EXTRAIDS) { + $whereGrouped[] = sprintf( + 'AND `tevento`.`id_extra` IN ("%s")', + implode('","', $idExtras), + ); + } else { + $whereGrouped[] = sprintf('AND `tevento`.`id_evento` IN (%s)', implode(',', $idEvents)); + } + + try { + if (is_metaconsole() === true + && $server_id > 0 + ) { + $node = new Node($server_id); + $node->connect(); + } + + $sql = sprintf( + 'SELECT tevent_comment.* + FROM tevento + INNER JOIN tevent_comment + ON tevento.id_evento = tevent_comment.id_event + JOIN( + SELECT id_event, max(utimestamp) as utimestamp + FROM tevent_comment a + GROUP BY a.id_event + ) max_ut ON max_ut.id_event = tevent_comment.id_event AND max_ut.utimestamp = tevent_comment.utimestamp + WHERE 1=1 %s + ORDER BY tevent_comment.utimestamp DESC', + implode(' ', $whereGrouped) + ); + + // Get grouped comments. + $eventsGrouped = db_get_all_rows_sql($sql); + } catch (\Exception $e) { + // Unexistent agent. + if (is_metaconsole() === true + && $server_id > 0 + ) { + $node->disconnect(); + } + + $eventsGrouped = []; + } finally { + if (is_metaconsole() === true + && $server_id > 0 + ) { + $node->disconnect(); + } + } + + return $eventsGrouped; +} diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index a68c06c702..7e3d566cdc 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -805,7 +805,7 @@ function filemanager_file_explorer( // Actions buttons // Delete button. - $data[4] = '
'; + $data[4] = '
'; $typefile = array_pop(explode('.', $fileinfo['name'])); if (is_writable($fileinfo['realpath']) === true && (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3) @@ -1069,7 +1069,7 @@ function filemanager_file_explorer( ); // Show Modal Real Path - $modal_real_path = "
Real path to plugin execution is:
+ $modal_real_path = "
Real path is:
"; if (isset($_SERVER['HTTPS']) === true) { diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 4dbfa743bd..19d4e45467 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3398,8 +3398,10 @@ function graph_custom_sql_graph( if ($count <= $max_num_elements) { $label = __('Data'); + $full_label = __('Data'); if (empty($data_item['label']) === false) { $label = io_safe_output($data_item['label']); + $full_label = io_safe_output($data_item['label']); if (strlen($label) > $SQL_GRAPH_MAX_LABEL_SIZE) { $first_label = $label; $label = substr( @@ -3413,13 +3415,15 @@ function graph_custom_sql_graph( $labels_bar[] = $label; if ($type === 'sql_graph_hbar') { $data_bar[] = [ - 'y' => $label, - 'x' => $value, + 'full_title' => $full_label, + 'y' => $label, + 'x' => $value, ]; } else { $data_bar[] = [ - 'x' => $label, - 'y' => $value, + 'full_title' => $full_label, + 'x' => $label, + 'y' => $value, ]; } @@ -3493,6 +3497,9 @@ function graph_custom_sql_graph( 'grid' => ['display' => false], ], ], + 'tooltip' => [ + 'title' => ['fullTitle' => true], + ], 'labels' => $labels_bar, ]; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 7f4033ab53..52ed76bd6b 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1010,6 +1010,10 @@ function html_print_select( ui_require_javascript_file('select2.min'); } + if ($placeholder === '' && $select2_multiple_enable === true) { + $placeholder = __('Select one or more elements'); + } + $output .= ' diff --git a/pandora_console/operation/agentes/graphs.php b/pandora_console/operation/agentes/graphs.php index c1c3705acd..ace92311f0 100644 --- a/pandora_console/operation/agentes/graphs.php +++ b/pandora_console/operation/agentes/graphs.php @@ -187,84 +187,95 @@ if (empty($modules)) { $table = new stdClass(); $table->width = '100%'; -$table->class = 'databox filters'; +$table->class = 'databox filters filter-table-adv'; -$table->style[0] = 'font-weight: bolder; text-align: left;'; -$table->size[0] = '10%'; -$table->style[1] = 'font-weight: bolder; text-align: left;'; -$table->size[1] = '15%'; -$table->style[2] = 'font-weight: bolder; text-align: left;'; -$table->size[2] = '10%'; -$table->style[3] = 'font-weight: bolder; text-align: left;'; -$table->size[3] = '20%'; +$table->size[0] = '50%'; +$table->size[1] = '25%'; +$table->size[2] = '25%'; -$table->rowspan[0][0] = 7; -$table->rowspan[0][1] = 7; -$table->data[0][0] = __('Modules'); -$table->data[0][1] = html_print_select( - $list_modules, - 'modules[]', - $modules, - '', - '', - 0, - true, - true, - true, - '', - false, - 'min-width:200px;max-width:460px;height: 200px;' +$table->rowspan[0][0] = 3; + +$table->data[0][0] = html_print_label_input_block( + __('Modules'), + html_print_select( + $list_modules, + 'modules[]', + $modules, + '', + '', + 0, + true, + true, + true, + '', + false, + 'min-width: 200px; max-width: 100%; width: 100%; height: 194px;' + ) ); -$table->rowspan[2][0] = 7; -$table->data[2][0] = ''; - -$table->data[2][1] = __('Begin date'); -$table->data[2][2] = html_print_input_text('start_date', substr($start_date, 0, 10), '', 10, 40, true); -$table->data[2][2] .= html_print_image( - 'images/calendar_view_day.png', - true, - [ - 'class' => 'invert_filter', - 'onclick' => "scwShow(scwID('text-start_date'),this);", - ] +$table->data[0][1] = html_print_label_input_block( + __('Begin date'), + '
'.html_print_input_text( + 'start_date', + substr($start_date, 0, 10), + '', + 10, + 40, + true + ).html_print_image( + 'images/calendar_view_day.png', + true, + [ + 'class' => 'invert_filter', + 'onclick' => "scwShow(scwID('text-start_date'),this);", + ] + ).'
' ); -$table->data[3][1] = __('Time range'); - -$table->data[3][2] = html_print_extended_select_for_time( - 'period', - $period, - 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')', - '', - 0, - 7, - true, - false, - true, - '', - false, - false, - '', - false, - 0, - null, - 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')' +$table->data[0][2] = html_print_label_input_block( + __('Time range'), + html_print_extended_select_for_time( + 'period', + $period, + 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')', + '', + 0, + 7, + true, + false, + true, + '', + false, + false, + '', + false, + 0, + null, + 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')' + ) +); + +$table->data[1][1] = html_print_label_input_block( + __('Show events'), + html_print_checkbox('draw_events', 1, (bool) $draw_events, true) +); + +$table->data[1][2] = html_print_label_input_block( + __('Show alerts').ui_print_help_tip(__('the combined graph does not show the alerts into this graph'), true), + html_print_checkbox('draw_alerts', 1, (bool) $draw_alerts, true) ); -$table->data[4][2] = __('Show events'); -$table->data[4][3] = html_print_checkbox('draw_events', 1, (bool) $draw_events, true); -$table->data[5][2] = __('Show alerts').ui_print_help_tip(__('the combined graph does not show the alerts into this graph'), true); -$table->data[5][3] = html_print_checkbox('draw_alerts', 1, (bool) $draw_alerts, true); -$table->data[6][2] = __('Show as one combined graph'); $graph_option_one_or_several = [ 0 => __('several graphs for each module'), 1 => __('One combined graph'), ]; -$table->data[6][3] = html_print_select($graph_option_one_or_several, 'combined', $combined, '', '', 1, true); -$table->data[7][2] = __('Chart type'); +$table->data[2][1] = html_print_label_input_block( + __('Show as one combined graph'), + html_print_select($graph_option_one_or_several, 'combined', $combined, '', '', 1, true) +); + if ($combined == 1) { $graph_option_type = [ 0 => __('Area'), @@ -279,7 +290,10 @@ if ($combined == 1) { ]; } -$table->data[7][3] = html_print_select($graph_option_type, 'option_type', $option_type, '', '', 1, true); +$table->data[2][2] = html_print_label_input_block( + __('Chart type'), + html_print_select($graph_option_type, 'option_type', $option_type, '', '', 1, true) +); $htmlForm = ''; $htmlForm .= html_print_table($table, true); diff --git a/pandora_console/operation/agentes/interface_view.functions.php b/pandora_console/operation/agentes/interface_view.functions.php index dd7bb5eddc..bf81d214be 100644 --- a/pandora_console/operation/agentes/interface_view.functions.php +++ b/pandora_console/operation/agentes/interface_view.functions.php @@ -597,15 +597,19 @@ function print_table( } else { foreach ($all_interfaces as $key => $value) { // Filter interfaces array. - $filtered_interfaces[$key] = array_filter( - $value, - function ($interface) use ($selected_interfaces) { - return in_array( - $interface['status_module_id'], - $selected_interfaces - ); - } - ); + if (empty($selected_interfaces) === false && in_array('', $selected_interfaces) === false) { + $filtered_interfaces[$key] = array_filter( + $value, + function ($interface) use ($selected_interfaces) { + return in_array( + $interface['status_module_id'], + $selected_interfaces + ); + } + ); + } else { + $filtered_interfaces = $all_interfaces; + } } } diff --git a/pandora_console/operation/agentes/interface_view.php b/pandora_console/operation/agentes/interface_view.php index 3799e4816e..c832980cdd 100644 --- a/pandora_console/operation/agentes/interface_view.php +++ b/pandora_console/operation/agentes/interface_view.php @@ -265,13 +265,16 @@ function load_agent_interfaces_selector(selected_agents) { }, function (data, status) { $("#module").html(''); - + var option = $("") + .attr ("value", "") + .html ("Any"); + $("#selected_interfaces").append(option); if (data) { Object.values(data).forEach(function(obj) { for (const [key, value] of Object.entries(obj.interfaces)) { option = $("") .attr ("value", value.status_module_id) - .html (key + ' (' + obj.agent_alias + ')'); + .html ('(' + obj.agent_alias + ') ' + key); $("#selected_interfaces").append(option); } }); diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 94e2cb51e6..ab3c174467 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -481,6 +481,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) { [ 'name' => $name, 'id_group_map' => $id_group_map, + '!id' => $id, ], ); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 61463c0f9f..1ad19bb38e 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1613,7 +1613,7 @@ if (empty($result) === false) { $table->align[11] = 'left'; } - if (check_acl($config['id_user'], 0, 'AR')) { + if (check_acl($config['id_user'], 0, 'AW')) { $actions_list = true; $table->head[12] = __('Actions'); $table->align[12] = 'left'; @@ -2263,7 +2263,7 @@ if (empty($result) === false) { } if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) { - $table->cellclass[][2] = 'action_buttons'; + $table->cellclass[][12] = 'table_action_buttons'; if (is_metaconsole() === true) { echo ""; diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index ccda3eb9f3..a6ad560cf4 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -169,6 +169,8 @@ if (is_ajax()) { }, [] ); + } else { + echo json_encode([]); } } @@ -1653,8 +1655,7 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) { } // Omnishell. -$tasks = enterprise_hook('count_tasks_agent', [$id_agente]); - +// $tasks = enterprise_hook('count_tasks_agent', [$id_agente]); if ($tasks === true) { $omnishellTab = enterprise_hook('omnishell_tab'); if ($omnishellTab == -1) { diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 11a7190791..420c3eb375 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -484,10 +484,15 @@ if (is_ajax() === true) { if (empty($events) === false) { $redirection_form_id = 0; + if ((int) $filter['group_rep'] > 0) { + $events_comments = []; + } else { + $events_comments = reduce_events_comments($events, $filter); + } $data = array_reduce( $events, - function ($carry, $item) use ($table_id, &$redirection_form_id, $filter, $compact_date, $external_url, $compact_name_event, $regex) { + function ($carry, $item) use ($table_id, &$redirection_form_id, $filter, $compact_date, $external_url, $compact_name_event, $regex, $events_comments) { global $config; $tmp = (object) $item; @@ -675,12 +680,16 @@ if (is_ajax() === true) { $tmp->instructions = events_get_instructions($item, 15); - $tmp->user_comment = ui_print_comments( - event_get_last_comment( - $item, - $filter - ) - ); + if ((int) $filter['group_rep'] > 0) { + $tmp->user_comment = ui_print_comments( + event_get_last_comment( + $item, + $filter + ) + ); + } else if (isset($events_comments[$tmp->server_id.'_'.$tmp->id_evento]) === true) { + $tmp->user_comment = ui_print_comments($events_comments[$tmp->server_id.'_'.$tmp->id_evento]); + } // Grouped events. if (isset($tmp->max_id_evento) === true @@ -2097,12 +2106,13 @@ $data .= html_print_checkbox_switch( true ); +$data .= ''; $data .= html_print_checkbox_switch( 'regex', @@ -2113,10 +2123,14 @@ $data .= html_print_checkbox_switch( 'checked_slide_events(this);', true ); + +$data .= ''; $data .= '
'; diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index fdd950575c..c59805beda 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -43,82 +43,20 @@ if (!reporting_user_can_see_report($id_report)) { exit; } -// Calculations in order to modify init date of the report. -$date_init_less = (strtotime(date('Y-m-j')) - SECONDS_1DAY); -$date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less)); -$time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less)); -$datetime_init = strtotime($date_init.' '.$time_init); -$pure = (int) get_parameter('pure', 0); +$date_params = get_parameter_date('date', '', 'U'); +$date_end = date('Y/m/d', $date_params['date_end']); +$time_end = date('H:i:s', $date_params['date_end']); -$period = null; -// Get different date to search the report. -$date_end = (string) get_parameter('date_end', date(DATE_FORMAT)); -$time_end = (string) get_parameter('time_end', date(TIME_FORMAT)); -$datetime_end = strtotime($date_end.' '.$time_end); +$date_start = date('Y/m/d', $date_params['date_init']); +$time_start = date('H:i:s', $date_params['date_init']); -// Calculate new inteval for all reports. -$custom_date = get_parameter('custom_date', 0); -$date = get_parameter('date', 'none'); -$date_text = get_parameter('date_text', SECONDS_1DAY); +$date_init = date('Y/m/d', $date_params['date_init']); +$time_init = date('H:i:s', $date_params['date_init']); -$custom_date_end = ''; -$filter_type = ''; -$custom_period = false; -if ($custom_date === '1') { - if ($date === 'chose_range') { - $date_init = get_parameter('date_init', 0); - $date_init = explode(' ', $date_init); - $date_init = $date_init[0]; - $date_init .= ' '.get_parameter('time_init', '00:00:00'); - $custom_date_end = get_parameter('date_end', 0); - $custom_date_end .= ' '.get_parameter('time_end', '00:00:00'); - $date_end = date('Y/m/d H:i:s'); - $period = (strtotime($date_end) - strtotime($date_init)); - $custom_period = (strtotime($custom_date_end) - strtotime($date_init)); - $filter_type = 'chose_range'; - } else { - if ($datetime_init >= $datetime_end) { - $datetime_init = $date_init_less; - } +$custom_date_end = date('Y/m/d H:i:s', $date_params['date_end']); - $period = ($datetime_end - $datetime_init); - } -} else if ($custom_date === '2') { - $date_units = get_parameter('date_units'); - $date_end = date('Y/m/d H:i:s'); - $date_start = date('Y/m/d H:i:s', (strtotime($date_end) - ($date_text * $date_units))); - $period = (strtotime($date_end) - strtotime($date_start)); -} else if (in_array($date, ['this_week', 'this_month', 'past_week', 'past_month'])) { - if ($date === 'this_week') { - // Last monday. - $date_init = date('Y/m/d H:i:s', strtotime('last monday')); - // $date_end = date('Y/m/d H:i:s', strtotime($date_init.' +6 days')); - $date_end = date('Y/m/d H:i:s'); - $period = (strtotime($date_end) - strtotime($date_init)); - $filter_type = 'this_week'; - } else if ($date === 'this_month') { - // $date_end = date('Y/m/d', strtotime('last day of this month')); - $date_end = date('Y/m/d H:i:s'); - $first_of_month = date('Y/m/d', strtotime('first day of this month')); - $period = (strtotime($date_end) - strtotime($first_of_month)); - $filter_type = 'this_month'; - } else if ($date === 'past_month') { - $date_end = date('Y/m/d', strtotime('last day of previous month')); - $first_of_month = date('Y/m/d', strtotime('first day of previous month')); - $period = (strtotime($date_end) - strtotime($first_of_month)); - } else if ($date === 'past_week') { - $date_end = date('Y-m-d', strtotime('sunday', strtotime('last week'))); - $first_of_week = date('Y-m-d', strtotime('monday', strtotime('last week'))); - $period = (strtotime($date_end) - strtotime($first_of_week)); - } -} else if ($date === 'none') { - // Prioritize the report item period based on the current local date/time. - $date_end = date('Y/m/d H:i:s'); -} else { - $date_end = date('Y/m/d H:i:s'); - $date_start = date('Y/m/d H:i:s', (strtotime($date_end) - $date)); - $period = (strtotime($date_end) - strtotime($date_start)); -} +$period = $date_params['period']; +$custom_period = $date_params['period']; // Shchedule report email. $schedule_report = get_parameter('schbutton', ''); @@ -318,12 +256,12 @@ if ($html_menu_export === ENTERPRISE_NOT_HOOK) { if ((bool) is_metaconsole() === true) { $table2->data[0][2] = html_print_label_input_block( __('Date').' ', - html_print_select_date_range('date', true, get_parameter('date', 'none'), $date_init, $time_init, date('Y/m/d'), date('H:i:s'), $date_text), + html_print_select_date_range('date', true, get_parameter('date', 'none'), $date_init, $time_init, $date_end, $time_end, $date_text), ); } else { $table2->data[0][2] = html_print_label_input_block( __('Date').' ', - html_print_select_date_range('date', true, get_parameter('date', 'none'), $date_init, $time_init, date('Y/m/d'), date('H:i:s'), $date_text), + html_print_select_date_range('date', true, get_parameter('date', 'none'), $date_init, $time_init, $date_end, $time_end, $date_text), ['label_class' => 'filter_label_position_before'] ); } diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index d19cce4868..c90b4b1b3c 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -6,7 +6,7 @@ %define debug_package %{nil} %define name pandorafms_console %define version 7.0NG.776 -%define release 240326 +%define release 240402 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 410266b3d3..f8586315d7 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -6,7 +6,7 @@ %define debug_package %{nil} %define name pandorafms_console %define version 7.0NG.776 -%define release 240326 +%define release 240402 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index cf862a8632..9d6ea07439 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.776 -%define release 240326 +%define release 240402 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index a525ca1e56..1fad03b09f 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1326,6 +1326,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` ( `allowed_ip_list` TEXT, `auth_token_secret` VARCHAR(45) DEFAULT NULL, `session_max_time_expire` INT NOT NULL DEFAULT 0, + `stop_lts_modal` TINYINT NOT NULL DEFAULT 0, CONSTRAINT `fk_filter_id` FOREIGN KEY (`id_filter`) REFERENCES tevent_filter (`id_filter`) ON DELETE SET NULL, UNIQUE KEY `id_user` (`id_user`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index e89e932934..4a9f56d9bb 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2673,30 +2673,29 @@ INSERT INTO `tncm_agent_data_template_scripts`(`id_agent_data_template`, `id_scr INSERT INTO `talert_calendar` VALUES (1, 'Default', 0, 'Default calendar'); INSERT INTO `twelcome_tip` VALUES -(1,'es',0,'¿Sabías que puedes monitorizar webs?','De manera sencilla a través de chequeos HTTP estándar o transaccional mediante transacciones centralizadas WUX, o descentralizadas con el plugin UX de agente.','https://pandorafms.com/manual/es/documentation/03_monitoring/06_web_monitoring','1'), -(2,'es',0,'Monitorización remota de dispositivos SNMP','Los dispositivos de red como switches, AP, routers y firewalls se pueden monitorizar remotamente usando el protocolo SNMP. Basta con saber su IP, la comunidad SNMP y lanzar un wizard SNMP desde la consola.','https://pandorafms.com/manual/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp','1'), -(3,'es',0,'Monitorizar rutas desde una IP a otra','Existe un plugin especial que sirve para monitorizar visualmente las rutas desde una IP a otra de manera visual y dinámica, según va cambiando con el tiempo.','https://pandorafms.com/manual/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas','1'), +(1,'es',0,'¿Sabías que puedes monitorizar webs?','De manera sencilla a través de chequeos HTTP estándar o transaccional mediante transacciones centralizadas WUX, o descentralizadas con el plugin UX de agente.','https://pandorafms.com/manual/!current/es/documentation/03_monitoring/06_web_monitoring','1'), +(2,'es',0,'Monitorización remota de dispositivos SNMP','Los dispositivos de red como switches, AP, routers y firewalls se pueden monitorizar remotamente usando el protocolo SNMP. Basta con saber su IP, la comunidad SNMP y lanzar un wizard SNMP desde la consola.','https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp','1'), +(3,'es',0,'Monitorizar rutas desde una IP a otra','Existe un plugin especial que sirve para monitorizar visualmente las rutas desde una IP a otra de manera visual y dinámica, según va cambiando con el tiempo.','https://pandorafms.com/manual/!current/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas','1'), (4,'es',0,'¿Tu red pierde paquetes?','Se puede medir la pérdida de paquetes en tu red usando un agente y un plugin libre llamado “Packet Loss”. Esto es especialmente útil en redes Wifi o redes compartidas con muchos usuarios. Escribimos un artículo en nuestro blog hablando de ello, echale un vistazo','https://pandorafms.com/blog/es/perdida-de-paquetes/','1'), (5,'es',0,'Usar Telegram con Pandora FMS','Perfecto para recibir alertas con gráficas empotradas y personalizar así la recepción de avisos de manera individual o en un canal común con mas personas. ','https://pandorafms.com/library/telegram-bot-cli/','1'), (6,'es',0,'Monitorizar JMX (Tomcat, Websphere, Weblogic, Jboss, Apache Kafka, Jetty, GlassFish…)','Existe un plugin Enterprise que sirve para monitorizar cualquier tecnología JMX. Se puede usar de manera local (como plugin local) o de manera remota con el plugin server.','https://pandorafms.com/library/jmx-monitoring/','1'), (7,'es',0,'¿Sabes que cada usuario puede tener su propia Zona Horaria?','Se puede establecer zonas horarias diferentes para cada usuario, de manera que interprete los datos teniendo en cuenta la diferencia horaria. Pandora FMS también puede tener servidores y agentes en diferentes zonas horarias. ¡Por todo el mundo!','','1'), -(8,'es',0,'Paradas planificadas','Se puede definir, a nivel de agente y a nivel de módulo, períodos en los cuales se ignoren las alertas y/o los datos recogidos. Es perfecto para planificar paradas de servicio o desconexión de los sistemas monitorizados. También afecta a los informes SLA, evitando que se tengan en cuenta esos intervalos de tiempo. ','https://pandorafms.com/manual/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas','1'), -(9,'es',0,'Personalizar los emails de alerta ','¿Sabías que se pueden personalizar los mails de alertas de Pandora? Solo tienes que editar el código HTML por defecto de las acciones de alerta de tipo email. ','https://pandorafms.com/manual/en/documentation/04_using/01_alerts#editing_an_action','1'), -(10,'es',0,'Usando iconos personalizados en consolas visuales ','Gracias a los iconos personalizados se pueden crear vistas muy personalizadas, como la de la imagen, que representa racks con los tipos de servidores en el orden que están colocados dentro del rack. Perfecto para que un técnico sepa exactamente qué máquina esta fallando. Más visual no puede ser, de ahi el nombre. ','https://pandorafms.com/manual/start?id=es/documentation/04_using/05_data_presentation_visual_maps','1'), -(11,'es',0,'Consolas visuales: mapas de calor ','La consola permite integrar en un fondo personalizado una serie de datos, que en función de su valor se representen con unos colores u otros, en tiempo real. Las aplicaciones son infinitas, solo depende de tu imaginación. ','https://pandorafms.com/manual/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color','1'), -(12,'es',0,'Auditoría interna de la consola ','La consola registra todas las actividades relevantes de cada usuario conectado a la consola. Esto incluye la aplicación de configuraciones, validaciones de eventos y alertas, conexión y desconexión y cientos de otras operaciones. La seguridad en Pandora FMS ha sido siempre una de las características del diseño de su arquitectura. ','https://pandorafms.com/manual/es/documentation/04_using/11_managing_and_administration#log_de_auditoria','1'), -(13,'es',0,'Sistema de provisión automática de agentes ','El sistema de autoprovisión de agentes, permite que un agente recién ingresado en el sistema aplique automáticamente cambios en su configuración (como moverlo de grupo, asignarle ciertos valores en campos personalizados) y por supuesto aplicarle determinadas politicas de monitorización. Es una de las funcionalidades más potentes, orientadas a gestionar parques de sistemas muy extensos. ','https://pandorafms.com/manual/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes','1'), +(8,'es',0,'Paradas planificadas','Se puede definir, a nivel de agente y a nivel de módulo, períodos en los cuales se ignoren las alertas y/o los datos recogidos. Es perfecto para planificar paradas de servicio o desconexión de los sistemas monitorizados. También afecta a los informes SLA, evitando que se tengan en cuenta esos intervalos de tiempo. ','https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas','1'), +(9,'es',0,'Personalizar los emails de alerta ','¿Sabías que se pueden personalizar los mails de alertas de Pandora? Solo tienes que editar el código HTML por defecto de las acciones de alerta de tipo email. ','https://pandorafms.com/manual/!current/es/documentation/pandorafms/management_and_operation/01_alerts#configuracion_de_correos_para_alertas_en_pandora_fms','1'), +(10,'es',0,'Usando iconos personalizados en consolas visuales ','Gracias a los iconos personalizados se pueden crear vistas muy personalizadas, como la de la imagen, que representa racks con los tipos de servidores en el orden que están colocados dentro del rack. Perfecto para que un técnico sepa exactamente qué máquina esta fallando. Más visual no puede ser, de ahi el nombre. ','https://pandorafms.com/manual/!current/start?id=es/documentation/04_using/05_data_presentation_visual_maps','1'), +(11,'es',0,'Consolas visuales: mapas de calor ','La consola permite integrar en un fondo personalizado una serie de datos, que en función de su valor se representen con unos colores u otros, en tiempo real. Las aplicaciones son infinitas, solo depende de tu imaginación. ','https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color','1'), +(12,'es',0,'Auditoría interna de la consola ','La consola registra todas las actividades relevantes de cada usuario conectado a la consola. Esto incluye la aplicación de configuraciones, validaciones de eventos y alertas, conexión y desconexión y cientos de otras operaciones. La seguridad en Pandora FMS ha sido siempre una de las características del diseño de su arquitectura. ','https://pandorafms.com/manual/!current/es/documentation/04_using/11_managing_and_administration#log_de_auditoria','1'), +(13,'es',0,'Sistema de provisión automática de agentes ','El sistema de autoprovisión de agentes, permite que un agente recién ingresado en el sistema aplique automáticamente cambios en su configuración (como moverlo de grupo, asignarle ciertos valores en campos personalizados) y por supuesto aplicarle determinadas politicas de monitorización. Es una de las funcionalidades más potentes, orientadas a gestionar parques de sistemas muy extensos. ','https://pandorafms.com/manual/!current/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes','1'), (14,'es',0,'Modo oscuro ','¿Sabes que existe un modo oscuro en Pandora FMS? Un administrador lo puede activar a nivel global desde las opciones de configuración visuales o cualquier usuario a nivel individual, en las opciones de usuario. ','','1'), (15,'es',0,'Google Sheet ','¿Sabes que se puede coger el valor de una celda de una hoja de cálculo de Google Sheet?, utilizamos la API para pedir el dato a través de un plugin remoto. Es perfecto para construir cuadros de mando de negocio, obtener alertas en tiempo real y crear tus propios informes a medida. ','https://pandorafms.com/library/google-sheets-plugin/','1'), (16,'es',0,'Tablas de ARP','¿Sabes que existe un módulo de inventario para sacar las tablas ARP de tus servidores windows? Es fácil de instalar y puede darte información muy detallada de tus equipos.','https://pandorafms.com/library/arp-table-windows-local/','1'), -(17,'es',0,'Enlaces de red en la consola visual ','Existe un elemento de consola visual llamado “Network link” que permite mostrar visualmente la unión de dos interfaces de red, su estado y el tráfico de subida/bajada, de una manera muy visual. ','https://pandorafms.com/manual/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red','1'), +(17,'es',0,'Enlaces de red en la consola visual ','Existe un elemento de consola visual llamado “Network link” que permite mostrar visualmente la unión de dos interfaces de red, su estado y el tráfico de subida/bajada, de una manera muy visual. ','https://pandorafms.com/manual/!current/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red','1'), (18,'es',0,'¿Conoces los informes de disponibilidad? ','Son muy útiles ya que te dicen el tiempo (%) que un chequeo ha estado en diferentes estados a lo largo de un lapso de tiempo, por ejemplo, una semana. Ofrece datos crudos completos de lo que se ha hecho con el detalle suficiente para convencer a un proveedor o un cliente. ','','1'), -(19,'es',0,'Gráficas de disponibilidad ','Parecidos a los informes de disponibilidad, pero mucho mas visuales, ofrecen el detalle de estado de un monitor a lo largo del tiempo. Se pueden agrupar con otro módulo para ofrecer datos finales teniendo en cuenta la alta disponibilidad de un servicio. Son perfectos para su uso en informes a proveedores y/o clientes. ','https://pandorafms.com/manual/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad','1'), +(19,'es',0,'Gráficas de disponibilidad ','Parecidos a los informes de disponibilidad, pero mucho mas visuales, ofrecen el detalle de estado de un monitor a lo largo del tiempo. Se pueden agrupar con otro módulo para ofrecer datos finales teniendo en cuenta la alta disponibilidad de un servicio. Son perfectos para su uso en informes a proveedores y/o clientes. ','https://pandorafms.com/manual/!current/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad','1'), (20,'es',0,'Zoom en gráficas de datos ','¿Sabes que Pandora FMS permite hacer zoom en una parte de la gráfica. Con eso ampliarás la información de la gráfica. Si estás viendo una gráfica de un mes y amplías, podrás ver los datos de ese intervalo. Si utilizas una gráfica con datos de resolución completa (los llamamos gráficas TIP) podrás ver el detalle de cada dato, aunque tu gráfica tenga miles de muestras. ','','1'), (21,'es',0,'Gráficas de resolución completa ','Pandora FMS y otras herramientas cuando tienen que mostrar una gráfica obtienen los datos de la fuente de datos y luego “simplifican” la gráfica, ya que si la serie de datos tiene 10,000 elementos y la gráfica solo tiene 300 pixeles de ancho no pueden caber todos, asi que se “simplifican” esos 10,000 puntos en solo 300. Sin embargo al simplificar se pierde “detalle” en la gráfica, y por supuesto no podemos “hacer zoom”. Las gráficas de Pandora FMS permiten mostrar y usar todos los datos en una gráfica, que llamamos “TIP” que muestra todos los puntos superpuestos y además permite que al hacer zoom no se pierda resolución. ','','1'), -(22,'es',0,'Política de contraseñas','La consola de Pandora FMS tiene un sistema de gestión de política de credenciales, para reforzar la seguridad local (además de permitir la autenticación externa contra un LDAP, Active Directory o SAML). A través de este sistema podemos forzar cambios de password cada X días, guardar un histórico de passwords usadas o evitar el uso de ciertas contraseñas entre otras acciones. ','https://pandorafms.com/manual/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy','1'), -(23,'es',0,'Autenticación de doble factor ','Es posible activar (y forzar su uso a todos los usuarios) un sistema de doble autenticación (usando Google Auth) para que cualquier usuario se autentique además de con una contraseña, con un sistema de token de un solo uso, dando al sistema mucha más seguridad. ','https://pandorafms.com/manual/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication','1'); - +(22,'es',0,'Política de contraseñas','La consola de Pandora FMS tiene un sistema de gestión de política de credenciales, para reforzar la seguridad local (además de permitir la autenticación externa contra un LDAP, Active Directory o SAML). A través de este sistema podemos forzar cambios de password cada X días, guardar un histórico de passwords usadas o evitar el uso de ciertas contraseñas entre otras acciones. ','https://pandorafms.com/manual/!current/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy','1'), +(23,'es',0,'Autenticación de doble factor ','Es posible activar (y forzar su uso a todos los usuarios) un sistema de doble autenticación (usando Google Auth) para que cualquier usuario se autentique además de con una contraseña, con un sistema de token de un solo uso, dando al sistema mucha más seguridad. ','https://pandorafms.com/manual/!current/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication','1'); INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`, `filename`, `path`) VALUES (1, 'monitorizar_web.png', 'images/tips/'), (2, 'monitorizar_snmp.png', 'images/tips/'), @@ -2720,7 +2719,7 @@ INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`, `filename`, `path`) VALUES 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); +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/!current/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); @@ -2729,47 +2728,47 @@ INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES ( 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); +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/!current/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); +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/!current/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); +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/!current/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); +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/!current/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); +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/!current/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); +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/!current/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); +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/!current/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,'Scheduled downtimes','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#scheduled_downtimes',1); +INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Scheduled downtimes','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/!current/en/documentation/04_using/11_managing_and_administration#scheduled_downtimes',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); +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/!current/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,'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/!current/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/!current/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/!current/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/!current/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); +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/!current/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); @@ -2779,6 +2778,7 @@ INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable` 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/'); + INSERT INTO `twidget` (`id`,`class_name`,`unique_name`,`description`,`options`,`page`) VALUES (1,'AgentHive','AgentHive','Agents hive','','AgentHive.php'), (2,'AvgSumMaxMinModule','AvgSumMaxMinModule','Avg|Sum|Max|Min Module Data','','AvgSumMaxMinModule.php'), diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php index 37d605b248..39bbec138c 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php @@ -14,11 +14,60 @@ class Plugins implements ArraySerializableInterface, JsonSerializable { use ArraySerializable; - protected $legend; + /** + * @var string + */ + private $legend; - protected $title; - protected $datalabels; + /** + * @var string + */ + private $title; + + + /** + * @var string + */ + private $datalabels; + + + /** + * @var string + */ + private $tooltips; + + + /** + * @var string + */ + private $tooltip; + + + /** + * @return Tooltips + */ + public function getTooltips() + { + if (is_null($this->tooltips)) { + $this->tooltips = new Tooltips(); + } + + return $this->tooltips; + } + + + /** + * @return Tooltip + */ + public function getTooltip() + { + if (is_null($this->tooltip)) { + $this->tooltip = new Tooltip(); + } + + return $this->tooltip; + } /** diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltip.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltip.php new file mode 100644 index 0000000000..95c7a6cc5f --- /dev/null +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltip.php @@ -0,0 +1,819 @@ +enabled; + } + + /** + * @param bool $enabled + * + * @return $this + */ + public function setEnabled($enabled) + { + $this->enabled = boolval($enabled); + + return $this; + } + + /** + * @return \Laminas\Json\Expr + */ + public function getCustom() + { + return $this->custom; + } + + /** + * @param \Laminas\Json\Expr $custom + * + * @return $this + */ + public function setCustom($custom) + { + $this->custom = $custom; + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * @param string $mode + * + * @return $this + */ + public function setMode($mode) + { + $this->mode = strval($mode); + + return $this; + } + + /** + * @return bool + */ + public function isIntersect() + { + return $this->intersect; + } + + /** + * @param bool $intersect + * + * @return $this + */ + public function setIntersect($intersect) + { + $this->intersect = boolval($intersect); + + return $this; + } + + /** + * @return string + */ + public function getPosition() + { + return $this->position; + } + + /** + * @param string $position + * + * @return $this + */ + public function setPosition($position) + { + $this->position = strval($position); + + return $this; + } + + /** + * @return Expr + */ + public function getItemSort() + { + return $this->itemSort; + } + + /** + * @param Expr $itemSort + * + * @return $this + */ + public function setItemSort($itemSort) + { + $this->itemSort = new Expr(strval($itemSort)); + + return $this; + } + + /** + * @return Expr + */ + public function getFilter() + { + return $this->filter; + } + + /** + * @param Expr $filter + * + * @return $this + */ + public function setFilter($filter) + { + $this->filter = new Expr(strval($filter)); + + return $this; + } + + /** + * @return string + */ + public function getBackgroundColor() + { + return $this->backgroundColor; + } + + /** + * @param string $backgroundColor + * + * @return $this + */ + public function setBackgroundColor($backgroundColor) + { + $this->backgroundColor = strval($backgroundColor); + + return $this; + } + + /** + * @return string + */ + public function getTitleFontFamily() + { + return $this->titleFontFamily; + } + + /** + * @param string $titleFontFamily + * + * @return $this + */ + public function setTitleFontFamily($titleFontFamily) + { + $this->titleFontFamily = strval($titleFontFamily); + + return $this; + } + + /** + * @return int + */ + public function getTitleFontSize() + { + return $this->titleFontSize; + } + + /** + * @param int $titleFontSize + * + * @return $this + */ + public function setTitleFontSize($titleFontSize) + { + $this->titleFontSize = intval($titleFontSize); + + return $this; + } + + /** + * @return string + */ + public function getTitleFontStyle() + { + return $this->titleFontStyle; + } + + /** + * @param string $titleFontStyle + * + * @return $this + */ + public function setTitleFontStyle($titleFontStyle) + { + $this->titleFontStyle = strval($titleFontStyle); + + return $this; + } + + /** + * @return string + */ + public function getTitleFontColor() + { + return $this->titleFontColor; + } + + /** + * @param string $titleFontColor + * + * @return $this + */ + public function setTitleFontColor($titleFontColor) + { + $this->titleFontColor = strval($titleFontColor); + + return $this; + } + + /** + * @return int + */ + public function getTitleSpacing() + { + return $this->titleSpacing; + } + + /** + * @param int $titleSpacing + * + * @return $this + */ + public function setTitleSpacing($titleSpacing) + { + $this->titleSpacing = intval($titleSpacing); + + return $this; + } + + /** + * @return int + */ + public function getTitleMarginBottom() + { + return $this->titleMarginBottom; + } + + /** + * @param int $titleMarginBottom + * + * @return $this + */ + public function setTitleMarginBottom($titleMarginBottom) + { + $this->titleMarginBottom = intval($titleMarginBottom); + + return $this; + } + + /** + * @return string + */ + public function getBodyFontFamily() + { + return $this->bodyFontFamily; + } + + /** + * @param string $bodyFontFamily + * + * @return $this + */ + public function setBodyFontFamily($bodyFontFamily) + { + $this->bodyFontFamily = strval($bodyFontFamily); + + return $this; + } + + /** + * @return int + */ + public function getBodyFontSize() + { + return $this->bodyFontSize; + } + + /** + * @param int $bodyFontSize + * + * @return $this + */ + public function setBodyFontSize($bodyFontSize) + { + $this->bodyFontSize = intval($bodyFontSize); + + return $this; + } + + /** + * @return string + */ + public function getBodyFontStyle() + { + return $this->bodyFontStyle; + } + + /** + * @param string $bodyFontStyle + * + * @return $this + */ + public function setBodyFontStyle($bodyFontStyle) + { + $this->bodyFontStyle = strval($bodyFontStyle); + + return $this; + } + + /** + * @return string + */ + public function getBodyFontColor() + { + return $this->bodyFontColor; + } + + /** + * @param string $bodyFontColor + * + * @return $this + */ + public function setBodyFontColor($bodyFontColor) + { + $this->bodyFontColor = strval($bodyFontColor); + + return $this; + } + + /** + * @return int + */ + public function getBodySpacing() + { + return $this->bodySpacing; + } + + /** + * @param int $bodySpacing + * + * @return $this + */ + public function setBodySpacing($bodySpacing) + { + $this->bodySpacing = intval($bodySpacing); + + return $this; + } + + /** + * @return string + */ + public function getFooterFontFamily() + { + return $this->footerFontFamily; + } + + /** + * @param string $footerFontFamily + * + * @return $this + */ + public function setFooterFontFamily($footerFontFamily) + { + $this->footerFontFamily = strval($footerFontFamily); + + return $this; + } + + /** + * @return int + */ + public function getFooterFontSize() + { + return $this->footerFontSize; + } + + /** + * @param int $footerFontSize + * + * @return $this + */ + public function setFooterFontSize($footerFontSize) + { + $this->footerFontSize = intval($footerFontSize); + + return $this; + } + + /** + * @return string + */ + public function getFooterFontStyle() + { + return $this->footerFontStyle; + } + + /** + * @param string $footerFontStyle + * + * @return $this + */ + public function setFooterFontStyle($footerFontStyle) + { + $this->footerFontStyle = strval($footerFontStyle); + + return $this; + } + + /** + * @return string + */ + public function getFooterFontColor() + { + return $this->footerFontColor; + } + + /** + * @param string $footerFontColor + * + * @return $this + */ + public function setFooterFontColor($footerFontColor) + { + $this->footerFontColor = strval($footerFontColor); + + return $this; + } + + /** + * @return int + */ + public function getFooterSpacing() + { + return $this->footerSpacing; + } + + /** + * @param int $footerSpacing + * + * @return $this + */ + public function setFooterSpacing($footerSpacing) + { + $this->footerSpacing = intval($footerSpacing); + + return $this; + } + + /** + * @return int + */ + public function getFooterMarginTop() + { + return $this->footerMarginTop; + } + + /** + * @param int $footerMarginTop + * + * @return $this + */ + public function setFooterMarginTop($footerMarginTop) + { + $this->footerMarginTop = intval($footerMarginTop); + + return $this; + } + + /** + * @return int + */ + public function getXPadding() + { + return $this->xPadding; + } + + /** + * @param int $xPadding + * + * @return $this + */ + public function setXPadding($xPadding) + { + $this->xPadding = intval($xPadding); + + return $this; + } + + /** + * @return int + */ + public function getYPadding() + { + return $this->yPadding; + } + + /** + * @param int $yPadding + * + * @return $this + */ + public function setYPadding($yPadding) + { + $this->yPadding = intval($yPadding); + + return $this; + } + + /** + * @return int + */ + public function getCaretSize() + { + return $this->caretSize; + } + + /** + * @param int $caretSize + * + * @return $this + */ + public function setCaretSize($caretSize) + { + $this->caretSize = intval($caretSize); + + return $this; + } + + /** + * @return int + */ + public function getCornerRadius() + { + return $this->cornerRadius; + } + + /** + * @param int $cornerRadius + * + * @return $this + */ + public function setCornerRadius($cornerRadius) + { + $this->cornerRadius = intval($cornerRadius); + + return $this; + } + + /** + * @return string + */ + public function getMultiKeyBackground() + { + return $this->multiKeyBackground; + } + + /** + * @param string $multiKeyBackground + * + * @return $this + */ + public function setMultiKeyBackground($multiKeyBackground) + { + $this->multiKeyBackground = strval($multiKeyBackground); + + return $this; + } + + /** + * @return bool + */ + public function isDisplayColors() + { + return $this->displayColors; + } + + /** + * @param bool $displayColors + * + * @return $this + */ + public function setDisplayColors($displayColors) + { + $this->displayColors = boolval($displayColors); + + return $this; + } + + /** + * @return Callbacks + */ + public function callbacks() + { + if (is_null($this->callbacks)) { + $this->callbacks = new Callbacks(); + } + + return $this->callbacks; + } + + /** + * @return array + */ + public function jsonSerialize() + { + return $this->getArrayCopy(); + } +} diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index d81867a434..dcf13b1670 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.776-240326 +Version: 7.0NG.776-240402 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index bc082c91f9..1b1fbc2299 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/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.776-240326" +pandora_version="7.0NG.776-240402" package_cpan=0 package_pandora=1 diff --git a/pandora_server/Makefile.PL b/pandora_server/Makefile.PL index 107bd69c3f..81c97b87f7 100644 --- a/pandora_server/Makefile.PL +++ b/pandora_server/Makefile.PL @@ -31,7 +31,6 @@ WriteMakefile( HTML::Entities => 0, IO::Socket::INET6 => 0, JSON => 0, - Geo::IP => 0, }, EXE_FILES => [ @exe_files ], PMLIBDIRS => [ 'lib' ], diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 8200ab001d..8f35ad96c9 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -161,7 +161,7 @@ sub pandora_startup () { # Start the task execution thread. start_server_thread(\&pandora_server_tasks, [\%Config]); - + # Start the policy queue thread. start_server_thread(\&pandora_process_policy_queue, [\%Config]) if ($Config{'__enterprise_enabled'} == 1 && $Config{'policy_manager'} == 1); @@ -381,51 +381,53 @@ sub pandora_agent_autoconfiguration_scheduled($) { $pa_config{'dbuser'}, $pa_config{'dbpass'}); while ($THRRUN == 1) { - eval {{ - local $SIG{__DIE__}; + eval { + if (pandora_is_master($pa_config) == 1) { + local $SIG{__DIE__}; - my @autoconfig = get_db_rows ( - $dbh, - 'SELECT *, DATE_FORMAT(DATE_ADD(periodically_time_from, INTERVAL ' . $pa_config->{'autoconfigure_agents_threshold'} . ' SECOND), "%H:%i:%S") AS time_minutes - FROM tautoconfig WHERE executed = 0 AND type_execution LIKE "scheduled" AND disabled = 0' - ); + my @autoconfig = get_db_rows ( + $dbh, + 'SELECT *, DATE_FORMAT(DATE_ADD(periodically_time_from, INTERVAL ' . $pa_config->{'autoconfigure_agents_threshold'} . ' SECOND), "%H:%i:%S") AS time_minutes + FROM tautoconfig WHERE executed = 0 AND type_execution LIKE "scheduled" AND disabled = 0' + ); - # Get current time. - my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time()); - my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec); + # Get current time. + my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time()); + my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec); - foreach my $conf (@autoconfig) { - if (($conf->{'type_periodicity'} eq 'daily') || - ($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || - ($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) || - ($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) || - ($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) || - ($conf->{'friday'} eq 1 && $wday eq 5) || ($conf->{'saturday'} eq 1 && $wday eq 6))) - ) { - if ($time ge $conf->{'periodically_time_from'} && $time le $conf->{'time_minutes'}) { - # Update executed. - db_process_update ($dbh, 'tautoconfig', {'executed' => 1}, {'id' => $conf->{'id'}}); - # Get agents. - my @agents = get_db_rows( - $dbh, - 'SELECT id_agente, alias, id_grupo, id_os, os_version, direccion, nombre AS agent_name FROM tagente - WHERE `disabled` = 0' - ); + foreach my $conf (@autoconfig) { + if (($conf->{'type_periodicity'} eq 'daily') || + ($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || + ($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) || + ($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) || + ($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) || + ($conf->{'friday'} eq 1 && $wday eq 5) || ($conf->{'saturday'} eq 1 && $wday eq 6))) + ) { + if ($time ge $conf->{'periodically_time_from'} && $time le $conf->{'time_minutes'}) { + # Update executed. + db_process_update ($dbh, 'tautoconfig', {'executed' => 1}, {'id' => $conf->{'id'}}); + # Get agents. + my @agents = get_db_rows( + $dbh, + 'SELECT id_agente, alias, id_grupo, id_os, os_version, direccion, nombre AS agent_name FROM tagente + WHERE `disabled` = 0' + ); - foreach my $agent (@agents) { - # Check if the agent matches the rules. - my $match = enterprise_hook('autoconf_evaluate_rules', [$pa_config, $dbh, $agent, $conf->{'id'}, $agent->{'id_agente'}, 1]); - if (defined($match) && $match > 0) { - enterprise_hook('autoconf_execute_actions', [$pa_config, $dbh, $agent->{'id_agente'}, $agent, $conf->{'id'}]); + foreach my $agent (@agents) { + # Check if the agent matches the rules. + my $match = enterprise_hook('autoconf_evaluate_rules', [$pa_config, $dbh, $agent, $conf->{'id'}, $agent->{'id_agente'}, 1]); + if (defined($match) && $match > 0) { + enterprise_hook('autoconf_execute_actions', [$pa_config, $dbh, $agent->{'id_agente'}, $agent, $conf->{'id'}]); + } } - } - # Update executed. - db_process_update ($dbh, 'tautoconfig', {'executed' => 0}, {'id' => $conf->{'id'}}); + # Update executed. + db_process_update ($dbh, 'tautoconfig', {'executed' => 0}, {'id' => $conf->{'id'}}); + } } } } - }}; + }; sleep ($pa_config->{'autoconfigure_agents_threshold'}); } diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 48c6c6288d..8dcb2ee0f4 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -714,9 +714,6 @@ ncm_ssh_utility /usr/share/pandora_server/util/ncm_ssh_extension # Pandora FMS Daemon Watchdog execution interval in seconds (PANDORA FMS ENTERPRISE ONLY). ha_interval 30 -# HA operation mode. For backward compatibility with pacemaker. Do not change this value (PANDORA FMS ENTERPRISE ONLY). -ha_mode pandora - # Comma separated list of HA host IPs or FQDNs (PANDORA FMS ENTERPRISE ONLY). #ha_hosts 172.16.0.8,172.168.0.16 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 7cb4962322..bd51803af4 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.776"; -my $pandora_build = "240326"; +my $pandora_build = "240402"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash @@ -566,7 +566,6 @@ sub pandora_load_config { $pa_config->{"netflowserver"} = 0; # 7.0.770 $pa_config->{"netflowserver_threads"} = 1; # 7.0.770 - $pa_config->{"ha_mode"} = "pacemaker"; # 7.0.770 $pa_config->{"ha_file"} = undef; # 7.0.770 $pa_config->{"ha_hosts_file"} = '/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'; # 7.0.770 $pa_config->{"ha_connect_retries"} = 2; # 7.0.770 @@ -1338,11 +1337,6 @@ sub pandora_load_config { elsif ($parametro =~ m/^ncm_ssh_utility\s+(.*)/i) { $pa_config->{'ncm_ssh_utility'}= clean_blank($1); } - - # Pandora HA extra - elsif ($parametro =~ m/^ha_mode\s(.*)/i) { - $pa_config->{'ha_mode'} = clean_blank($1); - } elsif ($parametro =~ m/^ha_file\s(.*)/i) { $pa_config->{'ha_file'} = clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 5601c1eef7..fc5cf597d1 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -459,11 +459,10 @@ sub process_xml_data ($$$$$) { my $description = ''; $description = $data->{'description'} if (defined ($data->{'description'})); my $alias = (defined ($data->{'agent_alias'}) && $data->{'agent_alias'} ne '') ? $data->{'agent_alias'} : $data->{'agent_name'}; - my $location = get_geoip_info($pa_config, $address); $agent_id = pandora_create_agent($pa_config, $pa_config->{'servername'}, $agent_name, $address, $group_id, $parent_id, $os, $description, $interval, $dbh, $timezone_offset, - $location->{'longitude'}, $location->{'latitude'}, undef, undef, + undef, undef, undef, undef, $custom_id, $url_address, $agent_mode, $alias ); if (! defined ($agent_id)) { diff --git a/pandora_server/lib/PandoraFMS/GIS.pm b/pandora_server/lib/PandoraFMS/GIS.pm index 85138f8af9..1f9e1ce27e 100644 --- a/pandora_server/lib/PandoraFMS/GIS.pm +++ b/pandora_server/lib/PandoraFMS/GIS.pm @@ -40,8 +40,6 @@ Exported Functions: =item * C -=item * C - =back =head1 METHODS @@ -66,7 +64,6 @@ our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( distance_moved - get_geoip_info ); # Some intenrnal constants @@ -128,46 +125,6 @@ sub distance_moved ($$$$$$$) { return $dist_in_meters; } -########################################################################## -=head2 C<< get_geoip_info (I<$pa_config>, I<$address>, I<$dispersion>) >> - -Get GIS information from the MaxMind GeoIP database on file using Geo::IP module - -B: I if there is not information available or a B with: - * I - * I - -=cut -########################################################################## -sub get_geoip_info { - my ($pa_config, $address) = @_; - - # Return undef if feature is not activated - return undef unless ($pa_config->{'activate_gis'} && $pa_config->{'recon_reverse_geolocation_file'} ne ''); - - my $record = undef; - eval { - local $SIG{__DIE__}; - my $gi = Geo::IP->open($pa_config->{'recon_reverse_geolocation_file'}, GEOIP_STANDARD); - die("Cannot load the geoip file \"" . $pa_config->{'recon_reverse_geolocation_file'} . "\".\n") unless defined($gi); - $record = $gi->record_by_addr($address); - }; - if ($@) { - logger($pa_config, "Error giving coordinates to IP: $address. $@", 8); - } - return undef unless defined($record); - - # Fuzzy position filter - my ($longitude, $latitude) = get_random_close_point ( - $pa_config, $record->longitude, $record->latitude - ); - - return { - "longitude" => $longitude, - "latitude" => $latitude - }; -} - ########################################################################## =head2 C<< get_random_close_point(I<$pa_config>, I<$center_longitude>, I<$center_latitude>) >> diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index c410d0c0ba..16d5e3d966 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.776"; -my $pandora_build = "240326"; +my $pandora_build = "240402"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 1c8bd087c2..43b7db611b 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -24,6 +24,7 @@ use POSIX qw(setsid strftime); use POSIX; use HTML::Entities; use Encode; +use Encode::MIME::Header; use Socket qw(inet_ntoa inet_aton); use Sys::Syslog; use Scalar::Util qw(looks_like_number); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ae7f468622..e4706b79a2 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.776 -%define release 240326 +%define release 240402 Summary: Pandora FMS Server Name: %{name} @@ -34,7 +34,7 @@ Requires: perl(NetAddr::IP) net-snmp net-tools Requires: perl(IO::Socket::INET6) perl(IO::Socket::SSL) perl(Net::Telnet) Requires: fping nmap sudo perl(JSON) Requires: perl(Time::HiRes) perl(Encode::Locale) -Requires: perl perl(Sys::Syslog) perl(HTML::Entities) perl(Geo::IP) expect +Requires: perl perl(Sys::Syslog) perl(HTML::Entities) expect %description Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 50422f2457..c3eb14aa5f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.776 -%define release 240326 +%define release 240402 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2e80d4b8c9..88a6c7a715 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240326" +PI_BUILD="240402" MODE=$1 if [ $# -gt 1 ]; then @@ -263,11 +263,9 @@ install () { echo " Recommended: p5-DBI p5-NetAddr-IP p5-XML-Simple p5-XML-Twig p5-HTML-Parser p5-DBD-mysql p5-Socket6 p5-IO-Socket-INET6 p5-JSON" echo " Optional: nmap" echo " " - echo " And install Geo::IP manually." - echo " " echo "To get them from source through CPAN do" echo " " - echo " $ cpan Time::Local DBI Socket6 XML::Simple XML::Twig IO::Socket Time::HiRes NetAddr::IP HTML::Entities IO::Socket::INET6 JSON Geo::IP" + echo " $ cpan Time::Local DBI Socket6 XML::Simple XML::Twig IO::Socket Time::HiRes NetAddr::IP HTML::Entities IO::Socket::INET6 JSON" echo " " rm output exit 1 diff --git a/pandora_server/util/agent_gis_update.pl b/pandora_server/util/agent_gis_update.pl deleted file mode 100755 index 79e6fc88de..0000000000 --- a/pandora_server/util/agent_gis_update.pl +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/perl - -############################################################################### -# Pandora FMS DB Management -############################################################################### -# Copyright (c) 2005-2023 Pandora FMS -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; version 2 -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,USA -############################################################################### - -# Includes list -use strict; -use warnings; -use Time::Local; # DateTime basic manipulation -use DBI; # DB interface with MySQL -use POSIX qw(strftime); -use Time::HiRes qw(usleep); - -# Default lib dir for RPM and DEB packages -BEGIN { push @INC, '/usr/lib/perl5'; } - -use PandoraFMS::Core; -use PandoraFMS::Config; -use PandoraFMS::DB; -use PandoraFMS::GIS; - -# Pandora server configuration -my %conf; - -# Pandora db handler -my $dbh; - -# FLUSH in each IO -$| = 1; - -sub print_agent_gis_update_help() { - print "Usage: $0 \n"; -} - -# Get options -my ($configuration_file) = @ARGV; -if (!defined($configuration_file) || $configuration_file eq '-h' || $configuration_file eq '--help') { - print_agent_gis_update_help(); - exit defined($configuration_file) ? 0 : 1; -} - -# Load configuration file -$conf{'pandora_path'} = $configuration_file; -$conf{'quiet'} = 0; -pandora_load_config(\%conf); - -use Data::Dumper; -#print Dumper(\%conf); - -if (!$conf{'activate_gis'} || $conf{'recon_reverse_geolocation_file'} eq '') { - print "Geolocation feature es blocked.\n"; - exit 0; -} - -# Connect to the DB -$dbh = db_connect ('mysql', $conf{'dbname'}, $conf{'dbhost'}, $conf{'dbport'}, $conf{'dbuser'}, $conf{'dbpass'}); -if (!defined($dbh)){ - print "Cannot connect to database\n"; - exit 1; -} - -# Get all agents with IP assigned -my @agents = get_db_rows($dbh, - "SELECT id_agente, direccion, alias FROM tagente WHERE disabled = 0 AND direccion <> ''" -); - -my $c_time = strftime ("%Y/%m/%d %H:%M:%S", localtime()); -foreach my $agent (@agents) { - my $location = get_geoip_info (\%conf, $agent->{'direccion'}); - if (defined($location)) { - pandora_update_gis_data(\%conf, $dbh, $agent->{'id_agente'}, $agent->{'id_agente'}, $location->{'longitude'}, $location->{'latitude'}, undef, undef, $c_time); - } -} - -print "Successfull relocation\n"; - -db_disconnect($dbh); -exit 0; \ No newline at end of file diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 84dc1dfcda..4c8f5ca258 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.776 Build 240326"; +my $version = "7.0NG.776 Build 240402"; # Pandora server configuration my %conf; @@ -381,6 +381,13 @@ sub pandora_purgedb ($$$) { log_message ('PURGE', 'netflow_max_lifetime is set to 0. Old netflow data will not be deleted.'); } + # Delete old nfcapd .current files + log_message ('PURGE', 'Deleting old nfcapd .current files.'); + my $network_path = pandora_get_tconfig_token($dbh, 'general_network_path', '/var/spool/pandora/data_in/'); + my $name_dir = pandora_get_tconfig_token($dbh, 'netflow_name_dir', 'netflow'); + my $command = 'ls -t ' . $network_path . '/' . $name_dir . '/*.current* | tail -n +2 | xargs rm -f'; + system($command) == 0 or log_message('!', $!); + # Delete old sflow data if (!defined($conf->{'_sflow_max_lifetime'})){ log_message ('PURGE', 'sflow_max_lifetime is not defined. Old sflow data will not be deleted.'); @@ -1492,5 +1499,4 @@ if (defined($history_dbh)) { # Cleanup and exit db_disconnect ($history_dbh) if defined ($history_dbh); db_disconnect ($dbh); - exit 0; diff --git a/pandora_server/util/pandora_ha.pl b/pandora_server/util/pandora_ha.pl index 28ae0df795..57b2de44b5 100755 --- a/pandora_server/util/pandora_ha.pl +++ b/pandora_server/util/pandora_ha.pl @@ -539,89 +539,6 @@ sub ha_restart_pandora($) { `$config->{'pandora_service_cmd'} $control_command 2>/dev/null`; } -############################################################################### -# Main (Pacemaker) -############################################################################### -sub ha_main_pacemaker($) { - my ($conf) = @_; - - # Set the PID file. - $conf->{'PID'} = $PID_FILE; - - # Log to a separate file if needed. - $conf->{'log_file'} = $conf->{'ha_log_file'} if defined ($conf->{'ha_log_file'}); - - $Running = 1; - - ha_daemonize($conf) if ($DAEMON == 1); - - while ($Running) { - eval { - eval { - local $SIG{__DIE__}; - # Load enterprise components. - enterprise_load($conf, 1); - - # Register Enterprise logger - enterprise_hook('pandoraha_logger', [\&log_message]); - log_message($conf, 'LOG', 'Enterprise capabilities loaded'); - - }; - if ($@) { - # No enterprise capabilities. - log_message($conf, 'LOG', 'No enterprise capabilities'); - } - - # Start the Pandora FMS server if needed. - log_message($conf, 'LOG', 'Checking the pandora_server service.'); - - # Connect to a DB. - my $dbh = ha_database_connect($conf); - - if ($First_Cleanup == 1) { - log_message($conf, 'LOG', 'Cleaning previous unfinished actions'); - enterprise_hook('pandoraha_cleanup_states', [$conf, $dbh]); - $First_Cleanup = 0; - } - - # Check if there are updates pending. - ha_update_server($conf, $dbh); - - # Keep pandora running - ha_keep_pandora_running($conf, $dbh); - - # Keep Tentacle running - ha_keep_tentacle_running($conf, $dbh); - - # Keep MADE running - ha_keep_made_running($conf, $dbh); - - # Are we the master? - pandora_set_master($conf, $dbh); - if (!pandora_is_master($conf)) { - log_message($conf, 'LOG', $conf->{'servername'} . ' is not the current master. Skipping DB-HA actions and monitoring.'); - # Exit current eval. - return; - } - - # Synchronize database. - enterprise_hook('pandoraha_sync_node', [$conf, $dbh]); - - # Monitoring. - enterprise_hook('pandoraha_monitoring', [$conf, $dbh]); - - # Pending actions. - enterprise_hook('pandoraha_process_queue', [$conf, $dbh, $First_Cleanup]); - - # Cleanup and exit - db_disconnect ($dbh); - }; - log_message($conf, 'WARNING', $@) if ($@); - - log_message($conf, 'LOG', "Sleep."); - sleep($conf->{'ha_interval'}); - } -} ############################################################################### # Main (Pandora) @@ -763,11 +680,6 @@ ha_init_pandora(\%Conf); # Read config file ha_load_pandora_conf (\%Conf); -# Main -if (defined($Conf{'ha_mode'}) && lc($Conf{'ha_mode'}) eq 'pandora') { - ha_main_pandora(\%Conf); -} else { - ha_main_pacemaker(\%Conf); -} +ha_main_pandora(\%Conf); exit 0; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a14d132a61..55ff28c0c5 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.776 Build 240326"; +my $version = "7.0NG.776 Build 240402"; # save program name for logging my $progname = basename($0); diff --git a/tests/Dockerfile b/tests/Dockerfile index 4c0629690a..86b3ed9e93 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -91,8 +91,6 @@ RUN dnf install -y vim wget bzip2 curl && \ gettext \ wmic \ chromium \ - cpanminus && \ - cpanm Geo::IP && \ mkdir -p /opt/phantomjs/bin && cd /opt/phantomjs/bin && \ wget https://netcologne.dl.sourceforge.net/project/pandora/Tools%20and%20dependencies%20%28All%20versions%29/DEB%20Debian%2C%20Ubuntu/phantomjs && \ chmod +x phantomjs && \ diff --git a/visual_console_client/src/VisualConsole.ts b/visual_console_client/src/VisualConsole.ts index 0b3ec4bdbf..9e651d9a6d 100644 --- a/visual_console_client/src/VisualConsole.ts +++ b/visual_console_client/src/VisualConsole.ts @@ -334,10 +334,8 @@ export default class VisualConsole { let elemntSelected = document.getElementById( "item-selected-move" ) as HTMLElement; - elemntSelected.setAttribute( - "style", - "top:" + y + "px !important; left:" + x + "px !important" - ); + elemntSelected.style.top = `${y}px !important`; + elemntSelected.style.left = `${x}px !important`; return; } }