diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e973ee49c8..64a80cc179 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.767-221213 +Version: 7.0NG.767-221220 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 0b7f8bc7e9..f92a0385dc 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.767-221213" +pandora_version="7.0NG.767-221220" 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 308319c020..1e2a2f617a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.767'; -use constant AGENT_BUILD => '221213'; +use constant AGENT_BUILD => '221220'; # 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 1ae170b7db..09ee6ab33a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.767 -%define release 221213 +%define release 221220 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1592197613..f012ed024f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.767 -%define release 221213 +%define release 221220 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 5ab13098da..b5b6f463a2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.767" -PI_BUILD="221213" +PI_BUILD="221220" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 91700da9ba..615564b392 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{221213} +{221220} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index c9916a35fa..9058ccaf7e 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.767 Build 221213") +#define PANDORA_VERSION ("7.0NG.767 Build 221220") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7e4b708029..0c15acaab5 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.767(Build 221213))" + VALUE "ProductVersion", "(7.0NG.767(Build 221220))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 552a0fad17..dcbd8d4768 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.767-221213 +Version: 7.0NG.767-221220 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 2407eade45..19638ed313 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.767-221213" +pandora_version="7.0NG.767-221220" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/mr/60.sql b/pandora_console/extras/mr/60.sql index 622e73c173..7be8a0b4ef 100644 --- a/pandora_console/extras/mr/60.sql +++ b/pandora_console/extras/mr/60.sql @@ -1,5 +1,8 @@ START TRANSACTION; +ALTER TABLE treport_content ADD COLUMN use_prefix_notation tinyint(1) default '1'; +ALTER TABLE treport_content_template ADD COLUMN use_prefix_notation tinyint(1) default '1'; + DROP TABLE IF EXISTS `tphase`; DROP TABLE IF EXISTS `ttransaction`; @@ -10,4 +13,37 @@ ALTER TABLE `tevent_filter` ADD COLUMN `not_search` INT NOT NULL DEFAULT 0; ALTER TABLE `tusuario` MODIFY COLUMN `password` VARCHAR(60) DEFAULT NULL; +update `tmodule_inventory` set `code`='IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9jcHUucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGM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IyMjIyMjIyMjIyMjIwpzdWIgcnVuX3F1ZXJ5IHsKICAgICAgICBteSAkd3FsX3F1ZXJ5ID0gJF9bMF07CiAgICAgICAgbXkgQHJlc3VsdCA9IHt9OwogICAgICAgICR3cWxfcXVlcnkgPX4gJ3MvIi9cJy9nJzsKCiAgICAgICAgIyBSdW4gdGhlIERDT00vV01JIGNsaWVudAogICAgICAgIG15ICRvdXRwdXQgPSBgJHdtaV9jbGllbnQgLVUgJyR1c2VybmFtZSclJyRwYXNzd29yZCcgLy8kdGFyZ2V0X2lwIFwiJHdxbF9xdWVyeVwiIDI+L2Rldi9udWxsYDsKCiAgICAgICAgbXkgQGxpbmVzID0gc3BsaXQoL1xuLywgJG91dHB1dCk7CiAgICAgICAgIyBIZWFkZXIsIGRlc2NyaXB0aW9uLCByZXN1bHRzCiAgICAgICAgaWYgKCQjbGluZXMgPCAyKSB7CiAgICAgICAgICAgICAgICBleGl0IDE7CiAgICAgICAgfQoKICAgICAgICAjIERyb3AgdGhlIGhlYWRlcgogICAgICAgIHNoaWZ0IChAbGluZXMpOwoKICAgICAgICAjIEdldCBjb2x1bW4gbmFtZXMKICAgICAgICBteSBAY29sdW1uX25hbWVzID0gc3BsaXQoL1x8Lywgc2hpZnQgKEBsaW5lcykpOwoKICAgICAgICAjIEdldCByb3cgZGF0YQogICAgICAgIG15ICRpZHggPSAwOwogICAgICAgIGZvciAobXkgJGkgPSAwOyAkaSA8PSAkI2xpbmVzOyAkaSsrKSB7CgogICAgICAgICAgICAgICAgIyBDaGVjayBmb3IgZXJyb3JzCiAgICAgICAgICAgICAgICBpZiAoJGxpbmVzWyRpXSA9fiBtL15FUlJPUi8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXhpdCAxOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICMgQmxhY2sgbGlzdAogICAgICAgICAgICAgICAgaWYgKCRsaW5lc1skaV0gPX4gbS9GaWxlIDEvKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQ7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbXkgQGNvbHVtbiA9IHNwbGl0KC9cfC8sICRsaW5lc1skaV0pOwogICAgICAgICAgICAgICAgZm9yIChteSAkaiA9IDA7ICRqIDw9ICQjY29sdW1uX25hbWVzOyAkaisrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghIGRlZmluZWQoJGNvbHVtblskal0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdFskaWR4XS0+eyRjb2x1bW5fbmFtZXNbJGpdfSA9ICIiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXN1bHRbJGlkeF0tPnskY29sdW1uX25hbWVzWyRqXX0gPSAkY29sdW1uWyRqXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICRpZHgrKzsKICAgICAgICB9CgogICAgICAgIHJldHVybiBAcmVzdWx0Owp9CgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIFNVQiBwcmludF9tb2R1bGVkYXRhICgkbW9kdWxlX2l0ZW0sICRtb2R1bGVfZGF0YSwKIyAkbW9kdWxlX2Rlc2NyaXB0aW9uLCBAZGF0YSkKIyBQcmludHMgYSBtb2R1bGVkYXRhIFhNTCB0YWcuICRtb2R1bGVfaXRlbSwgJG1vZHVsZV9kYXRhIGFuZAojICRtb2R1bGVfZGVzY3JpcHRpb24gYXJlIHVzZWQgdG8gaW5kZXggdGhlIGl0ZW0sIGRhdGEgYW5kIGRlc2NyaXB0aW9uCiMgWE1MIHRhZ3MgcmVzcGVjdGl2ZWx5LgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwpzdWIgcHJpbnRfbW9kdWxlZGF0YSB7CiAgICAgICAgbXkgJG1vZHVsZV9pdGVtID0gJF9bMF07CiAgICAgICAgbXkgJG1vZHVsZV9kYXRhID0gJF9bMV07CiAgICAgICAgbXkgJG1vZHVsZV9kZXNjcmlwdGlvbiA9ICRfWzJdOwogICAgICAgIG15ICRtb2R1bGVfZXh0cmFfZGVzY3JpcHRpb24gPSAkX1szXTsKICAgICAgICBteSBAZGF0YSA9IEB7JF9bNF19OwogICAgICAgIG15ICRyZXN1bHQ7CgogICAgICAgIGZvcmVhY2ggbXkgJGVsZW1lbnQgKEBkYXRhKSB7CiAgICAgICAgICAgICAgICAkcmVzdWx0ID0gJyc7CgogICAgICAgICAgICAgICAgIyBJdGVtCiAgICAgICAgICAgICAgICBpZiAoZGVmaW5lZCgkZWxlbWVudC0+eyRtb2R1bGVfaXRlbX0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRyZXN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2l0ZW19IC4gJzsnOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICMgRGF0YQogICAgICAgICAgICAgICAgaWYgKGRlZmluZWQoJGVsZW1lbnQtPnskbW9kdWxlX2RhdGF9KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkcmVzdWx0IC49ICcgJyAuIHNwcmludGYoIiUuMWYiLCAkZWxlbWVudC0+eyRtb2R1bGVfZGF0YX0gLyAxMDczNzQxODI0KSAuICIgR0J5dGVzOyI7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgIyBEZXNjcmlwdGlvbgogICAgICAgICAgICAgICAgaWYgKGRlZmluZWQoJGVsZW1lbnQtPnskbW9kdWxlX2Rlc2NyaXB0aW9ufSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdCAuPSAgJGVsZW1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AgICAjIEhlYWRlciwgZGVzY3JpcHRpb24sIHJlc3VsdHMKICAgICAgICBpZiAoJCNsaW5lcyA8IDIpIHsKICAgICAgICAgICAgICAgIGV4aXQgMTsKICAgICAgICB9CgogICAgICAgICMgRHJvcCB0aGUgaGVhZGVyCiAgICAgICAgc2hpZnQgKEBsaW5lcyk7CgogICAgICAgICMgR2V0IGNvbHVtbiBuYW1lcwogICAgICAgIG15IEBjb2x1bW5fbmFtZXMgPSBzcGxpdCgvXHwvLCBzaGlmdCAoQGxpbmVzKSk7CgogICAgICAgICMgR2V0IHJvdyBkYXRhCiAgICAgICAgbXkgJGlkeCA9IDA7CiAgICAgICAgZm9yIChteSAkaSA9IDA7ICRpIDw9ICQjbGluZXM7ICRpKyspIHsKCiAgICAgICAgICAgICAgICAjIENoZWNrIGZvciBlcnJvcnMKICAgICAgICAgICAgICAgIGlmICgkbGluZXNbJGldID1+IG0vXkVSUk9SLykgewogICAgICAgICAgICAgICAgICAgICAgICBleGl0IDE7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgIyBCbGFjayBsaXN0CiAgICAgICAgICAgICAgICBpZiAoJGxpbmVzWyRpXSA9fiBtL0ZpbGUgMS8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgbmV4dDsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBteSBAY29sdW1uID0gc3BsaXQoL1x8LywgJGxpbmVzWyRpXSk7CiAgICAgICAgICAgICAgICBmb3IgKG15ICRqID0gMDsgJGogPD0gJCNjb2x1bW5fbmFtZXM7ICRqKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEgZGVmaW5lZCgkY29sdW1uWyRqXSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmVzdWx0WyRpZHhdLT57JGNvbHVtbl9uYW1lc1skal19ID0gIiI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAg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sZV9pdGVtLCAkbW9kdWxlX2RhdGEsCiMgJG1vZHVsZV9kZXNjcmlwdGlvbiwgQGRhdGEpCiMgUHJpbnRzIGEgbW9kdWxlZGF0YSBYTUwgdGFnLiAkbW9kdWxlX2l0ZW0sICRtb2R1bGVfZGF0YSBhbmQKIyAkbW9kdWxlX2Rlc2NyaXB0aW9uIGFyZSB1c2VkIHRvIGluZGV4IHRoZSBpdGVtLCBkYXRhIGFuZCBkZXNjcmlwdGlvbgojIFhNTCB0YWdzIHJlc3BlY3RpdmVseS4KIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKc3ViIHByaW50X21vZHVsZWRhdGEgewogICAgICAgIG15IEBtb2R1bGVfaGVhZGVycyA9IEB7JF9bMF19OwogICAgICAgIG15IEBkYXRhID0gQHskX1sxXX07CiAgICAgICAgbXkgJHJlc3VsdDsKCiAgICAgICAgZm9yZWFjaCBteSAkZWxlbWVudCAoQGRhdGEpIHsKICAgICAgICAgICAgICAgICRyZXN1bHQgPSAnJzsKICAgICAgICAgICAgICAgIGZvcmVhY2ggbXkgJG1oZWFkZXIgKEBtb2R1bGVfaGVhZGVycykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVmaW5lZCAoJGVsZW1lbnQtPnskbWhlYWRlcn0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdCAuPSAkZWxlbWVudC0+eyRtaGVhZGVyfSAuICc7JzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmVzdWx0IC49ICc7JzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2hvcCgkcmVzdWx0KTsKICAgICAgICAgICAgICAgIHByaW50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1lbnQgKEBkYXRhKSB7CiAgICAgICAgICAgICAgICAkcmVzdWx0ID0gJyc7CiAgICAgICAgICAgICAgICAjIEl0ZW0KICAgICAgICAgICAgICAgIGlmIChkZWZpbmVkKCRlbGVtZW50LT57JG1vZHVsZV9pdGVtfSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdCAuPSAkZWxlbWVudC0+eyRtb2R1bGVfaXRlbX0gLiAnOyc7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgIyBEYXRhCiAgICAgICAgICAgICAgICBpZiAoZGVmaW5lZCgkZWxlbWVudC0+eyRtb2R1bGVfZGF0YX0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRyZXN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2RhdGF9OwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIHByaW50ICRyZXN1bHQgLiAiXG4iOwogICAgICAgIH0KfQoKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgTmFtZSwgVmVyc2lvbiBGUk9NIFdpbjMyX1Byb2R1Y3QiKTsKcHJpbnRfbW9kdWxlZGF0YSAoIk5hbWUiLCAiVmVyc2lvbiIsIFxAcmVzdWx0KTsKZXhpdCAwOwoK' and `name` = 'Software' and `id_module_inventory`=14; + +update `tmodule_inventory` set `code`='IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI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0IFNlcmlhbE51bWJlciBmcm9tIFdpbjMyX09wZXJhdGluZ1N5c3RlbSIpOwojIFJlbWVtYmVyIHRvIG1hdGNoIGxlbmdodCBvZiBib3RoIGFycmF5cyBoZWFkZXJzICYgdW5pdHMKbXkgQGhlYWRlcnMgPSAoIlNlcmlhbE51bWJlciIpOwpteSBAdW5pdHMgICA9ICgiIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycyxcQHVuaXRzLCBcQHJlc3VsdCk7CmV4aXQgMDsKCg==' and `name` = 'product_ID' and `id_module_inventory`=36; + COMMIT; diff --git a/pandora_console/godmode/agentes/agent_conf_gis.php b/pandora_console/godmode/agentes/agent_conf_gis.php index 1b083e160f..6b80ed752a 100644 --- a/pandora_console/godmode/agentes/agent_conf_gis.php +++ b/pandora_console/godmode/agentes/agent_conf_gis.php @@ -59,6 +59,7 @@ ui_print_warning_message( ] ); +$table = new StdClass(); $table->width = '100%'; $table->class = 'databox filters'; $table->data = []; diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index d63595d553..7d26d69d2a 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -200,14 +200,14 @@ if ($access_console_node === true) { $sub['gmassive']['type'] = 'direct'; $sub['gmassive']['subtype'] = 'nolink'; $sub2 = []; - $sub2['godmode/massive/massive_operations&tab=massive_agents']['text'] = __('Agents operations'); - $sub2['godmode/massive/massive_operations&tab=massive_modules']['text'] = __('Modules operations'); - $sub2['godmode/massive/massive_operations&tab=massive_plugins']['text'] = __('Plugins operations'); + $sub2['godmode/massive/massive_operations&tab=massive_agents']['text'] = __('Agents operations'); + $sub2['godmode/massive/massive_operations&tab=massive_modules']['text'] = __('Modules operations'); + $sub2['godmode/massive/massive_operations&tab=massive_plugins']['text'] = __('Plugins operations'); if ((bool) check_acl($config['id_user'], 0, 'UM') === true) { - $sub2['godmode/massive/massive_operations&tab=massive_users']['text'] = __('Users operations'); + $sub2['godmode/massive/massive_operations&tab=massive_users']['text'] = __('Users operations'); } - $sub2['godmode/massive/massive_operations&tab=massive_alerts']['text'] = __('Alerts operations'); + $sub2['godmode/massive/massive_operations&tab=massive_alerts']['text'] = __('Alerts operations'); enterprise_hook('massivepolicies_submenu'); enterprise_hook('massivesnmp_submenu'); enterprise_hook('massivesatellite_submenu'); diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 2eb9ca0c1d..80e72e65cf 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -169,6 +169,7 @@ $visual_format = 0; $filter_search = ''; $filter_exclude = ''; +$use_prefix_notation = true; // Added for select fields. $total_time = true; @@ -461,6 +462,7 @@ switch ($action) { $lapse = $item['lapse']; $lapse_calc = $item['lapse_calc']; $visual_format = $item['visual_format']; + $use_prefix_notation = $item['use_prefix_notation']; break; case 'max_value': @@ -476,6 +478,7 @@ switch ($action) { $lapse = $item['lapse']; $lapse_calc = $item['lapse_calc']; $visual_format = $item['visual_format']; + $use_prefix_notation = $item['use_prefix_notation']; break; case 'min_value': @@ -491,6 +494,7 @@ switch ($action) { $lapse = $item['lapse']; $lapse_calc = $item['lapse_calc']; $visual_format = $item['visual_format']; + $use_prefix_notation = $item['use_prefix_notation']; break; case 'sumatory': @@ -504,6 +508,7 @@ switch ($action) { $idAgentModule = $item['id_agent_module']; $period = $item['period']; $uncompressed_module = $item['uncompressed_module']; + $use_prefix_notation = $item['use_prefix_notation']; break; case 'historical_data': @@ -773,6 +778,7 @@ switch ($action) { $show_resume = $item['show_resume']; $show_graph = $item['show_graph']; $order_uptodown = $item['order_uptodown']; + $use_prefix_notation = $item['use_prefix_notation']; $text_agent = ''; if (isset($style['text_agent']) === true @@ -3404,6 +3410,22 @@ $class = 'databox filters'; + + + + + + + + + data[$row][1] = ''.__('Example').' '.date($config['date_f $table_other->data[$row][1] .= html_print_input_text('date_format', $config['date_format'], '', 30, 100, true); $row++; +$decimal_separators = [ + ',' => ',', + '.' => '.' +]; + +$table_other->data[$row][0] = __('Decimal separator'); +$table_other->data[$row][1] = html_print_select( + $decimal_separators, + 'decimal_separator', + $config['decimal_separator'], + '', + '', + '', + true, + false, + false +); + + +$row++; + if ($config['prominent_time'] == 'comparation') { $timestamp = false; $comparation = true; diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 5388aa9a45..a1fa53ced3 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -1450,17 +1450,17 @@ class DiscoveryTaskList extends HTML // Header information. if ((int) $task['status'] <= 0 && empty($summary)) { - if ($task['type'] == DISCOVERY_APP_VMWARE && $task['utimestamp'] != 0) { - $outputMessage = __('Task completed.'); + if ((int) $task['utimestamp'] !== 0) { + $output .= $this->progressTaskGraph($task); } else { $outputMessage = __('This task has never executed'); - } - $output .= ui_print_info_message( - $outputMessage, - '', - true - ); + $output .= ui_print_info_message( + $outputMessage, + '', + true + ); + } } else if ($task['status'] == 1 || ($task['utimestamp'] == 0 && $task['interval_sweep']) ) { diff --git a/pandora_console/images/widgets/DataMatrix.png b/pandora_console/images/widgets/DataMatrix.png new file mode 100644 index 0000000000..c19ed708c4 Binary files /dev/null and b/pandora_console/images/widgets/DataMatrix.png differ diff --git a/pandora_console/include/ajax/alert_list.ajax.php b/pandora_console/include/ajax/alert_list.ajax.php index ae7ff1501b..a4bbea1071 100644 --- a/pandora_console/include/ajax/alert_list.ajax.php +++ b/pandora_console/include/ajax/alert_list.ajax.php @@ -654,7 +654,7 @@ if ($get_agent_alerts_datatable === true) { } $idGroup = $filter_alert['ag_group']; - $tag_filter = $filter_alert['tag_filter']; + $tag_filter = $filter_alert['tag']; $action_filter = $filter_alert['action']; try { diff --git a/pandora_console/include/ajax/custom_fields.php b/pandora_console/include/ajax/custom_fields.php index 3fd81ec4b0..77e79800aa 100644 --- a/pandora_console/include/ajax/custom_fields.php +++ b/pandora_console/include/ajax/custom_fields.php @@ -429,7 +429,9 @@ if (check_login()) { $table_modules->data[$key][1] = remove_right_zeros( number_format( $value['datos'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } else { diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index c43da3e146..61720a99a4 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -26,6 +26,8 @@ * ============================================================================ */ +use PandoraFMS\Enterprise\Metaconsole\Node; + // Begin. if (check_login()) { global $config; @@ -59,6 +61,11 @@ if (check_login()) { 0 ); + $get_data_dataMatrix = (bool) get_parameter( + 'get_data_dataMatrix', + 0 + ); + if ($get_agent_modules_json_by_name === true) { $agent_name = get_parameter('agent_name'); @@ -499,7 +506,9 @@ if (check_login()) { $data[] = remove_right_zeros( number_format( $row[$attr[0]], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } @@ -507,7 +516,9 @@ if (check_login()) { $data[] = remove_right_zeros( number_format( $row[$attr[0]], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } @@ -524,7 +535,9 @@ if (check_login()) { $data[] = remove_right_zeros( number_format( $row[$attr[0]], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } @@ -1430,4 +1443,190 @@ if (check_login()) { return; } + + if ($get_data_dataMatrix === true) { + global $config; + + $table_id = get_parameter('table_id', ''); + $modules = json_decode( + io_safe_output( + get_parameter('modules', '') + ), + true + ); + $period = get_parameter('period', 0); + $slice = get_parameter('slice', 0); + + // Datatables offset, limit. + $start = get_parameter('start', 0); + $formatData = (bool) get_parameter('formatData', 0); + $length = get_parameter( + 'length', + $config['block_size'] + ); + + $order = get_datatable_order(true); + + // Total time per page. + $time_all_box = ($length * $slice); + + // Total number of boxes. + $total_box = ceil($period / $slice); + + if ($start > 0) { + $start = ($start / $length); + } + + // Uncompress. + try { + ob_start(); + $dateNow = get_system_time(); + $final = ($dateNow - $period); + $date = ($dateNow - ($time_all_box * $start)); + + if (($date - $time_all_box) > $final) { + $datelimit = ($date - $time_all_box); + } else { + $datelimit = $final; + } + + foreach ($modules as $key => $value) { + if (is_metaconsole() === true) { + try { + $node = new Node((int) $value['id_node']); + $node->connect(); + } catch (\Exception $e) { + // Unexistent agent. + $node->disconnect(); + } + } + + $value['thresholds'] = [ + 'min_critical' => (empty($value['c_min']) === true) ? null : $value['c_min'], + 'max_critical' => (empty($value['c_max']) === true) ? null : $value['c_max'], + 'min_warning' => (empty($value['w_min']) === true) ? null : $value['w_min'], + 'max_warning' => (empty($value['w_max']) === true) ? null : $value['w_max'], + ]; + + $module_data = db_uncompress_module_data( + $value['id'], + $datelimit, + $date, + $slice, + true + ); + + $uncompressData[] = array_reduce( + $module_data, + function ($carry, $item) use ($value, $config, $formatData) { + // Last value. + $vdata = null; + if (is_array($item['data']) === true) { + foreach ($item['data'] as $v) { + $vdata = $v['datos']; + } + } + + $status = get_status_data_modules( + $value['id'], + $vdata, + $value['thresholds'] + ); + + $resultData = ''; + if ($vdata !== null && $vdata !== '' && $vdata !== false) { + if (isset($formatData) === true + && (bool) $formatData === true + ) { + $resultData .= format_for_graph( + $vdata, + $config['graph_precision'] + ); + } else { + $resultData .= sla_truncate( + $vdata, + $config['graph_precision'] + ); + } + + $resultData .= ' '.$value['unit']; + } else { + $resultData .= '--'; + } + + $resultData .= ''; + $carry[] = [ + 'utimestamp' => $item['utimestamp'], + 'Column-'.$value['id'] => $resultData, + ]; + + return $carry; + }, + [] + ); + + if (is_metaconsole() === true) { + $node->disconnect(); + } + } + + if (empty($uncompressData) === false) { + $data = array_reduce( + $uncompressData, + function ($carry, $item) { + foreach ($item as $data_module) { + foreach ($data_module as $key => $value) { + if ($key === 'utimestamp') { + $carry[$data_module['utimestamp']]['date'] = date('Y-m-d H:i', (int) $value); + } else { + $carry[$data_module['utimestamp']][$key] = $value; + } + } + } + + return $carry; + } + ); + } + + if (empty($data) === false) { + $data = array_reverse(array_values($data)); + } else { + $data = []; + } + + // RecordsTotal && recordsfiltered resultados totales. + echo json_encode( + [ + 'data' => $data, + 'recordsTotal' => $total_box, + 'recordsFiltered' => $total_box, + ] + ); + + $response = ob_get_clean(); + + // Clean output buffer. + while (ob_get_level() !== 0) { + ob_end_clean(); + } + } catch (Exception $e) { + echo json_encode( + ['error' => $e->getMessage()] + ); + } + + // If not valid it will throw an exception. + json_decode($response); + if (json_last_error() == JSON_ERROR_NONE) { + // If valid dump. + echo $response; + } else { + echo json_encode( + ['error' => $response] + ); + } + + return; + } } diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 5dad75e5ad..7c5a827b51 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -2636,6 +2636,8 @@ class AgentWizard extends HTML */ private function resultsInterfaceWizard() { + global $config; + $generalInterfaceModules = $this->getInterfacesModules(); $generalInterfaceTables = []; $generalInterfaceModulesUpdated = []; @@ -2849,7 +2851,12 @@ class AgentWizard extends HTML // Format current value with thousands and decimals. if (is_numeric($currentValue) === true) { $decimals = (is_float($currentValue) === true) ? 2 : 0; - $currentValue = number_format($currentValue, $decimals); + $currentValue = number_format( + $currentValue, + $decimals, + $config['decimal_separator'], + $config['thousand_separator'] + ); } // It unit of measure have data, attach to current value. diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index a8f84f04be..db9f459f00 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -987,7 +987,7 @@ class Diagnostics extends Wizard ], 'tablesFragmentationValue' => [ 'name' => __('Tables fragmentation (current value)'), - 'value' => number_format($tFragmentationValue, 2).'%', + 'value' => number_format($tFragmentationValue, 2, $config['decimal_separator'], $config['thousand_separator']).'%', ], 'tablesFragmentationStatus' => [ 'name' => __('Table fragmentation status'), @@ -1122,7 +1122,9 @@ class Diagnostics extends Wizard if ($totalModuleIntervalTime !== false) { $averageTime = number_format( ((int) $totalNetworkModules / (int) $totalModuleIntervalTime), - 3 + 3, + $config['decimal_separator'], + $config['thousand_separator'] ); } @@ -1749,7 +1751,7 @@ class Diagnostics extends Wizard $sizeServerLog = number_format($fileSize); $sizeServerLog = (0 + str_replace(',', '', $sizeServerLog)); - $value = number_format(($fileSize / $mega), 3); + $value = number_format(($fileSize / $mega), 3, $config['decimal_separator'], $config['thousand_separator']); $message = __('You have more than 10 MB of logs'); $status = 0; if ($sizeServerLog <= $tenMega) { diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php new file mode 100644 index 0000000000..476f5011ea --- /dev/null +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -0,0 +1,1572 @@ +ajaxController = $ajaxController; + $this->filter_alert = $filter_alert; + $this->filter_severity = $filter_severity; + $this->filter_free_search = $filter_free_search; + $this->filter_status = $filter_status; + $this->filter_group_by = $filter_group_by; + $this->filter_hours_ago = $filter_hours_ago; + $this->filter_trap_type = $filter_trap_type; + $this->refr = $refr; + } + + + /** + * Run view + * + * @return void + */ + public function run() + { + global $config; + // Javascript. + ui_require_jquery_file('pandora'); + // CSS. + ui_require_css_file('wizard'); + ui_require_css_file('discovery'); + + $default_refr = 300; + + if (!isset($config['pure']) || $config['pure'] === false) { + $statistics['text'] = ''.html_print_image( + 'images/op_reporting.png', + true, + [ + 'title' => __('Statistics'), + 'class' => 'invert_filter', + ] + ).''; + $list['text'] = ''.html_print_image( + 'images/op_snmp.png', + true, + [ + 'title' => __('List'), + 'class' => 'invert_filter', + ] + ).''; + $list['active'] = true; + + $screen['text'] = ''.html_print_image( + 'images/full_screen.png', + true, + [ + 'title' => __('List'), + 'class' => 'invert_filter', + ] + ).''; + + // Header. + ui_print_standard_header( + __('SNMP Console'), + 'images/op_snmp.png', + false, + 'snmp_console', + false, + [ + $screen, + $list, + $statistics, + ], + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('SNMP'), + ], + ] + ); + } else { + echo '
'; + + echo ''; + + echo '
'; + + ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/'); + ui_require_css_file('pandora_dashboard', ENTERPRISE_DIR.'/include/styles/'); + ui_require_css_file('cluetip', 'include/styles/js/'); + + ui_require_jquery_file('countdown'); + ui_require_javascript_file('pandora_dashboard', ENTERPRISE_DIR.'/include/javascript/'); + ui_require_javascript_file('wz_jsgraphics'); + ui_require_javascript_file('pandora_visual_console'); + } + + // Datatables list. + try { + $checkbox_all = html_print_checkbox( + 'all_validate_box', + 1, + false, + true + ); + + $columns = [ + 'status', + [ + 'text' => 'snmp_agent', + 'class' => 'snmp-td', + ], + [ + 'text' => 'enterprise_string', + 'class' => 'snmp-td', + ], + [ + 'text' => 'count', + 'class' => 'snmp-td', + ], + [ + 'text' => 'trap_subtype', + 'class' => 'snmp-td', + ], + [ + 'text' => 'user_id', + 'class' => 'snmp-td', + ], + [ + 'text' => 'timestamp', + 'class' => 'snmp-td', + ], + 'alert', + 'action', + [ + 'text' => 'm', + 'class' => 'mw60px pdd_0px', + ], + ]; + + $column_names = [ + __('Status'), + __('SNMP Agent'), + __('Enterprise String'), + __('Count'), + __('Trap subtype'), + __('User ID'), + __('Timestamp'), + __('Alert'), + __('Actions'), + [ + 'text' => 'm', + 'extra' => $checkbox_all, + 'class' => 'w20px no-text-imp', + ], + ]; + + $show_alerts = [ + -1 => __('All'), + 0 => __('Not triggered'), + 1 => __('Triggered'), + ]; + + $severities = get_priorities(); + $severities[-1] = __('All'); + + $paginations = [ + $config['block_size'] => __('Default'), + 25 => '25', + 50 => '50', + 100 => '100', + 200 => '200', + 500 => '500', + ]; + + $status_array = [ + -1 => __('All'), + 0 => __('Not validated'), + 1 => __('Validated'), + ]; + + $trap_types = [ + -1 => __('None'), + 0 => __('Cold start (0)'), + 1 => __('Warm start (1)'), + 2 => __('Link down (2)'), + 3 => __('Link up (3)'), + 4 => __('Authentication failure (4)'), + 5 => __('Other'), + ]; + + $this->tableId = 'snmp_console'; + + // Load datatables user interface. + ui_print_datatable( + [ + 'id' => $this->tableId, + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'ajax_url' => $this->ajaxController, + 'ajax_data' => ['method' => 'draw'], + 'ajax_postprocces' => 'process_datatables_item(item)', + 'search_button_class' => 'sub filter float-right', + 'no_sortable_columns' => [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + ], + 'form' => [ + 'class' => 'flex-row', + 'inputs' => [ + [ + 'label' => __('Alert'), + 'type' => 'select', + 'id' => 'filter_alert', + 'name' => 'filter_alert', + 'class' => 'w200px', + 'fields' => $show_alerts, + 'return' => true, + 'selected' => $this->filter_alert, + ], + [ + 'label' => __('Severity'), + 'type' => 'select', + 'id' => 'filter_severity', + 'name' => 'filter_severity', + 'class' => 'w200px', + 'fields' => $severities, + 'return' => true, + 'selected' => $this->filter_severity, + ], + [ + 'label' => __('Free search'), + 'type' => 'text', + 'class' => 'w400px', + 'id' => 'filter_free_search', + 'name' => 'filter_free_search', + 'value' => $this->filter_free_search, + ], + [ + 'label' => __('Status'), + 'type' => 'select', + 'id' => 'filter_status', + 'name' => 'filter_status', + 'class' => 'w200px', + 'fields' => $status_array, + 'return' => true, + 'selected' => $this->filter_status, + ], + [ + 'label' => __('Group by Enterprise String/IP'), + 'type' => 'select', + 'name' => 'filter_group_by', + 'selected' => $this->filter_group_by, + 'disabled' => false, + 'return' => true, + 'id' => 'filter_group_by', + 'fields' => [ + 0 => __('No'), + 1 => __('Yes'), + ], + ], + [ + 'label' => __('Max. hours old'), + 'type' => 'text', + 'class' => 'w200px', + 'id' => 'filter_hours_ago', + 'name' => 'filter_hours_ago', + 'value' => $this->filter_hours_ago, + ], + [ + 'label' => __('Trap type'), + 'type' => 'select', + 'id' => 'filter_trap_type', + 'name' => 'filter_trap_type', + 'class' => 'w200px', + 'fields' => $trap_types, + 'return' => true, + 'selected' => $this->filter_trap_type, + ], + ], + ], + ] + ); + } catch (Exception $e) { + echo $e->getMessage(); + } + + echo '
'; + html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"'); + echo ' '; + html_print_submit_button( + __('Delete'), + 'deletebt', + false, + 'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"' + ); + echo '
'; + + echo '
'; + echo '

'.__('Status').'

'; + echo html_print_image( + 'images/pixel_green.png', + true, + [ + 'width' => '20', + 'height' => '20', + ] + ).' - '.__('Validated'); + echo '
'; + echo html_print_image( + 'images/pixel_red.png', + true, + [ + 'width' => '20', + 'height' => '20', + ] + ).' - '.__('Not validated'); + echo '
'; + echo '
'; + echo '

'.__('Alert').'

'; + echo html_print_image( + 'images/pixel_yellow.png', + true, + [ + 'width' => '20', + 'height' => '20', + ] + ).' - '.__('Fired'); + echo '
'; + echo html_print_image( + 'images/pixel_gray.png', + true, + [ + 'width' => '20', + 'height' => '20', + ] + ).' - '.__('Not fired'); + echo '
'; + echo '
'; + echo '

'.__('Action').'

'; + echo html_print_image('images/ok.png', true).' - '.__('Validate'); + echo '
'; + echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']).' - '.__('Delete'); + echo '
'; + echo '
'; + echo '

'.__('Severity').'

'; + foreach (get_priorities() as $num => $name) { + echo ''.$name.''; + echo '
'; + } + + echo '
'; + + // Load own javascript file. + echo $this->loadJS(); + } + + + /** + * Get the data for draw the table. + * + * @return void. + */ + public function draw() + { + global $config; + + // Init data. + $data = []; + // Count of total records. + $count = 0; + // Catch post parameters. + $start = get_parameter('start', 0); + $length = get_parameter('length', $config['block_size']); + + $order = get_datatable_order(true); + $filters = get_parameter('filter', []); + + // Build ranges. + $now = new DateTime(); + $ago = new DateTime(); + $interval = new DateInterval(sprintf('PT%dH', $filters['filter_hours_ago'])); + $ago->sub($interval); + + $date_from_trap = $ago->format('Y/m/d'); + $date_to_trap = $now->format('Y/m/d'); + $time_from_trap = $ago->format('H:i:s'); + $time_to_trap = $now->format('H:i:s'); + + try { + ob_start(); + $data = []; + + $user_groups = users_get_groups($config['id_user'], 'AR', false); + $prea = array_keys($user_groups); + $ids = join(',', $prea); + + $user_in_group_wo_agents = db_get_value_sql('select count(DISTINCT(id_usuario)) from tusuario_perfil where id_usuario ="'.$config['id_user'].'" and id_perfil = 1 and id_grupo in (select id_grupo from tgrupo where id_grupo in ('.$ids.') and id_grupo not in (select id_grupo from tagente))'); + if ($user_in_group_wo_agents == 0) { + $rows = db_get_all_rows_filter( + 'tagente', + ['id_grupo' => array_keys($user_groups)], + ['id_agente'] + ); + $id_agents = []; + foreach ($rows as $row) { + $id_agents[] = $row['id_agente']; + } + + if (!empty($id_agents)) { + $address_by_user_groups = agents_get_addresses($id_agents); + foreach ($address_by_user_groups as $i => $a) { + $address_by_user_groups[$i] = '"'.$a.'"'; + } + } + } else { + $rows = db_get_all_rows_filter( + 'tagente', + [], + ['id_agente'] + ); + $id_agents = []; + foreach ($rows as $row) { + $id_agents[] = $row['id_agente']; + } + + $all_address_agents = agents_get_addresses($id_agents); + foreach ($all_address_agents as $i => $a) { + $all_address_agents[$i] = '"'.$a.'"'; + } + } + + if (empty($address_by_user_groups)) { + $address_by_user_groups = []; + array_unshift($address_by_user_groups, '""'); + } + + if (empty($all_address_agents)) { + $all_address_agents = []; + array_unshift($all_address_agents, '""'); + } + + $sql = 'SELECT * FROM ttrap + WHERE ( + `source` IN ('.implode(',', $address_by_user_groups).") OR + `source`='' OR + `source` NOT IN (".implode(',', $all_address_agents).') + ) + %s + ORDER BY timestamp DESC + LIMIT %d,%d'; + + $whereSubquery = ''; + if ($filters['filter_alert'] != -1) { + $whereSubquery .= ' AND alerted = '.$filters['filter_alert']; + } + + if ($filters['filter_severity'] != -1) { + // There are two special severity values aimed to match two different trap standard severities + // in database: warning/critical and critical/normal. + if ($filters['filter_severity'] != EVENT_CRIT_OR_NORMAL + && $filters['filter_severity'] != EVENT_CRIT_WARNING_OR_CRITICAL + ) { + // Test if enterprise is installed to search oid in text or oid field in ttrap. + if ($config['enterprise_installed']) { + $whereSubquery .= ' AND ( + (alerted = 0 AND severity = '.$filters['filter_severity'].') OR + (alerted = 1 AND priority = '.$filters['filter_severity'].'))'; + } else { + $whereSubquery .= ' AND ( + (alerted = 0 AND 1 = '.$filters['filter_severity'].') OR + (alerted = 1 AND priority = '.$filters['filter_severity'].'))'; + } + } else if ($filters['filter_severity'] === EVENT_CRIT_WARNING_OR_CRITICAL) { + // Test if enterprise is installed to search oid in text or oid field in ttrap. + if ($config['enterprise_installed']) { + $whereSubquery .= ' AND ( + (alerted = 0 AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR + (alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } else { + $whereSubquery .= ' AND ( + (alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } + } else if ($filters['filter_severity'] === EVENT_CRIT_OR_NORMAL) { + // Test if enterprise is installed to search oid in text or oid field in ttrap. + if ($config['enterprise_installed']) { + $whereSubquery .= ' AND ( + (alerted = 0 AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR + (alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } else { + $whereSubquery .= ' AND ( + (alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } + } + } + + if ($filters['filter_free_search'] !== '') { + $whereSubquery .= ' + AND (source LIKE "%'.$filters['filter_free_search'].'%" OR + oid LIKE "%'.$filters['filter_free_search'].'%" OR + oid_custom LIKE "%'.$filters['filter_free_search'].'%" OR + type_custom LIKE "%'.$filters['filter_free_search'].'%" OR + value LIKE "%'.$filters['filter_free_search'].'%" OR + value_custom LIKE "%'.$filters['filter_free_search'].'%" OR + id_usuario LIKE "%'.$filters['filter_free_search'].'%" OR + text LIKE "%'.$filters['filter_free_search'].'%" OR + description LIKE "%'.$filters['filter_free_search'].'%")'; + } + + if ($filters['filter_status'] != -1) { + $whereSubquery .= ' AND status = '.$filters['filter_status']; + } + + if ($date_from_trap != '') { + if ($time_from_trap != '') { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' '.$time_from_trap.'")) + '; + } else { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' 23:59:59")) + '; + } + } + + if ($date_to_trap != '') { + if ($time_to_trap) { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' '.$time_to_trap.'")) + '; + } else { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' 23:59:59")) + '; + } + } + + if ($filters['filter_trap_type'] == 5) { + $whereSubquery .= ' AND type NOT IN (0, 1, 2, 3, 4)'; + } else if ($filters['filter_trap_type'] != -1) { + $whereSubquery .= ' AND type = '.$filters['filter_trap_type']; + } + + if ($filters['filter_group_by']) { + $where_without_group = $whereSubquery; + $whereSubquery .= ' GROUP BY source,oid'; + } + + $sql = sprintf($sql, $whereSubquery, $start, $length); + $sql_count = 'SELECT COUNT(id_trap) FROM ttrap + WHERE ( + source IN ('.implode(',', $address_by_user_groups).") OR + source='' OR + source NOT IN (".implode(',', $all_address_agents).') + ) + %s'; + + $sql_count = sprintf($sql_count, $whereSubquery); + + $traps = db_get_all_rows_sql($sql, true); + $total = (int) db_get_value_sql($sql_count, false, true); + + if (empty($traps) === false) { + $data = $traps; + $data = array_reduce( + $data, + function ($carry, $item) use ($filters, $where_without_group) { + global $config; + + if (empty($carry) === true) { + $count = 0; + } else { + $count = count($carry); + } + + // Transforms array of arrays $data into an array + // of objects, making a post-process of certain fields. + $tmp = (object) $item; + + $severity_class = get_priority_class($tmp->severity); + + $status = $tmp->status; + + // Status. + if ($status == 0) { + $tmp->status = html_print_image( + 'images/pixel_red.png', + true, + [ + 'title' => __('Not validated'), + 'width' => '20', + 'height' => '20', + ] + ); + } else { + $tmp->status = html_print_image( + 'images/pixel_green.png', + true, + [ + 'title' => __('Validated'), + 'width' => '20', + 'height' => '20', + ] + ); + } + + // SNMP Agent. + $agent = agents_get_agent_with_ip($tmp->source); + if ($agent === false) { + $tmp->snmp_agent .= ''.$tmp->source.''; + } else { + $tmp->snmp_agent .= '
'; + $tmp->snmp_agent .= ''.$agent['alias'].ui_print_help_tip($tmp->source, true, 'images/tip.png'); + '
'; + } + + // Enterprise string. + if (empty($tmp->text) === false) { + $enterprise_string = $tmp->text; + } else if (empty($tmp->oid) === false) { + $enterprise_string = $tmp->oid; + } else { + $enterprise_string = __('N/A'); + } + + $tmp->enterprise_string = '
'.$enterprise_string.'
'; + + // Count. + if ($filters['filter_group_by']) { + $sql = 'SELECT count(*) FROM ttrap WHERE 1=1 + '.$where_without_group.' + AND oid="'.$tmp->oid.'" + AND source="'.$tmp->source.'"'; + $group_traps = db_get_value_sql($sql); + $tmp->count = '
'.$group_traps.'
'; + } + + // Trap subtype. + $tmp->trap_subtype = '
'; + if (empty($tmp->value) === true) { + $tmp->trap_subtype .= __('N/A'); + } else { + $tmp->trap_subtype .= ui_print_truncate_text($tmp->value, GENERIC_SIZE_TEXT, false); + } + + $tmp->trap_subtype .= '
'; + + // User ID. + $tmp->user_id = '
'; + if (empty($status) === false) { + $tmp->user_id .= ''.substr($tmp->id_usuario, 0, 8).''; + if (!empty($tmp->id_usuario)) { + $tmp->user_id .= ui_print_help_tip(get_user_fullname($tmp->id_usuario), true); + } + } else { + $tmp->user_id .= '--'; + } + + $tmp->user_id .= '
'; + + // Timestamp. + $timestamp = $tmp->timestamp; + $tmp->timestamp = '
'; + $tmp->timestamp .= ''; + $tmp->timestamp .= ui_print_timestamp($timestamp, true); + $tmp->timestamp .= '
'; + + // Use alert severity if fired. + if (empty($tmp->alerted) === false) { + $tmp->alert = html_print_image('images/pixel_yellow.png', true, ['width' => '20', 'height' => '20', 'border' => '0', 'title' => __('Alert fired')]); + } else { + $tmp->alert = html_print_image('images/pixel_gray.png', true, ['width' => '20', 'height' => '20', 'border' => '0', 'title' => __('Alert not fired')]); + } + + // Actions. + $tmp->action = ''; + if ($status != 1) { + $tmp->action .= ''.html_print_image( + 'images/ok.png', + true, + [ + 'border' => '0', + 'title' => __('Validate'), + 'onclick' => 'validate_trap(\''.$tmp->id_trap.'\')', + ] + ).' '; + } + + if ($tmp->source === '') { + if (\users_is_admin()) { + $tmp->action .= ''.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'title' => __('Delete'), + 'class' => 'invert_filter', + 'onclick' => 'delete_trap(\''.$tmp->id_trap.'\')', + ] + ).' '; + } + } else { + $tmp->action .= ''.html_print_image( + 'images/cross.png', + true, + [ + 'border' => '0', + 'title' => __('Delete'), + 'class' => 'invert_filter', + 'onclick' => 'delete_trap(\''.$tmp->id_trap.'\')', + ] + ).' '; + } + + $tmp->action .= ''.html_print_image( + 'images/eye.png', + true, + [ + 'alt' => __('Show more'), + 'title' => __('Show more'), + 'class' => 'invert_filter', + ] + ).''; + $tmp->action .= ''.html_print_image('images/edit.png', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor')]).''; + + $tmp->m = html_print_checkbox_extended('snmptrapid[]', $tmp->id_trap, false, false, '', 'class="chk"', true); + + $carry[] = $tmp; + return $carry; + }, + ); + } + + if (empty($data) === true) { + $total = 0; + $data = []; + } + + echo json_encode( + [ + 'data' => $data, + 'recordsTotal' => $total, + 'recordsFiltered' => $total, + ] + ); + // Capture output. + $response = ob_get_clean(); + } catch (Exception $e) { + echo json_encode(['error' => $e->getMessage()]); + exit; + } + + // If not valid, show error with issue. + json_decode($response); + if (json_last_error() === JSON_ERROR_NONE) { + // If valid dump. + echo $response; + } else { + echo json_encode( + ['error' => $response] + ); + } + + exit; + } + + + /** + * Checks if target method is available to be called using AJAX. + * + * @param string $method Target method. + * + * @return boolean True allowed, false not. + */ + public function ajaxMethod(string $method) + { + return in_array($method, $this->AJAXMethods); + } + + + /** + * Delete snmp trap. + * + * @return void + */ + public function deleteTrap() + { + $id_trap = get_parameter('id', 0); + $group_by = (bool) get_parameter('group_by', 0); + + if ($id_trap > 0) { + if ($group_by === true) { + $sql_ids_traps = 'SELECT id_trap, source FROM ttrap WHERE oid IN (SELECT oid FROM ttrap WHERE id_trap = '.$id_trap.') + AND source IN (SELECT source FROM ttrap WHERE id_trap = '.$id_trap.')'; + $ids_traps = db_get_all_rows_sql($sql_ids_traps); + + foreach ($ids_traps as $key => $value) { + $result = db_process_sql_delete('ttrap', ['id_trap' => $value['id_trap']]); + enterprise_hook('snmp_update_forwarded_modules', [$value]); + } + } else { + $forward_info = db_get_row('ttrap', 'id_trap', $id_trap); + $result = db_process_sql_delete('ttrap', ['id_trap' => $id_trap]); + enterprise_hook('snmp_update_forwarded_modules', [$forward_info]); + } + } + } + + + /** + * Delete snmp traps. + * + * @return void + */ + public function deleteTraps() + { + $ids = get_parameter('ids', []); + $group_by = (bool) get_parameter('group_by', false); + + if (empty($ids) === false) { + $string_ids = implode(',', $ids); + if ($group_by === true) { + $sql_ids_traps = 'SELECT id_trap, source FROM ttrap WHERE oid IN (SELECT oid FROM ttrap WHERE id_trap IN ('.$string_ids.')) + AND source IN (SELECT source FROM ttrap WHERE id_trap IN ('.$string_ids.'))'; + $ids_traps = db_get_all_rows_sql($sql_ids_traps); + + $array = array_column($ids_traps, 'id_trap'); + + $delete = sprintf( + 'DELETE FROM `ttrap` WHERE id_trap IN (%s)', + implode(',', $array), + ); + db_process_sql($delete); + + foreach ($ids_traps as $key => $value) { + enterprise_hook('snmp_update_forwarded_modules', [$value]); + } + } else { + $delete = sprintf( + 'DELETE FROM `ttrap` WHERE id_trap IN (%s)', + $string_ids, + ); + db_process_sql($delete); + foreach ($ids as $id_trap) { + enterprise_hook('snmp_update_forwarded_modules', [$id_trap]); + } + } + } + } + + + /** + * Validate snmp trap. + * + * @return void + */ + public function validateTrap() + { + global $config; + + $id_trap = get_parameter('id', 0); + + $values = [ + 'status' => 1, + 'id_usuario' => $config['id_user'], + ]; + + $result = db_process_sql_update('ttrap', $values, ['id_trap' => $id_trap]); + enterprise_hook('snmp_update_forwarded_modules', [$id_trap]); + } + + + /** + * Validate snmp traps. + * + * @return void + */ + public function validateTraps() + { + global $config; + + $ids = get_parameter('ids', []); + + if (empty($ids) === false) { + $update = sprintf( + 'UPDATE ttrap SET `status` = 1, `id_usuario` = "%s" WHERE id_trap IN (%s)', + $config['id_user'], + implode(',', $ids) + ); + db_process_sql($update); + + foreach ($ids as $id_trap) { + enterprise_hook('snmp_update_forwarded_modules', [$id_trap]); + } + } + } + + + /** + * VShow info trap. + * + * @return void + */ + public function showInfo() + { + global $config; + + $id_trap = get_parameter('id', 0); + $group_by = get_parameter('group_by', 0); + $alert = get_parameter('alert', -1); + $severity = get_parameter('severity', -1); + $search = get_parameter('search', ''); + $status = get_parameter('status', 0); + $hours_ago = get_parameter('hours_ago', 8); + $trap_type = get_parameter('trap_type', -1); + + $trap = db_get_row('ttrap', 'id_trap', $id_trap); + + if ($group_by) { + $now = new DateTime(); + $ago = new DateTime(); + $interval = new DateInterval(sprintf('PT%dH', $hours_ago)); + $ago->sub($interval); + + $date_from_trap = $ago->format('Y/m/d'); + $date_to_trap = $now->format('Y/m/d'); + $time_from_trap = $ago->format('H:i:s'); + $time_to_trap = $now->format('H:i:s'); + + $whereSubquery = ''; + if ($alert != -1) { + $whereSubquery .= ' AND alerted = '.$$alert; + } + + if ($severity != -1) { + // There are two special severity values aimed to match two different trap standard severities + // in database: warning/critical and critical/normal. + if ($severity != EVENT_CRIT_OR_NORMAL + && $severity != EVENT_CRIT_WARNING_OR_CRITICAL + ) { + // Test if enterprise is installed to search oid in text or oid field in ttrap. + if ($config['enterprise_installed']) { + $whereSubquery .= ' AND ( + (alerted = 0 AND severity = '.$severity.') OR + (alerted = 1 AND priority = '.$severity.'))'; + } else { + $whereSubquery .= ' AND ( + (alerted = 0 AND 1 = '.$severity.') OR + (alerted = 1 AND priority = '.$severity.'))'; + } + } else if ($severity === EVENT_CRIT_WARNING_OR_CRITICAL) { + // Test if enterprise is installed to search oid in text or oid field in ttrap. + if ($config['enterprise_installed']) { + $whereSubquery .= ' AND ( + (alerted = 0 AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR + (alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } else { + $whereSubquery .= ' AND ( + (alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } + } else if ($severity === EVENT_CRIT_OR_NORMAL) { + // Test if enterprise is installed to search oid in text or oid field in ttrap. + if ($config['enterprise_installed']) { + $whereSubquery .= ' AND ( + (alerted = 0 AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR + (alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } else { + $whereSubquery .= ' AND ( + (alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; + } + } + } + + if ($search !== '') { + $whereSubquery .= ' + AND (source LIKE "%'.$search.'%" OR + oid LIKE "%'.$search.'%" OR + oid_custom LIKE "%'.$search.'%" OR + type_custom LIKE "%'.$search.'%" OR + value LIKE "%'.$search.'%" OR + value_custom LIKE "%'.$search.'%" OR + id_usuario LIKE "%'.$search.'%" OR + text LIKE "%'.$search.'%" OR + description LIKE "%'.$search.'%")'; + } + + if ($status != -1) { + $whereSubquery .= ' AND status = '.$status; + } + + if ($date_from_trap != '') { + if ($time_from_trap != '') { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' '.$time_from_trap.'")) + '; + } else { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' 23:59:59")) + '; + } + } + + if ($date_to_trap != '') { + if ($time_to_trap) { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' '.$time_to_trap.'")) + '; + } else { + $whereSubquery .= ' + AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' 23:59:59")) + '; + } + } + + if ($trap_type == 5) { + $whereSubquery .= ' AND type NOT IN (0, 1, 2, 3, 4)'; + } else if ($trap_type != -1) { + $whereSubquery .= ' AND type = '.$trap_type; + } + + $sql = 'SELECT * FROM ttrap WHERE 1=1 + '.$whereSubquery.' + AND oid="'.$trap['oid'].'" + AND source="'.$trap['source'].'"'; + $group_traps = db_get_all_rows_sql($sql); + $count_group_traps = count($group_traps); + + $sql = 'SELECT timestamp FROM ttrap WHERE 1=1 + '.$whereSubquery.' + AND oid="'.$trap['oid'].'" + AND source="'.$trap['source'].'" + ORDER BY `timestamp` DESC'; + $last_trap = db_get_value_sql($sql); + + $sql = 'SELECT timestamp FROM ttrap WHERE 1=1 + '.$whereSubquery.' + AND oid="'.$trap['oid'].'" + AND source="'.$trap['source'].'" + ORDER BY `timestamp` ASC'; + $first_trap = db_get_value_sql($sql); + + $trap['count'] = $count_group_traps; + $trap['first'] = $first_trap; + $trap['last'] = $last_trap; + } + + echo json_encode($trap); + return; + } + + + /** + * Load Javascript code. + * + * @return string. + */ + public function loadJS() + { + // Nothing for this moment. + ob_start(); + + // Javascript content. + ?> + + 0) { - return number_format($number, $decimals, $dec_point, $thousands_sep); + return number_format($number, $decimals, $config['decimal_separator'], $config['thousand_separator']); } - return number_format($number, 0, $dec_point, $thousands_sep); + return number_format($number, 0, $config['decimal_separator'], $config['thousand_separator']); } @@ -4084,14 +4080,18 @@ function series_type_graph_array($data, $show_elements_graph) $data_return['legend'][$key] .= remove_right_zeros( number_format( $value['min'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); $data_return['legend'][$key] .= ' '.__('Max:'); $data_return['legend'][$key] .= remove_right_zeros( number_format( $value['max'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); $data_return['legend'][$key] .= ' '._('Avg:'); @@ -4099,7 +4099,8 @@ function series_type_graph_array($data, $show_elements_graph) number_format( $value['avg'], $config['graph_precision'], - $config['csv_decimal_separator'] + $config['decimal_separator'], + $config['thousand_separator'] ) ).' '.$str; } @@ -4156,7 +4157,9 @@ function series_type_graph_array($data, $show_elements_graph) $data_return['legend'][$key] .= remove_right_zeros( number_format( $value['data'][0][1], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ).' '.$str; } diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 61d0027ec6..ce6387ffc7 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -604,95 +604,6 @@ function api_get_module_last_value($idAgentModule, $trash1, $other=';', $returnT } -/* - DB column mapping table used by tree_agents (and get module_properties) -*/ - -/* - * Agent related field mappings (output field => column designation for 'tagente'). - * agent_id is not in this list (because it is mandatory). - * agent_id_group is not in this list. - */ -$agent_field_column_mapping = [ - 'agent_name' => 'nombre as agent_name', - 'agent_direction' => 'direccion as agent_direction', - 'agent_comentary' => 'comentarios as agent_comentary', - 'agent_last_contant' => 'ultimo_contacto as agent_last_contant', - 'agent_mode' => 'modo as agent_mode', - 'agent_interval' => 'intervalo as agent_interval', - 'agent_id_os' => 'id_os as agent_id_os', - 'agent_os_version' => 'os_version as agent_os_version', - 'agent_version' => 'agent_version as agent_version', - 'agent_last_remote_contact' => 'ultimo_contacto_remoto as agent_last_remote_contact', - 'agent_disabled' => 'disabled as agent_disabled', - 'agent_id_parent' => 'id_parent as agent_id_parent', - 'agent_custom_id' => 'custom_id as agent_custom_id', - 'agent_server_name' => 'server_name as agent_server_name', - 'agent_cascade_protection' => 'cascade_protection as agent_cascade_protection', - 'agent_cascade_protection_module' => 'cascade_protection_module as agent_cascade_protection_module', -]; - -// module related field mappings 1/2 (output field => column for 'tagente_modulo') -// module_id_agent_modulo is not in this list -$module_field_column_mampping = [ - 'module_id_agent' => 'id_agente as module_id_agent', - 'module_id_module_type' => 'id_tipo_modulo as module_id_module_type', - 'module_description' => 'descripcion as module_description', - 'module_name' => 'nombre as module_name', - 'module_max' => 'max as module_max', - 'module_min' => 'min as module_min', - 'module_interval' => 'module_interval', - 'module_tcp_port' => 'tcp_port as module_tcp_port', - 'module_tcp_send' => 'tcp_send as module_tcp_send', - 'module_tcp_rcv' => 'tcp_rcv as module_tcp_rcv', - 'module_snmp_community' => 'snmp_community as module_snmp_community', - 'module_snmp_oid' => 'snmp_oid as module_snmp_oid', - 'module_ip_target' => 'ip_target as module_ip_target', - 'module_id_module_group' => 'id_module_group as module_id_module_group', - 'module_flag' => 'flag as module_flag', - 'module_id_module' => 'id_modulo as module_id_module', - 'module_disabled' => 'disabled as module_disabled', - 'module_id_export' => 'id_export as module_id_export', - 'module_plugin_user' => 'plugin_user as module_plugin_user', - 'module_plugin_pass' => 'plugin_pass as module_plugin_pass', - 'module_plugin_parameter' => 'plugin_parameter as module_plugin_parameter', - 'module_id_plugin' => 'id_plugin as module_id_plugin', - 'module_post_process' => 'post_process as module_post_process', - 'module_prediction_module' => 'prediction_module as module_prediction_module', - 'module_max_timeout' => 'max_timeout as module_max_timeout', - 'module_max_retries' => 'max_retries as module_max_retries', - 'module_custom_id' => 'custom_id as module_custom_id', - 'module_history_data' => 'history_data as module_history_data', - 'module_min_warning' => 'min_warning as module_min_warning', - 'module_max_warning' => 'max_warning as module_max_warning', - 'module_str_warning' => 'str_warning as module_str_warning', - 'module_min_critical' => 'min_critical as module_min_critical', - 'module_max_critical' => 'max_critical as module_max_critical', - 'module_str_critical' => 'str_critical as module_str_critical', - 'module_min_ff_event' => 'min_ff_event as module_min_ff_event', - 'module_delete_pending' => 'delete_pending as module_delete_pending', - 'module_plugin_macros' => 'macros as module_plugin_macros', - 'module_macros' => 'module_macros as module_macros', - 'module_critical_inverse' => 'critical_inverse as module_critical_inverse', - 'module_warning_inverse' => 'warning_inverse as module_warning_inverse', -]; - -// module related field mappings 2/2 (output field => column for 'tagente_estado') -// module_id_agent_modulo is not in this list -$estado_fields_to_columns_mapping = [ - 'module_id_agent_state' => 'id_agente_estado as module_id_agent_state', - 'module_data' => 'datos as module_data', - 'module_timestamp' => 'timestamp as module_timestamp', - 'module_state' => 'estado as module_state', - 'module_last_try' => 'last_try as module_last_try', - 'module_utimestamp' => 'utimestamp as module_utimestamp', - 'module_current_interval' => 'current_interval as module_current_interval', - 'module_running_by' => 'running_by as module_running_by', - 'module_last_execution_try' => 'last_execution_try as module_last_execution_try', - 'module_status_changes' => 'status_changes as module_status_changes', - 'module_last_status' => 'last_status as module_last_status', -]; - /*** * end of DB column mapping table ***/ @@ -806,9 +717,9 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) 'module_id_module', 'module_disabled', 'module_id_export', - 'module_plugin_user', - 'module_plugin_pass', 'module_plugin_parameter', + 'module_plugin_pass', + 'module_plugin_user', 'module_id_plugin', 'module_post_process', 'module_prediction_module', @@ -897,14 +808,88 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) 'alert_actions_id_group', ]; - // agent related field mappings (output field => column designation for 'tagente') - global $agent_field_column_mapping; + /* + * Agent related field mappings (output field => column designation for 'tagente'). + * agent_id is not in this list (because it is mandatory). + * agent_id_group is not in this list. + */ + $agent_field_column_mapping = [ + 'agent_name' => 'nombre as agent_name', + 'agent_direction' => 'direccion as agent_direction', + 'agent_comentary' => 'comentarios as agent_comentary', + 'agent_last_contant' => 'ultimo_contacto as agent_last_contant', + 'agent_mode' => 'modo as agent_mode', + 'agent_interval' => 'intervalo as agent_interval', + 'agent_id_os' => 'id_os as agent_id_os', + 'agent_os_version' => 'os_version as agent_os_version', + 'agent_version' => 'agent_version as agent_version', + 'agent_last_remote_contact' => 'ultimo_contacto_remoto as agent_last_remote_contact', + 'agent_disabled' => 'disabled as agent_disabled', + 'agent_id_parent' => 'id_parent as agent_id_parent', + 'agent_custom_id' => 'custom_id as agent_custom_id', + 'agent_server_name' => 'server_name as agent_server_name', + 'agent_cascade_protection' => 'cascade_protection as agent_cascade_protection', + 'agent_cascade_protection_module' => 'cascade_protection_module as agent_cascade_protection_module', + ]; // module related field mappings 1/2 (output field => column for 'tagente_modulo') - global $module_field_column_mampping; + // module_id_agent_modulo is not in this list + // module_plugin_user, module_plugin_pass, module_plugin_macros are not in this list due to security purposes. + $module_field_column_mapping = [ + 'module_id_agent' => 'id_agente as module_id_agent', + 'module_id_module_type' => 'id_tipo_modulo as module_id_module_type', + 'module_description' => 'descripcion as module_description', + 'module_name' => 'nombre as module_name', + 'module_max' => 'max as module_max', + 'module_min' => 'min as module_min', + 'module_interval' => 'module_interval', + 'module_tcp_port' => 'tcp_port as module_tcp_port', + 'module_tcp_send' => 'tcp_send as module_tcp_send', + 'module_tcp_rcv' => 'tcp_rcv as module_tcp_rcv', + 'module_snmp_community' => 'snmp_community as module_snmp_community', + 'module_snmp_oid' => 'snmp_oid as module_snmp_oid', + 'module_ip_target' => 'ip_target as module_ip_target', + 'module_id_module_group' => 'id_module_group as module_id_module_group', + 'module_flag' => 'flag as module_flag', + 'module_id_module' => 'id_modulo as module_id_module', + 'module_disabled' => 'disabled as module_disabled', + 'module_id_export' => 'id_export as module_id_export', + 'module_plugin_parameter' => 'plugin_parameter as module_plugin_parameter', + 'module_id_plugin' => 'id_plugin as module_id_plugin', + 'module_post_process' => 'post_process as module_post_process', + 'module_prediction_module' => 'prediction_module as module_prediction_module', + 'module_max_timeout' => 'max_timeout as module_max_timeout', + 'module_max_retries' => 'max_retries as module_max_retries', + 'module_custom_id' => 'custom_id as module_custom_id', + 'module_history_data' => 'history_data as module_history_data', + 'module_min_warning' => 'min_warning as module_min_warning', + 'module_max_warning' => 'max_warning as module_max_warning', + 'module_str_warning' => 'str_warning as module_str_warning', + 'module_min_critical' => 'min_critical as module_min_critical', + 'module_max_critical' => 'max_critical as module_max_critical', + 'module_str_critical' => 'str_critical as module_str_critical', + 'module_min_ff_event' => 'min_ff_event as module_min_ff_event', + 'module_delete_pending' => 'delete_pending as module_delete_pending', + 'module_macros' => 'module_macros as module_macros', + 'module_critical_inverse' => 'critical_inverse as module_critical_inverse', + 'module_warning_inverse' => 'warning_inverse as module_warning_inverse', + ]; // module related field mappings 2/2 (output field => column for 'tagente_estado') - global $estado_fields_to_columns_mapping; + // module_id_agent_modulo is not in this list + $estado_fields_to_columns_mapping = [ + 'module_id_agent_state' => 'id_agente_estado as module_id_agent_state', + 'module_data' => 'datos as module_data', + 'module_timestamp' => 'timestamp as module_timestamp', + 'module_state' => 'estado as module_state', + 'module_last_try' => 'last_try as module_last_try', + 'module_utimestamp' => 'utimestamp as module_utimestamp', + 'module_current_interval' => 'current_interval as module_current_interval', + 'module_running_by' => 'running_by as module_running_by', + 'module_last_execution_try' => 'last_execution_try as module_last_execution_try', + 'module_status_changes' => 'status_changes as module_status_changes', + 'module_last_status' => 'last_status as module_last_status', + ]; // alert related field mappings (output field => column for 'talert_template_modules', ... ) $alert_fields_to_columns_mapping = [ @@ -985,8 +970,8 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) $agent_additional_columns .= (', '.$agent_field_column_mapping[$fld] ); } - if (array_key_exists($fld, $module_field_column_mampping)) { - $module_additional_columns .= (', '.$module_field_column_mampping[$fld]); + if (array_key_exists($fld, $module_field_column_mapping)) { + $module_additional_columns .= (', '.$module_field_column_mapping[$fld]); } if (array_key_exists($fld, $estado_fields_to_columns_mapping)) { @@ -1017,6 +1002,10 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) } foreach ($groups as &$group) { + if (check_acl($config['id_user'], $group['group_id'], 'AR') === false) { + continue; + } + $group = str_replace('\n', $returnReplace, $group); $group['type_row'] = 'group'; @@ -1034,6 +1023,20 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) $agents = []; } + if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true) { + if (array_search('module_plugin_user', $fields) !== false) { + $module_additional_columns .= ' ,plugin_user as module_plugin_user'; + } + + if (array_search('module_plugin_pass', $fields) !== false) { + $module_additional_columns .= ' ,plugin_pass as module_plugin_pass'; + } + + if (array_search('module_plugin_macros', $fields) !== false) { + $module_additional_columns .= ' ,macros as module_plugin_macros'; + } + } + foreach ($agents as $index => &$agent) { $agent = str_replace('\n', $returnReplace, $agent); @@ -1048,15 +1051,17 @@ function api_get_tree_agents($trash1, $trahs2, $other, $returnType) // SKIP collecting MODULES and ALERTS } + $sql = 'SELECT * + FROM (SELECT id_agente_modulo as module_id_agent_modulo '.$module_additional_columns.' + FROM tagente_modulo t1 + WHERE id_agente = '.$agent['agent_id'].') t1 + INNER JOIN (SELECT id_agente_modulo as module_id_agent_modulo '.$estado_additional_columns.' + FROM tagente_estado + WHERE id_agente = '.$agent['agent_id'].') t2 + ON t1.module_id_agent_modulo = t2.module_id_agent_modulo'; + $modules = db_get_all_rows_sql( - 'SELECT * - FROM (SELECT id_agente_modulo as module_id_agent_modulo '.$module_additional_columns.' - FROM tagente_modulo - WHERE id_agente = '.$agent['agent_id'].') t1 - INNER JOIN (SELECT id_agente_modulo as module_id_agent_modulo '.$estado_additional_columns.' - FROM tagente_estado - WHERE id_agente = '.$agent['agent_id'].') t2 - ON t1.module_id_agent_modulo = t2.module_id_agent_modulo' + $sql ); if ($modules === false) { @@ -1365,10 +1370,66 @@ function get_module_properties($id_module, $fields, $separator, $returnType, $re ]; // module related field mappings 1/2 (output field => column for 'tagente_modulo') - global $module_field_column_mampping; + // module_id_agent_modulo is not in this list + // module_plugin_user, module_plugin_pass, module_plugin_macros are not in this list due to security purposes. + $module_field_column_mapping = [ + 'module_id_agent' => 'id_agente as module_id_agent', + 'module_id_module_type' => 'id_tipo_modulo as module_id_module_type', + 'module_description' => 'descripcion as module_description', + 'module_name' => 'nombre as module_name', + 'module_max' => 'max as module_max', + 'module_min' => 'min as module_min', + 'module_interval' => 'module_interval', + 'module_tcp_port' => 'tcp_port as module_tcp_port', + 'module_tcp_send' => 'tcp_send as module_tcp_send', + 'module_tcp_rcv' => 'tcp_rcv as module_tcp_rcv', + 'module_snmp_community' => 'snmp_community as module_snmp_community', + 'module_snmp_oid' => 'snmp_oid as module_snmp_oid', + 'module_ip_target' => 'ip_target as module_ip_target', + 'module_id_module_group' => 'id_module_group as module_id_module_group', + 'module_flag' => 'flag as module_flag', + 'module_id_module' => 'id_modulo as module_id_module', + 'module_disabled' => 'disabled as module_disabled', + 'module_id_export' => 'id_export as module_id_export', + 'module_plugin_parameter' => 'plugin_parameter as module_plugin_parameter', + 'module_plugin_user' => 'plugin_user as module_plugin_user', + 'module_plugin_pass' => 'plugin_pass as module_plugin_pass', + 'module_plugin_macros' => 'macros as module_plugin_macros', + 'module_id_plugin' => 'id_plugin as module_id_plugin', + 'module_post_process' => 'post_process as module_post_process', + 'module_prediction_module' => 'prediction_module as module_prediction_module', + 'module_max_timeout' => 'max_timeout as module_max_timeout', + 'module_max_retries' => 'max_retries as module_max_retries', + 'module_custom_id' => 'custom_id as module_custom_id', + 'module_history_data' => 'history_data as module_history_data', + 'module_min_warning' => 'min_warning as module_min_warning', + 'module_max_warning' => 'max_warning as module_max_warning', + 'module_str_warning' => 'str_warning as module_str_warning', + 'module_min_critical' => 'min_critical as module_min_critical', + 'module_max_critical' => 'max_critical as module_max_critical', + 'module_str_critical' => 'str_critical as module_str_critical', + 'module_min_ff_event' => 'min_ff_event as module_min_ff_event', + 'module_delete_pending' => 'delete_pending as module_delete_pending', + 'module_macros' => 'module_macros as module_macros', + 'module_critical_inverse' => 'critical_inverse as module_critical_inverse', + 'module_warning_inverse' => 'warning_inverse as module_warning_inverse', + ]; // module related field mappings 2/2 (output field => column for 'tagente_estado') - global $estado_fields_to_columns_mapping; + // module_id_agent_modulo is not in this list + $estado_fields_to_columns_mapping = [ + 'module_id_agent_state' => 'id_agente_estado as module_id_agent_state', + 'module_data' => 'datos as module_data', + 'module_timestamp' => 'timestamp as module_timestamp', + 'module_state' => 'estado as module_state', + 'module_last_try' => 'last_try as module_last_try', + 'module_utimestamp' => 'utimestamp as module_utimestamp', + 'module_current_interval' => 'current_interval as module_current_interval', + 'module_running_by' => 'running_by as module_running_by', + 'module_last_execution_try' => 'last_execution_try as module_last_execution_try', + 'module_status_changes' => 'status_changes as module_status_changes', + 'module_last_status' => 'last_status as module_last_status', + ]; if ($fields == false) { $fields = $module_properties_master_fields; @@ -1378,8 +1439,8 @@ function get_module_properties($id_module, $fields, $separator, $returnType, $re $module_additional_columns = ''; $estado_additional_columns = ''; foreach ($fields as $fld) { - if (array_key_exists($fld, $module_field_column_mampping)) { - $module_additional_columns .= (', '.$module_field_column_mampping[$fld]); + if (array_key_exists($fld, $module_field_column_mapping)) { + $module_additional_columns .= (', '.$module_field_column_mapping[$fld]); } if (array_key_exists($fld, $estado_fields_to_columns_mapping)) { @@ -1404,9 +1465,9 @@ function get_module_properties($id_module, $fields, $separator, $returnType, $re $modules = []; } - $modules = str_replace('\n', $returnReplace, $modules); - foreach ($modules as &$module) { + $module = str_replace('\n', $returnReplace, $module); + $module['type_row'] = 'module'; if ($module['module_macros']) { diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 5c4184d81e..cc49761959 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1475,6 +1475,15 @@ function config_update_config() if (config_update_value('use_data_multiplier', get_parameter('use_data_multiplier', '1'), true) === false) { $error_update[] = __('Use data multiplier'); } + + if (config_update_value('decimal_separator', (string) get_parameter('decimal_separator', '.'), true) === false) { + $error_update[] = __('Decimal separator'); + } else { + $thousand_separator = ((string) get_parameter('decimal_separator', '.') === '.') ? ',' : '.'; + if (config_update_value('thousand_separator', $thousand_separator, true) === false) { + $error_update[] = __('Thousand separator'); + } + } break; case 'net': @@ -3479,6 +3488,10 @@ function config_process_config() config_update_value('module_library_password', ''); } + if (!isset($config['decimal_separator'])) { + config_update_value('decimal_separator', '.'); + } + // Finally, check if any value was overwritten in a form. config_update_config(); } diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 83b972ca75..bdc596234b 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -757,7 +757,8 @@ function db_uncompress_module_data( $id_agente_modulo, $tstart=false, $tend=false, - $slice_size=false + $slice_size=false, + $force_slice_not_data=false ) { global $config; @@ -860,7 +861,10 @@ function db_uncompress_module_data( $module_interval = modules_get_interval($id_agente_modulo); - if (($raw_data === false) && ( $first_utimestamp === false )) { + if (($force_slice_not_data === false) + && ($raw_data === false) + && ( $first_utimestamp === false ) + ) { // No data. return false; } @@ -2313,7 +2317,13 @@ function db_get_lock(string $lockname, int $expiration_time=86400) :?int } if ($lock_status === false) { - return null; + db_pandora_audit( + AUDIT_LOG_SYSTEM, + 'Issue in Database Lock', + 'system' + ); + + return (int) null; } return (int) $lock_status; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 9e0333965d..31c2e5214a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1950,7 +1950,7 @@ function html_print_extended_select_for_post_process( $found = false; if ($selected) { - if (array_key_exists(number_format($selected, 14, '.', ','), $fields)) { + if (array_key_exists(number_format($selected, 14, $config['decimal_separator'], $config['thousand_separator']), $fields)) { $found = true; } } diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 443e482173..38c31b0146 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -2589,12 +2589,12 @@ function modules_get_agentmodule_data_for_humans($module) $salida = human_milliseconds_to_string($module['datos']); } } else { - $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } break; default: - $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); break; } break; @@ -2613,12 +2613,12 @@ function modules_get_agentmodule_data_for_humans($module) $salida = human_milliseconds_to_string($module['datos']); } } else { - $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } break; default: - $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); break; } } @@ -2900,7 +2900,7 @@ function modules_get_status($id_agent_module, $db_status, $data, &$status, &$tit } if (is_numeric($data)) { - $title .= ': '.remove_right_zeros(number_format($data, $config['graph_precision'])); + $title .= ': '.remove_right_zeros(number_format($data, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } else { $text = io_safe_output($data); @@ -4336,3 +4336,129 @@ function modules_get_regex( return $result; } + + +/** + * Status for data thresholds modules. + * + * @param integer $id_module Module ID. + * @param mixed $data Data int, bool, null, etc. + * @param array $thresholds Array thresholds. + * + * @return array + */ +function get_status_data_modules(int $id_module, $data, $thresholds) +{ + // Check not init. + if ($data === false) { + return ['color' => COL_NOTINIT]; + } + + // Check boolean. + $is_bolean = modules_is_boolean($id_module); + if ($is_bolean === true) { + if ($data > 0) { + return ['color' => COL_CRITICAL]; + } else { + return ['color' => COL_NORMAL]; + } + } + + $thresholds = calculateThreshold($thresholds); + + foreach (getStatuses() as $status) { + if ($thresholds[$status]['min'] === null + && $thresholds[$status]['max'] === null + ) { + continue; + } + + if (($thresholds[$status]['min'] === null + && $thresholds[$status]['max'] >= $data) + || ($thresholds[$status]['max'] === null + && $thresholds[$status]['min'] <= $data) + || ($thresholds[$status]['min'] <= $data + && $thresholds[$status]['max'] >= $data) + ) { + if ($status === 'critical') { + return ['color' => COL_CRITICAL]; + } else if ($status === 'warning') { + return ['color' => COL_WARNING]; + } else { + return ['color' => COL_NORMAL]; + } + } + } + + return ['color' => COL_NORMAL]; +} + + +/** + * Calculate thresholds. + * + * @param array $thresholds_array + * + * @return array + */ +function calculateThreshold(array $thresholds_array) +{ + $nMax = null; + if ($thresholds_array['min_warning'] !== null) { + $nMax = $thresholds_array['min_warning']; + } else if ($thresholds_array['min_critical'] !== null) { + $nMax = $thresholds_array['min_critical']; + } + + $wMin = null; + if ($thresholds_array['min_warning'] !== null) { + $wMin = $thresholds_array['min_warning']; + } + + $wMax = null; + if ($thresholds_array['max_warning'] !== null) { + $wMax = $thresholds_array['max_warning']; + } + + $cMin = null; + if ($thresholds_array['min_critical'] !== null) { + $cMin = $thresholds_array['min_critical']; + } + + $cMax = null; + if ($thresholds_array['max_critical'] !== null) { + $cMax = $thresholds_array['max_critical']; + } + + $thresholds = [ + 'normal' => [ + 'min' => null, + 'max' => $nMax, + ], + 'warning' => [ + 'min' => $wMin, + 'max' => $wMax, + ], + 'critical' => [ + 'min' => $cMin, + 'max' => $cMax, + ], + ]; + + return $thresholds; +} + + +/** + * Get status. + * + * @return array + */ +function getStatuses() +{ + return [ + 'critical', + 'warning', + 'normal', + ]; +} diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 09322c7a8c..9cd403d69c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1833,14 +1833,24 @@ function reporting_event_top_n( $divisor = get_data_multiplier($units[$key_dt]); - $data['formated_value'] = format_for_graph( - $dt, - 2, - '.', - ',', - $divisor, - $units[$key_dt] - ); + if ((bool) $content['use_prefix_notation'] === false) { + $data['formated_value'] = number_format( + $dt, + 2, + $config['decimal_separator'], + $config['thousand_separator'] + ).' '.$units[$key_dt]; + } else { + $data['formated_value'] = format_for_graph( + $dt, + 2, + '.', + ',', + $divisor, + $units[$key_dt] + ); + } + $data_return[] = $data; } @@ -1901,14 +1911,25 @@ function reporting_event_top_n( $data['agent'] = $an; $data['module'] = $module_name[$key_an]; $data['value'] = $data_top[$key_an]; - $data['formated_value'] = format_for_graph( - $data_top[$key_an], - 2, - '.', - ',', - $divisor, - $units[$key_an] - ); + + if ((bool) $content['use_prefix_notation'] === false) { + $data['formated_value'] = number_format( + $data_top[$key_an], + 2, + $config['decimal_separator'], + $config['thousand_separator'] + ).' '.$units[$key_an]; + } else { + $data['formated_value'] = format_for_graph( + $data_top[$key_an], + 2, + '.', + ',', + $divisor, + $units[$key_an] + ); + } + $data_return[] = $data; } @@ -6917,6 +6938,13 @@ function reporting_value($report, $content, $type, $pdf=false) if (!$config['simple_module_value']) { $formated_value = $value; + } else if ((bool) $content['use_prefix_notation'] === false) { + $formated_value = number_format( + $value, + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] + ).' '.$unit; } else { $formated_value = format_for_graph( $value, @@ -7077,6 +7105,13 @@ function reporting_value($report, $content, $type, $pdf=false) ); if (!$config['simple_module_value']) { $formated_value = $value; + } else if ((bool) $content['use_prefix_notation'] === false) { + $formated_value = number_format( + $value, + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] + ).' '.$unit; } else { $divisor = get_data_multiplier($unit); diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index a468a451fe..c116c3faa8 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2292,7 +2292,9 @@ function reporting_html_agent_module_status($table, $item, $pdf=0) $row['data_module'] = remove_right_zeros( number_format( $data['data_module'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } else { @@ -2785,7 +2787,7 @@ function reporting_html_historical_data($table, $item, $pdf=0) } else { $row = [ $data[__('Date')], - remove_right_zeros(number_format($data[__('Data')], $config['graph_precision'])), + remove_right_zeros(number_format($data[__('Data')], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])), ]; } @@ -2925,7 +2927,9 @@ function reporting_html_last_value($table, $item, $pdf=0) $dataDatos = remove_right_zeros( number_format( $item['data']['datos'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } else { @@ -3470,7 +3474,9 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) ).' '.__('OK').': '.remove_right_zeros( number_format( $item['data']['ok']['value'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ).' %

'; @@ -3481,7 +3487,9 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) ).' '.__('Not OK').': '.remove_right_zeros( number_format( $item['data']['fail']['value'], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ).' % '.'

'; } @@ -3835,7 +3843,9 @@ function reporting_html_value( remove_right_zeros( number_format( $data[__('Maximun')], - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ), ]; diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 3fc35f4d84..be76db9459 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -193,7 +193,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') { $data = "".human_milliseconds_to_string($last_data['datos']).''; } else if (is_numeric($last_data['datos'])) { - $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).''; + $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).''; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -209,7 +209,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals default: if (is_numeric($last_data['datos'])) { - $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).''; + $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).''; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -232,7 +232,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') { $data = "".human_milliseconds_to_string($last_data['datos']).''; } else if (is_numeric($last_data['datos'])) { - $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).''; + $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).''; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -248,7 +248,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals default: if (is_numeric($last_data['datos'])) { - $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).''; + $data = "".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).''; } else { $data = ui_print_truncate_text( io_safe_output($last_data['datos']), @@ -271,7 +271,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals $data_macro = modules_get_unit_macro($last_data['datos'], $module['unit']); if ($data_macro) { if (is_numeric($data_macro)) { - $last_data_str = "".remove_right_zeros(number_format($data_macro, $config['graph_precision'])).''; + $last_data_str = "".remove_right_zeros(number_format($data_macro, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).''; } else { $last_data_str = ui_print_truncate_text( io_safe_output($data_macro), @@ -594,10 +594,10 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) $hashdata = $user.$pwd_deserialiced['auth_token']; $hashdata = md5($hashdata); - $url = $server_data['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agent['id_agente'].'&'.'loginhash=auto&'."loginhash_data=$hashdata&".'loginhash_user='.str_rot13($user); + $url = $server_data['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agent['id_agente']; if ($grants_on_node && (bool) $user_access_node !== false) { - $cellName .= ''.''.$agent['alias'].''; + $cellName .= ''.$agent['alias'].''; } else { $cellName .= ''.$agent['alias'].''; } @@ -703,7 +703,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) $go_to_agent .= html_print_submit_button(__('Edit cluster'), 'upd_button', false, 'class="sub config"', true); } } else { - $go_to_agent .= ''; + $go_to_agent .= ''; $go_to_agent .= html_print_submit_button(__('Go to agent edition'), 'upd_button', false, 'class="sub config"', true); } @@ -905,5 +905,12 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) metaconsole_restore_db(); } - return; + echo " + "; } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index f31d02b3c5..52ad703edd 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -6592,10 +6592,11 @@ function ui_print_comments($comments) } else { $rest_time = (time() - $last_comment['utimestamp']); $time_last = (($rest_time / 60) / 60); - $comentario = ''.number_format($time_last, 0).'  Hours  ('.$last_comment['id_user'].'): '.$last_comment['comment'].''; + + $comentario = ''.number_format($time_last, 0, $config['decimal_separator'], $config['thousand_separator']).'  Hours  ('.$last_comment['id_user'].'): '.$last_comment['comment'].''; if (strlen($comentario) > '200px') { - $comentario = ''.number_format($time_last, 0).'  Hours  ('.$last_comment['id_user'].'): '.$short_comment.'...'; + $comentario = ''.number_format($time_last, 0, $config['decimal_separator'], $config['thousand_separator']).'  Hours  ('.$last_comment['id_user'].'): '.$short_comment.'...'; } } diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 9b1454ab4b..d1b2e60fdc 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -924,7 +924,7 @@ function visual_map_print_item( $value_text = format_for_graph($module_value, 2); if ($value_text <= 0) { - $value_text = remove_right_zeros(number_format($module_value, $config['graph_precision'])); + $value_text = remove_right_zeros(number_format($module_value, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } if (!empty($unit_text)) { @@ -1743,7 +1743,7 @@ function visual_map_print_item( || (modules_is_boolean($layoutData['id_agente_modulo']) && $layoutData['show_last_value'] != 0) ) { if (is_numeric($value)) { - $img_style_title .= '
'.__('Last value: ').remove_right_zeros(number_format($value, $config['graph_precision'])); + $img_style_title .= '
'.__('Last value: ').remove_right_zeros(number_format($value, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } else { $img_style_title .= '
'.__('Last value: ').$value; } @@ -1881,13 +1881,13 @@ function visual_map_print_item( echo ''; echo ""; echo ''; - echo "
".remove_right_zeros(number_format($stat_agent_cr, 2)).'%
'; + echo "
".remove_right_zeros(number_format($stat_agent_cr, 2, $config['decimal_separator'], $config['thousand_separator'])).'%
'; echo "
Critical
"; - echo "
".remove_right_zeros(number_format($stat_agent_wa, 2)).'%
'; + echo "
".remove_right_zeros(number_format($stat_agent_wa, 2, $config['decimal_separator'], $config['thousand_separator'])).'%
'; echo "
Warning
"; - echo "
".remove_right_zeros(number_format($stat_agent_ok, 2)).'%
'; + echo "
".remove_right_zeros(number_format($stat_agent_ok, 2, $config['decimal_separator'], $config['thousand_separator'])).'%
'; echo "
Normal
"; - echo "
".remove_right_zeros(number_format($stat_agent_un, 2)).'%
'; + echo "
".remove_right_zeros(number_format($stat_agent_un, 2, $config['decimal_separator'], $config['thousand_separator'])).'%
'; echo "
Unknown
"; echo ''; echo ''; @@ -2462,7 +2462,7 @@ function visual_map_get_simple_value($type, $id_module, $period=SECONDS_1DAY) } else { if (is_numeric($value)) { if ($config['simple_module_value']) { - $value = remove_right_zeros(number_format($value, $config['graph_precision'])); + $value = remove_right_zeros(number_format($value, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } } diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 8f5256e757..821b85c4d6 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -499,11 +499,11 @@ function flot_custom_pie_chart( foreach ($graph_values as $label => $value) { if ($value['value']) { if ($value['value'] > 1000000) { - $legendvalue = sprintf('%sM', remove_right_zeros(number_format(($value['value'] / 1000000), $config['graph_precision']))); + $legendvalue = sprintf('%sM', remove_right_zeros(number_format(($value['value'] / 1000000), $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']))); } else if ($value['value'] > 1000) { - $legendvalue = sprintf('%sK', remove_right_zeros(number_format(($value['value'] / 1000), $config['graph_precision']))); + $legendvalue = sprintf('%sK', remove_right_zeros(number_format(($value['value'] / 1000), $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']))); } else { - $legendvalue = remove_right_zeros(number_format($value['value'], $config['graph_precision'])); + $legendvalue = remove_right_zeros(number_format($value['value'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } } else { $legendvalue = __('No data'); diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php index de5727a56f..9e1b6c7b81 100644 --- a/pandora_console/include/lib/Dashboard/Widget.php +++ b/pandora_console/include/lib/Dashboard/Widget.php @@ -419,6 +419,7 @@ class Widget case 'GroupedMeterGraphs': case 'ColorModuleTabs': case 'BlockHistogram': + case 'DataMatrix': $className .= '\\'.$name; break; diff --git a/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php b/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php new file mode 100644 index 0000000000..f4b27a5830 --- /dev/null +++ b/pandora_console/include/lib/Dashboard/Widgets/DataMatrix.php @@ -0,0 +1,697 @@ +width = $width; + + // Height. + $this->height = $height; + + // Grid Width. + $this->gridWidth = $gridWidth; + + // Cell Id. + $this->cellId = $cellId; + + // Options. + $this->values = $this->decoders($this->getOptionsWidget()); + + // Positions. + $this->position = $this->getPositionWidget(); + + // Page. + $this->page = basename(__FILE__); + + // ClassName. + $class = new \ReflectionClass($this); + $this->className = $class->getShortName(); + + // Title. + $this->title = __('Color tabs modules'); + + // Name. + if (empty($this->name) === true) { + $this->name = 'single_graph'; + } + + // This forces at least a first configuration. + $this->configurationRequired = false; + if (empty($this->values['moduleDataMatrix']) === true) { + $this->configurationRequired = true; + } + + $this->overflow_scrollbars = false; + } + + + /** + * Decoders hack for retrocompability. + * + * @param array $decoder Values. + * + * @return array Returns the values ​​with the correct key. + */ + public function decoders(array $decoder): array + { + $values = []; + // Retrieve global - common inputs. + $values = parent::decoders($decoder); + + $values['agentsDataMatrix'] = []; + if (isset($decoder['agentsDataMatrix']) === true) { + if (isset($decoder['agentsDataMatrix'][0]) === true + && empty($decoder['agentsDataMatrix']) === false + ) { + $values['agentsDataMatrix'] = explode( + ',', + $decoder['agentsDataMatrix'][0] + ); + } + } + + if (isset($decoder['selectionDataMatrix']) === true) { + $values['selectionDataMatrix'] = $decoder['selectionDataMatrix']; + } + + $values['moduleDataMatrix'] = []; + if (isset($decoder['moduleDataMatrix']) === true) { + if (empty($decoder['moduleDataMatrix']) === false) { + $values['moduleDataMatrix'] = $decoder['moduleDataMatrix']; + } + } + + if (isset($decoder['formatData']) === true) { + $values['formatData'] = $decoder['formatData']; + } + + $values['label'] = 'module'; + if (isset($decoder['label']) === true) { + $values['label'] = $decoder['label']; + } + + if (isset($decoder['fontColor']) === true) { + $values['fontColor'] = $decoder['fontColor']; + } + + if (isset($decoder['period']) === true) { + $values['period'] = $decoder['period']; + } + + if (isset($decoder['slice']) === true) { + $values['slice'] = $decoder['slice']; + } + + if (isset($decoder['limit']) === true) { + $values['limit'] = $decoder['limit']; + } + + return $values; + } + + + /** + * Generates inputs for form (specific). + * + * @return array Of inputs. + * + * @throws Exception On error. + */ + public function getFormInputs(): array + { + global $config; + + $values = $this->values; + + // Retrieve global - common inputs. + $inputs = parent::getFormInputs(); + + $blocks = [ + 'row1', + 'row2', + ]; + + $inputs['blocks'] = $blocks; + + foreach ($inputs as $kInput => $vInput) { + $inputs['inputs']['row1'][] = $vInput; + } + + if (isset($values['formatData']) === false) { + $values['formatData'] = 1; + } + + // Format Data. + $inputs['inputs']['row1'][] = [ + 'label' => __('Format Data'), + 'arguments' => [ + 'name' => 'formatData', + 'id' => 'formatData', + 'type' => 'switch', + 'value' => $values['formatData'], + ], + ]; + + if (isset($values['period']) === false) { + $values['period'] = SECONDS_1DAY; + } + + $inputs['inputs']['row1'][] = [ + 'label' => __('Periodicity'), + 'arguments' => [ + 'name' => 'period', + 'type' => 'interval', + 'value' => $values['period'], + 'nothing' => __('None'), + 'nothing_value' => 0, + 'style_icon' => 'flex-grow: 0', + ], + ]; + + if (isset($values['slice']) === false) { + $values['slice'] = SECONDS_5MINUTES; + } + + $inputs['inputs']['row1'][] = [ + 'label' => __('Interval'), + 'arguments' => [ + 'name' => 'slice', + 'type' => 'interval', + 'value' => $values['slice'], + 'nothing' => __('None'), + 'nothing_value' => 0, + 'style_icon' => 'flex-grow: 0', + ], + ]; + + if (isset($values['limit']) === false) { + $values['limit'] = $config['block_size']; + } + + // Limit Default block_size. + $blockSizeD4 = \format_integer_round(($config['block_size'] / 4)); + $blockSizeD2 = \format_integer_round(($config['block_size'] / 2)); + $fields = [ + $config['block_size'] => $config['block_size'], + $blockSizeD4 => $blockSizeD4, + $blockSizeD2 => $blockSizeD2, + ($config['block_size'] * 2) => ($config['block_size'] * 2), + ($config['block_size'] * 3) => ($config['block_size'] * 3), + ]; + + $inputs['inputs']['row1'][] = [ + 'label' => \__('Limit'), + 'arguments' => [ + 'type' => 'select', + 'fields' => $fields, + 'class' => 'event-widget-input', + 'name' => 'limit', + 'selected' => $values['limit'], + 'return' => true, + ], + ]; + + // Type Label. + $fields = [ + 'module' => __('Module'), + 'agent' => __('Agent'), + 'agent_module' => __('Agent / module'), + ]; + + $inputs['inputs']['row2'][] = [ + 'label' => __('Label'), + 'arguments' => [ + 'type' => 'select', + 'fields' => $fields, + 'name' => 'label', + 'selected' => $values['label'], + 'return' => true, + ], + ]; + + $inputs['inputs']['row2'][] = [ + 'arguments' => [ + 'type' => 'select_multiple_modules_filtered_select2', + 'agent_values' => agents_get_agents_selected(0), + 'agent_name' => 'agentsDataMatrix[]', + 'agent_ids' => $values['agentsDataMatrix'], + 'selectionModules' => $values['selectionDataMatrix'], + 'selectionModulesNameId' => 'selectionDataMatrix', + 'modules_ids' => $values['moduleDataMatrix'], + 'modules_name' => 'moduleDataMatrix[]', + 'notStringModules' => true, + ], + ]; + + return $inputs; + } + + + /** + * Get Post for widget. + * + * @return array + */ + public function getPost():array + { + // Retrieve global - common inputs. + $values = parent::getPost(); + + $values['agentsDataMatrix'] = \get_parameter( + 'agentsDataMatrix', + [] + ); + $values['selectionDataMatrix'] = \get_parameter( + 'selectionDataMatrix', + 0 + ); + + $values['moduleDataMatrix'] = \get_parameter( + 'moduleDataMatrix' + ); + + $agColor = []; + if (isset($values['agentsDataMatrix'][0]) === true + && empty($values['agentsDataMatrix'][0]) === false + ) { + $agColor = explode(',', $values['agentsDataMatrix'][0]); + } + + $agModule = []; + if (isset($values['moduleDataMatrix'][0]) === true + && empty($values['moduleDataMatrix'][0]) === false + ) { + $agModule = explode(',', $values['moduleDataMatrix'][0]); + } + + $values['moduleDataMatrix'] = \get_same_modules_all( + $agColor, + $agModule + ); + + $values['formatData'] = \get_parameter_switch('formatData'); + + $values['fontColor'] = \get_parameter('fontColor', '#2c3e50'); + $values['label'] = \get_parameter('label', 'module'); + + $values['period'] = \get_parameter('period', 0); + $values['slice'] = \get_parameter('slice', 0); + $values['limit'] = \get_parameter('limit', 20); + + return $values; + } + + + /** + * Draw widget. + * + * @return string; + */ + public function load() + { + $this->size = parent::getSize(); + + $output = ''; + if (count($this->values['moduleDataMatrix']) > self::MAX_MODULES) { + $output .= '
'; + $output .= \ui_print_info_message( + __( + 'The maximum number of modules to display is %d, please reconfigure the widget.', + self::MAX_MODULES + ), + '', + true + ); + $output .= '
'; + return $output; + } + + if (is_metaconsole() === true) { + $modules_nodes = array_reduce( + $this->values['moduleDataMatrix'], + function ($carry, $item) { + $explode = explode('|', $item); + $carry[$explode[0]][] = $explode[1]; + return $carry; + }, + [] + ); + + $modules = []; + foreach ($modules_nodes as $n => $mod) { + try { + $node = new Node((int) $n); + $node->connect(); + $node_mods = $this->getInfoModules($mod); + if (empty($node_mods) === false) { + foreach ($node_mods as $value) { + $value['id_node'] = $n; + $value['server_name'] = $node->toArray()['server_name']; + $modules[] = $value; + } + } + + $node->disconnect(); + } catch (\Exception $e) { + // Unexistent agent. + $node->disconnect(); + } + } + } else { + $modules = $this->getInfoModules( + $this->values['moduleDataMatrix'] + ); + } + + if ($modules !== false && empty($modules) === false) { + // Datatables list. + try { + $info_columns = $this->columns($modules); + $columns = $info_columns['columns']; + $column_names = $info_columns['column_names']; + $columns_sort = $info_columns['columns_sort']; + + $tableId = 'dataMatrix_'.$this->dashboardId.'_'.$this->cellId; + // Load datatables user interface. + ui_print_datatable( + [ + 'id' => $tableId, + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'ajax_url' => 'include/ajax/module', + 'ajax_data' => [ + 'get_data_dataMatrix' => 1, + 'table_id' => $tableId, + 'period' => $this->values['period'], + 'slice' => $this->values['slice'], + 'formatData' => $this->values['formatData'], + 'modules' => json_encode($modules), + ], + 'default_pagination' => $this->values['limit'], + 'no_sortable_columns' => $columns_sort, + 'order' => [ + 'field' => 'date', + 'direction' => 'desc', + ], + 'csv' => 0, + ] + ); + } catch (\Exception $e) { + echo $e->getMessage(); + } + } else { + $output = ''; + $output .= '
'; + $output .= \ui_print_info_message( + __('Not found modules'), + '', + true + ); + $output .= '
'; + + return $output; + } + } + + + /** + * Get info modules. + * + * @param array $modules Modules. + * + * @return array Data. + */ + private function getInfoModules(array $modules): array + { + $where = sprintf( + 'tagente_modulo.id_agente_modulo IN (%s) + AND tagente_modulo.delete_pending = 0', + implode(',', $modules) + ); + + $sql = sprintf( + 'SELECT tagente_modulo.id_agente_modulo AS `id`, + tagente_modulo.nombre AS `name`, + tagente_modulo.unit AS `unit`, + tagente_modulo.min_warning AS w_min, + tagente_modulo.max_warning AS w_max, + tagente_modulo.str_warning AS w_str, + tagente_modulo.min_critical AS c_min, + tagente_modulo.max_critical AS c_max, + tagente_modulo.str_critical AS c_str, + tagente_modulo.id_tipo_modulo AS type_module, + tagente_estado.datos AS `data`, + tagente_estado.timestamp AS `timestamp`, + tagente_estado.estado AS `status`, + tagente.alias + FROM tagente_modulo + LEFT JOIN tagente_estado + ON tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo + LEFT JOIN tagente + ON tagente_modulo.id_agente = tagente.id_agente + WHERE %s', + $where + ); + + $modules = db_get_all_rows_sql($sql); + + if ($modules === false) { + $modules = []; + } + + return $modules; + } + + + /** + * Get columns. + * + * @param array $modules Info modules. + * + * @return array + */ + private function columns(array $modules) + { + $columns = []; + $columns[] = 'date'; + $column_names = []; + $column_names[] = __('Date'); + $columns_sort = []; + $columns_sort[] = 0; + foreach ($modules as $key => $module) { + $columns[] = 'Column-'.$module['id']; + // Module name. + $name = ''; + switch ($this->values['label']) { + case 'agent': + $name = $module['alias']; + break; + + case 'agent_module': + $name = $module['alias'].' / '.$module['name']; + break; + + default: + case 'module': + $name = $module['name']; + break; + } + + $columns_sort[] = ($key + 1); + $column_names[] = $name; + } + + $data = [ + 'columns' => $columns, + 'column_names' => $column_names, + 'columns_sort' => $columns_sort, + ]; + + return $data; + } + + + /** + * Get description. + * + * @return string. + */ + public static function getDescription() + { + return __('Data Matrix'); + } + + + /** + * Get Name. + * + * @return string. + */ + public static function getName() + { + return 'DataMatrix'; + } + + + /** + * Get size Modal Configuration. + * + * @return array + */ + public function getSizeModalConfiguration(): array + { + $size = [ + 'width' => (is_metaconsole() === true) ? 1000 : 900, + 'height' => 480, + ]; + + return $size; + } + + +} diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_icon.php b/pandora_console/include/lib/Dashboard/Widgets/module_icon.php index 3b1adc888b..5523a851ef 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/module_icon.php +++ b/pandora_console/include/lib/Dashboard/Widgets/module_icon.php @@ -555,7 +555,7 @@ class ModuleIconWidget extends Widget // Div value. $output .= '
'; $output .= remove_right_zeros( - number_format($data_module, $config['graph_precision']) + number_format($data_module, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']) ); $output .= '
'; diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_value.php b/pandora_console/include/lib/Dashboard/Widgets/module_value.php index 41fdd41663..6577ad3c89 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/module_value.php +++ b/pandora_console/include/lib/Dashboard/Widgets/module_value.php @@ -439,7 +439,9 @@ class ModuleValueWidget extends Widget $dataDatos = remove_right_zeros( number_format( $data_module, - $config['graph_precision'] + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] ) ); } else { diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php index 27b400db97..50fca70543 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php @@ -397,10 +397,12 @@ final class Group extends Item string $groupName, array $agentStats ): string { - $critical = \number_format($agentStats['critical'], 2).'%'; - $warning = \number_format($agentStats['warning'], 2).'%'; - $normal = \number_format($agentStats['normal'], 2).'%'; - $unknown = \number_format($agentStats['unknown'], 2).'%'; + global $config; + + $critical = \number_format($agentStats['critical'], 2, $config['decimal_separator'], $config['thousand_separator']).'%'; + $warning = \number_format($agentStats['warning'], 2, $config['decimal_separator'], $config['thousand_separator']).'%'; + $normal = \number_format($agentStats['normal'], 2, $config['decimal_separator'], $config['thousand_separator']).'%'; + $unknown = \number_format($agentStats['unknown'], 2, $config['decimal_separator'], $config['thousand_separator']).'%'; $html = '
'; $html .= '
'; diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php index 19e14f3456..657f73364d 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Percentile.php @@ -396,8 +396,8 @@ final class Percentile extends Item $data['value'] = (float) \number_format( (float) $moduleValue, (int) $config['graph_precision'], - '.', - '' + $config['decimal_separator'], + $config['thousand_separator'] ); $unit = ''; if ($moduleId !== null && $moduleId !== 0) { diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php index adeaa9c29e..4eb1ba3abc 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php @@ -281,7 +281,7 @@ final class StaticGraph extends Item ) { if (\is_numeric($value)) { $imgTitle .= __('Last value: ').\remove_right_zeros( - \number_format((float) $value, (int) $config['graph_precision']) + \number_format((float) $value, (int) $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']) ); } else { $imgTitle .= __('Last value: ').$value; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 3db9e7f4ab..625aabeeef 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -9156,3 +9156,16 @@ div#err_msg_centralised { .tag-editor .tag-editor-delete:hover i:before { color: #ccc !important; } + +.snmp-td { + padding: 0 !important; + height: 0; +} + +.snmp-div { + height: 100%; + display: flex; + align-items: center; + justify-content: start; + padding-left: 10px; +} diff --git a/pandora_console/install.php b/pandora_console/install.php index 771a41889c..4f7896b112 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
z_dash)) { - $array_filter->z_dash = number_format($scale, 2); + $array_filter->z_dash = number_format( + $scale, + 2, + $config['decimal_separator'], + $config['thousand_separator'] + ); } $filter = json_encode($array_filter); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 320282e403..b0c7c3eba1 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1589,7 +1589,7 @@ if (!empty($result)) { if (is_numeric($row['datos'])) { $data[6] = ui_print_status_image( STATUS_MODULE_OK, - __('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])), + __('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])), true ); } else { @@ -1604,7 +1604,12 @@ if (!empty($result)) { $data[6] = ui_print_status_image( STATUS_MODULE_CRITICAL, __('CRITICAL').': '.remove_right_zeros( - number_format($row['datos'], $config['graph_precision']) + number_format( + $row['datos'], + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] + ) ), true ); @@ -1620,7 +1625,12 @@ if (!empty($result)) { $data[6] = ui_print_status_image( STATUS_MODULE_WARNING, __('WARNING').': '.remove_right_zeros( - number_format($row['datos'], $config['graph_precision']) + number_format( + $row['datos'], + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] + ) ), true ); @@ -1636,7 +1646,12 @@ if (!empty($result)) { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, __('UNKNOWN').': '.remove_right_zeros( - number_format($row['datos'], $config['graph_precision']) + number_format( + $row['datos'], + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] + ) ), true ); @@ -1652,7 +1667,12 @@ if (!empty($result)) { $data[6] = ui_print_status_image( STATUS_MODULE_NO_DATA, __('NO DATA').': '.remove_right_zeros( - number_format($row['datos'], $config['graph_precision']) + number_format( + $row['datos'], + $config['graph_precision'], + $config['decimal_separator'], + $config['thousand_separator'] + ) ), true ); @@ -1672,7 +1692,7 @@ if (!empty($result)) { if (is_numeric($row['datos'])) { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])), + __('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])), true ); } else { @@ -1688,7 +1708,7 @@ if (!empty($result)) { if (is_numeric($row['datos'])) { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])), + __('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])), true ); } else { @@ -1704,7 +1724,7 @@ if (!empty($result)) { if (is_numeric($row['datos'])) { $data[6] = ui_print_status_image( STATUS_MODULE_UNKNOWN, - __('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])), + __('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])), true ); } else { @@ -1849,12 +1869,12 @@ if (!empty($result)) { if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') { $salida = human_milliseconds_to_string($row['datos']); } else { - $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } break; default: - $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); break; } break; @@ -1866,12 +1886,12 @@ if (!empty($result)) { if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') { $salida = human_milliseconds_to_string($row['datos']); } else { - $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); } break; default: - $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'])); + $salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])); break; } } diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php index 9951ec528e..650bda0c36 100644 --- a/pandora_console/operation/search_results.php +++ b/pandora_console/operation/search_results.php @@ -18,7 +18,8 @@ require_once $config['homedir'].'/include/functions_reporting.php'; enterprise_include('operation/reporting/custom_reporting.php'); $searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0, 'AR'); -$searchUsers = $searchPolicies = (check_acl($config['id_user'], 0, 'AR') && enterprise_installed()); +$searchUsers = (check_acl($config['id_user'], 0, 'AR')); +$searchPolicies = (check_acl($config['id_user'], 0, 'AR') && enterprise_installed()); $searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'RR'); $searchMaps = check_acl($config['id_user'], 0, 'VR'); $searchMain = true; diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index e3880e2593..9f0f9e44f8 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -14,7 +14,7 @@ * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * * ============================================================================ - * Copyright (c) 2005-2021 Artica Soluciones Tecnologicas + * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas * Please see http://pandorafms.org for full contribution list * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -26,1340 +26,65 @@ * ============================================================================ */ +// Begin. global $config; -enterprise_include('operation/snmpconsole/snmp_view.php'); -enterprise_include('include/functions_snmp.php'); -require_once 'include/functions_agents.php'; -require_once 'include/functions_snmp.php'; -ui_require_css_file('snmp_view'); +require_once $config['homedir'].'/include/class/SnmpConsole.class.php'; -check_login(); -$agent_a = check_acl($config['id_user'], 0, 'AR'); -$agent_w = check_acl($config['id_user'], 0, 'AW'); -$access = ($agent_a == true) ? 'AR' : (($agent_w == true) ? 'AW' : 'AR'); -if (!$agent_a && !$agent_w) { - db_pandora_audit( - AUDIT_LOG_ACL_VIOLATION, - 'Trying to access SNMP Console' +$ajaxPage = $config['homedir'].'/operation/snmpconsole/snmp_view'; + +$filter_alert = get_parameter('filter_alert', -1); +$filter_severity = get_parameter('filter_severity', -1); +$filter_free_search = get_parameter('filter_free_search', ''); +$filter_status = get_parameter('filter_status', 0); +$filter_group_by = get_parameter('filter_group_by', 0); +$filter_hours_ago = get_parameter('filter_hours_ago', 8); +$filter_trap_type = get_parameter('filter_trap_type', -1); +$refr = get_parameter('refr', 300); + +// Control call flow. +try { + // User access and validation is being processed on class constructor. + $controller = new SnmpConsole( + $ajaxPage, + $filter_alert, + $filter_severity, + $filter_free_search, + $filter_status, + $filter_group_by, + $filter_hours_ago, + $filter_trap_type, + $refr ); - include 'general/noaccess.php'; - exit; -} - -// Read parameters. -$filter_severity = (int) get_parameter('filter_severity', -1); -$filter_fired = (int) get_parameter('filter_fired', -1); -$filter_status = (int) get_parameter('filter_status', 0); -$free_search_string = (string) get_parameter('free_search_string', ''); -$pagination = (int) get_parameter('pagination', $config['block_size']); -$offset = (int) get_parameter('offset', 0); -$pure = (int) get_parameter('pure', 0); -$trap_type = (int) get_parameter('trap_type', -1); -$group_by = (int) get_parameter('group_by', 0); -$refr = (int) get_parameter('refresh'); -$default_refr = !empty($refr) ? $refr : $config['vc_refr']; -$hours_ago = get_parameter('hours_ago', 8); - -// Build ranges. -$now = new DateTime(); -$ago = new DateTime(); -$interval = new DateInterval(sprintf('PT%dH', $hours_ago)); -$ago->sub($interval); - -$date_from_trap = $ago->format('Y/m/d'); -$date_to_trap = $now->format('Y/m/d'); -$time_from_trap = $ago->format('H:i:s'); -$time_to_trap = $now->format('H:i:s'); - -$user_groups = users_get_groups($config['id_user'], $access, false); - -$str_user_groups = ''; -$i = 0; -foreach ($user_groups as $id => $name) { - if ($i == 0) { - $str_user_groups .= $id; +} catch (Exception $e) { + if ((bool) is_ajax() === true) { + echo json_encode(['error' => '[SnmpConsole]'.$e->getMessage() ]); + exit; } else { - $str_user_groups .= ','.$id; - } - - $i++; -} - -$url = 'index.php?sec=estado&sec2=operation/snmpconsole/snmp_view'; -$url .= '&filter_severity='.$filter_severity.'&filter_fired='.$filter_fired; -$url .= '&free_search_string='.$free_search_string.'&pagination='.$pagination; -$url .= '&offset='.$offset.'&trap_type='.$trap_type.'&group_by='.$group_by; -$url .= '&hours_ago='.$hours_ago.'&pure='.$pure; - -$statistics['text'] = ''.html_print_image( - 'images/op_reporting.png', - true, - [ - 'title' => __('Statistics'), - 'class' => 'invert_filter', - ] -).''; -$list['text'] = ''.html_print_image( - 'images/op_snmp.png', - true, - [ - 'title' => __('List'), - 'class' => 'invert_filter', - ] -).''; -$list['active'] = true; - -if ($config['pure']) { - $fullscreen['text'] = ''.html_print_image( - 'images/normal_screen.png', - true, - [ - 'title' => __('Normal screen'), - 'class' => 'invert_filter', - ] - ).''; -} else { - // Fullscreen. - $fullscreen['text'] = ''.html_print_image( - 'images/full_screen.png', - true, - [ - 'title' => __('Full screen'), - 'class' => 'invert_filter', - ] - ).''; -} - - -// OPERATIONS -// Delete SNMP Trap entry Event. -if (isset($_GET['delete'])) { - $id_trap = (int) get_parameter_get('delete', 0); - if ($id_trap > 0) { - if ($group_by) { - $sql_ids_traps = 'SELECT id_trap, source FROM ttrap WHERE oid IN (SELECT oid FROM ttrap WHERE id_trap = '.$id_trap.') - AND source IN (SELECT source FROM ttrap WHERE id_trap = '.$id_trap.')'; - $ids_traps = db_get_all_rows_sql($sql_ids_traps); - - foreach ($ids_traps as $key => $value) { - $result = db_process_sql_delete('ttrap', ['id_trap' => $value['id_trap']]); - enterprise_hook('snmp_update_forwarded_modules', [$value]); - } - } else { - $forward_info = db_get_row('ttrap', 'id_trap', $id_trap); - $result = db_process_sql_delete('ttrap', ['id_trap' => $id_trap]); - enterprise_hook('snmp_update_forwarded_modules', [$forward_info]); - ui_print_result_message( - $result, - __('Successfully deleted'), - __('Could not be deleted') - ); - } - } -} - -// Check Event. -if (isset($_GET['check'])) { - $id_trap = (int) get_parameter_get('check', 0); - $values = [ - 'status' => 1, - 'id_usuario' => $config['id_user'], - ]; - $result = db_process_sql_update('ttrap', $values, ['id_trap' => $id_trap]); - enterprise_hook('snmp_update_forwarded_modules', [$id_trap]); - - ui_print_result_message( - $result, - __('Successfully updated'), - __('Could not be updated') - ); -} - -// Mass-process DELETE. -if (isset($_POST['deletebt'])) { - $trap_ids = get_parameter_post('snmptrapid', []); - if (is_array($trap_ids)) { - if ($group_by) { - foreach ($trap_ids as $key => $value) { - $sql_ids_traps = 'SELECT id_trap, source FROM ttrap WHERE oid IN (SELECT oid FROM ttrap WHERE id_trap = '.$value.') - AND source IN (SELECT source FROM ttrap WHERE id_trap = '.$value.')'; - $ids_traps = db_get_all_rows_sql($sql_ids_traps); - - foreach ($ids_traps as $key2 => $value2) { - $result = db_process_sql_delete('ttrap', ['id_trap' => $value2['id_trap']]); - enterprise_hook('snmp_update_forwarded_modules', [$value2]); - } - } - } else { - foreach ($trap_ids as $id_trap) { - $forward_info = db_get_row('ttrap', 'id_trap', $id_trap); - db_process_sql_delete('ttrap', ['id_trap' => $id_trap]); - enterprise_hook('snmp_update_forwarded_modules', [$forward_info]); - } - } - } -} - -// Mass-process UPDATE. -if (isset($_POST['updatebt'])) { - $trap_ids = get_parameter_post('snmptrapid', []); - if (is_array($trap_ids)) { - foreach ($trap_ids as $id_trap) { - $sql = sprintf("UPDATE ttrap SET status = 1, id_usuario = '%s' WHERE id_trap = %d", $config['id_user'], $id_trap); - db_process_sql($sql); - enterprise_hook('snmp_update_forwarded_modules', [$id_trap]); - } - } -} - -// All traps. -$all_traps = db_get_all_rows_sql('SELECT DISTINCT source FROM ttrap'); - -if (empty($all_traps)) { - $all_traps = []; -} - -// Set filters. -$agents = []; -$oids = []; -$severities = get_priorities(); -$alerted = [ - __('Not fired'), - __('Fired'), -]; -foreach ($all_traps as $trap) { - $agent = agents_get_agent_with_ip($trap['source']); - $agents[$trap['source']] = $agent !== false ? ($agent['alias'] ? $agent['alias'] : $agent['nombre']) : $trap['source']; - $oid = enterprise_hook('get_oid', [$trap]); - if ($oid === ENTERPRISE_NOT_HOOK) { - $oid = $trap['oid']; - } - - $oids[$oid] = $oid; -} - -$prea = array_keys($user_groups); -$ids = join(',', $prea); -// Cuantos usuarios hay operadores con un grupo que exista y no lo tenga ningun usuario. -$user_in_group_wo_agents = db_get_value_sql('select count(DISTINCT(id_usuario)) from tusuario_perfil where id_usuario ="'.$config['id_user'].'" and id_perfil = 1 and id_grupo in (select id_grupo from tgrupo where id_grupo in ('.$ids.') and id_grupo not in (select id_grupo from tagente))'); - -switch ($config['dbtype']) { - case 'mysql': - case 'postgresql': - if ($user_in_group_wo_agents == 0) { - $rows = db_get_all_rows_filter( - 'tagente', - ['id_grupo' => array_keys($user_groups)], - ['id_agente'] - ); - $id_agents = []; - foreach ($rows as $row) { - $id_agents[] = $row['id_agente']; - } - - if (!empty($id_agents)) { - $address_by_user_groups = agents_get_addresses($id_agents); - foreach ($address_by_user_groups as $i => $a) { - $address_by_user_groups[$i] = '"'.$a.'"'; - } - } - } else { - $rows = db_get_all_rows_filter( - 'tagente', - [], - ['id_agente'] - ); - $id_agents = []; - foreach ($rows as $row) { - $id_agents[] = $row['id_agente']; - } - - $all_address_agents = agents_get_addresses($id_agents); - foreach ($all_address_agents as $i => $a) { - $all_address_agents[$i] = '"'.$a.'"'; - } - } - break; - - default: - // Default. - break; -} - -if (empty($address_by_user_groups)) { - $address_by_user_groups = []; - array_unshift($address_by_user_groups, '""'); -} - -if (empty($all_address_agents)) { - $all_address_agents = []; - array_unshift($all_address_agents, '""'); -} - - -// Make query to extract traps of DB. -switch ($config['dbtype']) { - case 'mysql': - $sql = 'SELECT * - FROM ttrap - WHERE ( - `source` IN ('.implode(',', $address_by_user_groups).") OR - `source`='' OR - `source` NOT IN (".implode(',', $all_address_agents).') - ) - %s - ORDER BY timestamp DESC - LIMIT %d,%d'; - break; - - case 'postgresql': - $sql = 'SELECT * - FROM ttrap - WHERE ( - source IN ('.implode(',', $address_by_user_groups).") OR - source='' OR - source NOT IN (".implode(',', $all_address_agents).') - ) - %s - ORDER BY timestamp DESC - LIMIT %d OFFSET %d'; - break; - - case 'oracle': - $sql = "SELECT * - FROM ttrap - WHERE (source IN ( - SELECT direccion FROM tagente - WHERE id_grupo IN ($str_user_groups) - ) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL)) %s - ORDER BY timestamp DESC"; - break; - - default: - // Default. - break; -} - -switch ($config['dbtype']) { - case 'mysql': - case 'postgresql': - $sql_all = 'SELECT * - FROM ttrap - WHERE ( - source IN ('.implode(',', $address_by_user_groups).") OR - source='' OR - source NOT IN (".implode(',', $all_address_agents).') - ) - %s - ORDER BY timestamp DESC'; - $sql_count = 'SELECT COUNT(id_trap) - FROM ttrap - WHERE ( - source IN ('.implode(',', $address_by_user_groups).") OR - source='' OR - source NOT IN (".implode(',', $all_address_agents).') - ) - %s'; - break; - - case 'oracle': - $sql_all = "SELECT * - FROM ttrap - WHERE (source IN ( - SELECT direccion FROM tagente - WHERE id_grupo IN ($str_user_groups) - ) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL)) - %s - ORDER BY timestamp DESC"; - $sql_count = "SELECT COUNT(id_trap) - FROM ttrap - WHERE ( - source IN ( - SELECT direccion FROM tagente - WHERE id_grupo IN ($str_user_groups) - ) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL)) - %s"; - break; - - default: - // Default. - break; -} - -// $whereSubquery = 'WHERE 1=1'; -$whereSubquery = ''; - -if ($filter_fired != -1) { - $whereSubquery .= ' AND alerted = '.$filter_fired; -} - -if ($free_search_string != '') { - switch ($config['dbtype']) { - case 'mysql': - $whereSubquery .= ' - AND (source LIKE "%'.$free_search_string.'%" OR - oid LIKE "%'.$free_search_string.'%" OR - oid_custom LIKE "%'.$free_search_string.'%" OR - type_custom LIKE "%'.$free_search_string.'%" OR - value LIKE "%'.$free_search_string.'%" OR - value_custom LIKE "%'.$free_search_string.'%" OR - id_usuario LIKE "%'.$free_search_string.'%" OR - text LIKE "%'.$free_search_string.'%" OR - description LIKE "%'.$free_search_string.'%")'; - break; - - case 'postgresql': - case 'oracle': - $whereSubquery .= ' - AND (source LIKE \'%'.$free_search_string.'%\' OR - oid LIKE \'%'.$free_search_string.'%\' OR - oid_custom LIKE \'%'.$free_search_string.'%\' OR - type_custom LIKE \'%'.$free_search_string.'%\' OR - value LIKE \'%'.$free_search_string.'%\' OR - value_custom LIKE \'%'.$free_search_string.'%\' OR - id_usuario LIKE \'%'.$free_search_string.'%\' OR - text LIKE \'%'.$free_search_string.'%\' OR - description LIKE \'%'.$free_search_string.'%\')'; - break; - - default: - // Default. - break; - } -} - -if ($date_from_trap != '') { - if ($time_from_trap != '') { - $whereSubquery .= ' - AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' '.$time_from_trap.'")) - '; - } else { - $whereSubquery .= ' - AND (UNIX_TIMESTAMP(timestamp) > UNIX_TIMESTAMP("'.$date_from_trap.' 23:59:59")) - '; - } -} - -if ($date_to_trap != '') { - if ($time_to_trap) { - $whereSubquery .= ' - AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' '.$time_to_trap.'")) - '; - } else { - $whereSubquery .= ' - AND (UNIX_TIMESTAMP(timestamp) < UNIX_TIMESTAMP("'.$date_to_trap.' 23:59:59")) - '; - } -} - -if ($filter_severity != -1) { - // There are two special severity values aimed to match two different trap standard severities in database: warning/critical and critical/normal. - if ($filter_severity != EVENT_CRIT_OR_NORMAL && $filter_severity != EVENT_CRIT_WARNING_OR_CRITICAL) { - // Test if enterprise is installed to search oid in text or oid field in ttrap. - if ($config['enterprise_installed']) { - $whereSubquery .= ' AND ( - (alerted = 0 AND severity = '.$filter_severity.') OR - (alerted = 1 AND priority = '.$filter_severity.'))'; - } else { - $whereSubquery .= ' AND ( - (alerted = 0 AND 1 = '.$filter_severity.') OR - (alerted = 1 AND priority = '.$filter_severity.'))'; - } - } else if ($filter_severity === EVENT_CRIT_WARNING_OR_CRITICAL) { - // Test if enterprise is installed to search oid in text or oid field in ttrap. - if ($config['enterprise_installed']) { - $whereSubquery .= ' AND ( - (alerted = 0 AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR - (alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; - } else { - $whereSubquery .= ' AND ( - (alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; - } - } else if ($filter_severity === EVENT_CRIT_OR_NORMAL) { - // Test if enterprise is installed to search oid in text or oid field in ttrap. - if ($config['enterprise_installed']) { - $whereSubquery .= ' AND ( - (alerted = 0 AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR - (alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; - } else { - $whereSubquery .= ' AND ( - (alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))'; - } - } -} - -if ($filter_status != -1) { - $whereSubquery .= ' AND status = '.$filter_status; -} - -if ($trap_type == 5) { - $whereSubquery .= ' AND type NOT IN (0, 1, 2, 3, 4)'; -} else if ($trap_type != -1) { - $whereSubquery .= ' AND type = '.$trap_type; -} - -// Disable this feature (time will decide if temporarily) in Oracle cause the group by is very confictive. -if ($group_by && $config['dbtype'] != 'oracle') { - $where_without_group = $whereSubquery; - $whereSubquery .= ' GROUP BY source,oid'; -} - -switch ($config['dbtype']) { - case 'mysql': - $sql = sprintf($sql, $whereSubquery, $offset, $pagination); - break; - - case 'postgresql': - $sql = sprintf($sql, $whereSubquery, $pagination, $offset); - break; - - case 'oracle': - $set = []; - $set['limit'] = $pagination; - $set['offset'] = $offset; - $sql = sprintf($sql, $whereSubquery); - $sql = oracle_recode_query($sql, $set); - break; - - default: - // Default. - break; -} - -$sql_all = sprintf($sql_all, $whereSubquery); -$sql_count = sprintf($sql_count, $whereSubquery); - -$table = new stdClass(); -$table->width = '100%'; -$table->cellpadding = 0; -$table->cellspacing = 0; -$table->class = 'databox filters'; -$table->size = []; -$table->size[0] = '120px'; -$table->data = []; - -// Alert status select. -$table->data[1][0] = ''.__('Alert').''; -$table->data[1][1] = html_print_select( - $alerted, - 'filter_fired', - $filter_fired, - '', - __('All'), - '-1', - true -); - -// Block size for pagination select. -$table->data[2][0] = ''.__('Block size for pagination').''; -$paginations[25] = 25; -$paginations[50] = 50; -$paginations[100] = 100; -$paginations[200] = 200; -$paginations[500] = 500; -$table->data[2][1] = html_print_select( - $paginations, - 'pagination', - $pagination, - '', - __('Default'), - $config['block_size'], - true -); - -// Severity select. -$table->data[1][2] = ''.__('Severity').''; -$table->data[1][3] = html_print_select( - $severities, - 'filter_severity', - $filter_severity, - '', - __('All'), - -1, - true -); - -// Status. -$table->data[3][0] = ''.__('Status').''; - -$status_array[-1] = __('All'); -$status_array[0] = __('Not validated'); -$status_array[1] = __('Validated'); -$table->data[3][1] = html_print_select( - $status_array, - 'filter_status', - $filter_status, - '', - '', - '', - true -); - -// Free search (search by all alphanumeric fields). -$table->data[2][3] = ''.__('Free search').''.ui_print_help_tip( - __( - 'Search by any alphanumeric field in the trap. - REMEMBER trap sources need to be searched by IP Address' - ), - true -); -$table->data[2][4] = html_print_input_text( - 'free_search_string', - $free_search_string, - '', - 40, - 0, - true -); - -$table->data[4][0] = ''.__('Max. hours old').''; -$table->data[4][1] = html_print_input( - [ - 'type' => 'number', - 'name' => 'hours_ago', - 'value' => $hours_ago, - 'step' => 1, - 'return' => true, - ] -); - -// Type filter (ColdStart, WarmStart, LinkDown, LinkUp, authenticationFailure, Other). -$table->data[4][3] = ''.__('Trap type').''.ui_print_help_tip(__('Search by trap type'), true); -$trap_types = [ - -1 => __('None'), - 0 => __('Cold start (0)'), - 1 => __('Warm start (1)'), - 2 => __('Link down (2)'), - 3 => __('Link up (3)'), - 4 => __('Authentication failure (4)'), - 5 => __('Other'), -]; -$table->data[4][4] = html_print_select( - $trap_types, - 'trap_type', - $trap_type, - '', - '', - '', - true, - false, - false -); - -// Disable this feature (time will decide if temporarily) in Oracle cause the group by is very confictive. -if ($config['dbtype'] != 'oracle') { - $table->data[3][3] = ''.__('Group by Enterprise String/IP').''; - $table->data[3][4] = __('Yes').' '.html_print_radio_button('group_by', 1, '', $group_by, true).'  '; - $table->data[3][4] .= __('No').' '.html_print_radio_button('group_by', 0, '', $group_by, true); -} - -$filter = '
'; -$filter .= html_print_table($table, true); -$filter .= '
'; -$filter .= html_print_submit_button(__('Update'), 'search', false, 'class="sub upd"', true); -$filter .= '
'; -$filter .= '
'; - -$filter_resume = []; -$filter_resume['filter_fired'] = $alerted[$filter_fired]; -$filter_resume['filter_severity'] = $severities[$filter_severity]; -$filter_resume['pagination'] = $paginations[$pagination]; -$filter_resume['free_search_string'] = $free_search_string; -$filter_resume['filter_status'] = $status_array[$filter_status]; -$filter_resume['group_by'] = $group_by; -$filter_resume['hours_ago'] = $hours_ago; -$filter_resume['trap_type'] = $trap_types[$trap_type]; - -$traps = db_get_all_rows_sql($sql, true); -$trapcount = (int) db_get_value_sql($sql_count, false, true); - -// Re-sort traps by timestamp if history db is enabled. -if ($config['history_db_enabled'] == 1) { - usort( - $traps, - function ($a, $b) { - return strtotime($a['timestamp']) < strtotime($b['timestamp']); - } - ); -} - -// No traps. -if (empty($traps)) { - // Header - ui_print_standard_header( - __('SNMP Console'), - 'images/op_snmp.png', - false, - 'snmp_console', - false, - [ - $list, - $statistics, - ], - [ - [ - 'link' => '', - 'label' => __('Monitoring'), - ], - [ - 'link' => '', - 'label' => __('SNMP'), - ], - ] - ); - - $sql2 = 'SELECT * - FROM ttrap - WHERE ( - `source` IN ('.implode(',', $address_by_user_groups).") OR - `source`='' OR - `source` NOT IN (".implode(',', $all_address_agents).') - ) - AND status = 0 - ORDER BY timestamp DESC'; - $traps2 = db_get_all_rows_sql($sql2); - - if (!empty($traps2)) { - ui_toggle($filter, __('Toggle filter(s)')); - - print_snmp_tags_active_filters($filter_resume); - - ui_print_info_message(['no_close' => true, 'message' => __('There are no SNMP traps in database that contains this filter') ]); - } else { - ui_print_info_message(['no_close' => true, 'message' => __('There are no SNMP traps in database') ]); + echo '[SnmpConsole]'.$e->getMessage(); } + // Stop this execution, but continue 'globally'. return; -} else { - if ($config['pure']) { - echo '
'; +} - echo ''; - - echo '
'; - - ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/'); - ui_require_css_file('pandora_dashboard', ENTERPRISE_DIR.'/include/styles/'); - ui_require_css_file('cluetip', 'include/styles/js/'); - - ui_require_jquery_file('countdown'); - ui_require_javascript_file('pandora_dashboard', ENTERPRISE_DIR.'/include/javascript/'); - ui_require_javascript_file('wz_jsgraphics'); - ui_require_javascript_file('pandora_visual_console'); + if (method_exists($controller, $method) === true) { + if ($controller->ajaxMethod($method) === true) { + $controller->{$method}(); + } else { + $controller->error('Unavailable method.'); + } } else { - // Header - ui_print_standard_header( - __('SNMP Console'), - 'images/op_snmp.png', - false, - '', - false, - [ - $fullscreen, - $list, - $statistics, - ], - [ - [ - 'link' => '', - 'label' => __('Monitoring'), - ], - [ - 'link' => '', - 'label' => __('SNMP'), - ], - ] - ); + $controller->error('Method not found. ['.$method.']'); } -} -ui_toggle($filter, __('Toggle filter(s)')); -unset($table); - -print_snmp_tags_active_filters($filter_resume); - -if (($config['dbtype'] == 'oracle') && ($traps !== false)) { - $traps_size = count($traps); - for ($i = 0; $i < $traps_size; $i++) { - unset($traps[$i]['rnum']); - } -} - -$url_snmp = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view'; -$url_snmp .= '&filter_severity='.$filter_severity.'&filter_fired='.$filter_fired; -$url_snmp .= '&filter_status='.$filter_status.'&refresh='.((int) get_parameter('refresh', 0)); -$url_snmp .= '&pure='.$config['pure'].'&trap_type='.$trap_type; -$url_snmp .= '&group_by='.$group_by.'&free_search_string='.$free_search_string; -$url_snmp .= '&hours_ago='.$hours_ago; - -$urlPagination = $url_snmp.'&pagination='.$pagination.'&offset='.$offset; - -ui_pagination($trapcount, $urlPagination, $offset, $pagination); - -echo '
'; - -$table = new StdClass(); -$table->cellpadding = 0; -$table->cellspacing = 0; -$table->width = '100%'; -$table->class = 'databox data'; -$table->head = []; -$table->size = []; -$table->data = []; -$table->align = []; -$table->headstyle = []; - -$table->head[0] = __('Status'); -$table->align[0] = 'center'; -$table->size[0] = '5%'; -$table->headstyle[0] = 'text-align: center'; - -$table->head[1] = __('SNMP Agent'); -$table->align[1] = 'center'; -$table->size[1] = '15%'; -$table->headstyle[1] = 'text-align: center'; - -$table->head[2] = __('Enterprise String'); -$table->align[2] = 'center'; -$table->size[2] = '18%'; -$table->headstyle[2] = 'text-align: center'; - -if ($group_by) { - $table->head[3] = __('Count'); - $table->align[3] = 'center'; - $table->size[3] = '5%'; - $table->headstyle[3] = 'text-align: center'; -} - -$table->head[4] = __('Trap subtype'); -$table->align[4] = 'center'; -$table->size[4] = '10%'; -$table->headstyle[4] = 'text-align: center'; - -$table->head[5] = __('User ID'); -$table->align[5] = 'center'; -$table->size[5] = '10%'; -$table->headstyle[5] = 'text-align: center'; - -$table->head[6] = __('Timestamp'); -$table->align[6] = 'center'; -$table->size[6] = '10%'; -$table->headstyle[6] = 'text-align: center'; - -$table->head[7] = __('Alert'); -$table->align[7] = 'center'; -$table->size[7] = '5%'; -$table->headstyle[7] = 'text-align: center'; - -$table->head[8] = __('Action'); -$table->align[8] = 'center'; -$table->size[8] = '10%'; -$table->headstyle[8] = 'min-width: 125px;text-align: center'; - -$table->head[9] = html_print_checkbox_extended( - 'allbox', - 1, - false, - false, - 'javascript:CheckAll();', - 'class="chk" title="'.__('All').'"', - true -); -$table->align[9] = 'center'; -$table->size[9] = '5%'; -$table->headstyle[9] = 'text-align: center'; - -$table->style[8] = 'background: #F3F3F3; color: #111 !important;'; - -// Skip offset records. -$idx = 0; -if ($traps !== false) { - foreach ($traps as $trap) { - $data = []; - if (empty($trap['description'])) { - $trap['description'] = ''; - } - - $severity = enterprise_hook('get_severity', [$trap]); - if ($severity === ENTERPRISE_NOT_HOOK) { - $severity = $trap['alerted'] == 1 ? $trap['priority'] : 1; - } - - // Status. - if ($trap['status'] == 0) { - $data[0] = html_print_image( - 'images/pixel_red.png', - true, - [ - 'title' => __('Not validated'), - 'width' => '20', - 'height' => '20', - ] - ); - } else { - $data[0] = html_print_image( - 'images/pixel_green.png', - true, - [ - 'title' => __('Validated'), - 'width' => '20', - 'height' => '20', - ] - ); - } - - // Agent matching source address. - $table->cellclass[$idx][1] = get_priority_class($severity); - $agent = agents_get_agent_with_ip($trap['source']); - if ($agent === false) { - if (! check_acl($config['id_user'], 0, 'AR')) { - continue; - } - - $data[1] = ''.$trap['source'].''; - } else { - if (! check_acl($config['id_user'], $agent['id_grupo'], 'AR')) { - continue; - } - - $data[1] = ''; - $data[1] .= ''.$agent['alias'].ui_print_help_tip($trap['source'], true, 'images/tip-blanco.png'); - ''; - } - - // OID. - $table->cellclass[$idx][2] = get_priority_class($severity); - if (! empty($trap['text'])) { - $enterprise_string = $trap['text']; - } else if (! empty($trap['oid'])) { - $enterprise_string = $trap['oid']; - } else { - $enterprise_string = __('N/A'); - } - - $data[2] = ''.$enterprise_string.''; - - // Count. - if ($group_by) { - $sql = "SELECT * FROM ttrap WHERE 1=1 - $where_without_group - AND oid='".$trap['oid']."' - AND source='".$trap['source']."'"; - $group_traps = db_get_all_rows_sql($sql); - $count_group_traps = count($group_traps); - $table->cellclass[$idx][3] = get_priority_class($severity); - $data[3] = ''.$count_group_traps.''; - } - - // Value. - $table->cellclass[$idx][4] = get_priority_class($severity); - if (empty($trap['value'])) { - $data[4] = __('N/A'); - } else { - $data[4] = ui_print_truncate_text($trap['value'], GENERIC_SIZE_TEXT, false); - } - - // User. - $table->cellclass[$idx][5] = get_priority_class($severity); - if (!empty($trap['status'])) { - $data[5] = ''.substr($trap['id_usuario'], 0, 8).''; - if (!empty($trap['id_usuario'])) { - $data[5] .= ui_print_help_tip(get_user_fullname($trap['id_usuario']), true); - } - } else { - $data[5] = '--'; - } - - // Timestamp. - $table->cellclass[$idx][6] = get_priority_class($severity); - $data[6] = ''; - $data[6] .= ui_print_timestamp($trap['timestamp'], true); - $data[6] .= ''; - - // Use alert severity if fired. - if (!empty($trap['alerted'])) { - $data[7] = html_print_image('images/pixel_yellow.png', true, ['width' => '20', 'height' => '20', 'border' => '0', 'title' => __('Alert fired')]); - } else { - $data[7] = html_print_image('images/pixel_gray.png', true, ['width' => '20', 'height' => '20', 'border' => '0', 'title' => __('Alert not fired')]); - } - - // Actions. - $data[8] = ''; - - if (empty($trap['status'])) { - $data[8] .= ''.html_print_image('images/ok.png', true, ['border' => '0', 'title' => __('Validate')]).' '; - } - - if ($trap['source'] == '') { - $is_admin = db_get_value('is_admin', 'tusuario', 'id_user', $config['id_user']); - if ($is_admin) { - $data[8] .= ''.html_print_image( - 'images/cross.png', - true, - [ - 'border' => '0', - 'title' => __('Delete'), - 'class' => 'invert_filter', - ] - ).' '; - } - } else { - $agent_trap_group = db_get_value('id_grupo', 'tagente', 'nombre', $trap['source']); - - $data[8] .= ''.html_print_image( - 'images/cross.png', - true, - [ - 'border' => '0', - 'title' => __('Delete'), - 'class' => 'invert_filter', - ] - ).' '; - } - - $data[8] .= ''.html_print_image( - 'images/eye.png', - true, - [ - 'alt' => __('Show more'), - 'title' => __('Show more'), - 'class' => 'invert_filter', - ] - ).''; - $data[8] .= enterprise_hook('editor_link', [$trap]); - - - $data[9] = html_print_checkbox_extended('snmptrapid[]', $trap['id_trap'], false, false, '', 'class="chk"', true); - - array_push($table->data, $data); - - // Hiden file for description. - $string = ' - - - - - - - - '; - - if ($trap['description'] != '') { - $string .= ' - - - '; - } - - if ($trap['type'] != '') { - $trap_types = [ - -1 => __('None'), - 0 => __('Cold start (0)'), - 1 => __('Warm start (1)'), - 2 => __('Link down (2)'), - 3 => __('Link up (3)'), - 4 => __('Authentication failure (4)'), - 5 => __('Other'), - ]; - - switch ($trap['type']) { - case -1: - $desc_trap_type = __('None'); - break; - - case 0: - $desc_trap_type = __('Cold start (0)'); - break; - - case 1: - $desc_trap_type = __('Warm start (1)'); - break; - - case 2: - $desc_trap_type = __('Link down (2)'); - break; - - case 3: - $desc_trap_type = __('Link up (3)'); - break; - - case 4: - $desc_trap_type = __('Authentication failure (4)'); - break; - - default: - $desc_trap_type = __('Other'); - break; - } - - $string .= ''; - } - - if ($group_by) { - $sql = "SELECT * FROM ttrap WHERE 1=1 - $where_without_group - AND oid='".$trap['oid']."' - AND source='".$trap['source']."'"; - $group_traps = db_get_all_rows_sql($sql); - $count_group_traps = count($group_traps); - - $sql = "SELECT timestamp FROM ttrap WHERE 1=1 - $where_without_group - AND oid='".$trap['oid']."' - AND source='".$trap['source']."' - ORDER BY `timestamp` DESC"; - $last_trap = db_get_value_sql($sql); - - $sql = "SELECT timestamp FROM ttrap WHERE 1=1 - $where_without_group - AND oid='".$trap['oid']."' - AND source='".$trap['source']."' - ORDER BY `timestamp` ASC"; - $first_trap = db_get_value_sql($sql); - - $string .= ' - - - '; - $string .= ' - - - '; - $string .= ' - - - '; - } - - $string .= '
'.''.__('Variable bindings:').''; - - if ($group_by) { - $new_url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view'; - $new_url .= '&filter_severity='.$filter_severity; - $new_url .= '&filter_fired='.$filter_fired; - $new_url .= '&filter_status='.$filter_status; - $new_url .= '&refresh='.((int) get_parameter('refresh', 0)); - $new_url .= '&pure='.$config['pure']; - $new_url .= '&group_by=0&free_search_string='.$free_search_string; - $new_url .= '&hours_ago='.$hours_ago; - - $string .= ''.__('See more details').''; - } else { - // Print binding vars separately. - $binding_vars = explode("\t", $trap['oid_custom']); - foreach ($binding_vars as $var) { - $string .= $var.'
'; - } - } - - $string .= '
'.''.__('Enterprise String:').' '.$trap['oid'].'
'.''.__('Description:').''.$trap['description'].'
'.__('Trap type:').''.$desc_trap_type.'
'.''.__('Count:').''.$count_group_traps.'
'.''.__('First trap:').''.$first_trap.'
'.''.__('Last trap:').''.$last_trap.'
'; - - $data = [$string]; - // $data = array($trap['description']); - $idx++; - $table->rowclass[$idx] = 'trap_info_'.$trap['id_trap']; - $table->colspan[$idx][0] = 10; - $table->rowstyle[$idx] = 'display: none;'; - array_push($table->data, $data); - - $idx++; - } -} - -// No matching traps. -if ($idx == 0) { - echo '
'.__('No matching traps found').'
'; + // Stop any execution. + exit; } else { - html_print_table($table); + // Run. + $controller->run(); } - -unset($table); - -echo '
'; - -html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"'); - -echo ' '; -html_print_submit_button(__('Delete'), 'deletebt', false, 'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"'); - -echo '
'; - - -echo '
'; -echo '

'.__('Status').'

'; -echo html_print_image( - 'images/pixel_green.png', - true, - [ - 'width' => '20', - 'height' => '20', - ] -).' - '.__('Validated'); -echo '
'; -echo html_print_image( - 'images/pixel_red.png', - true, - [ - 'width' => '20', - 'height' => '20', - ] -).' - '.__('Not validated'); -echo '
'; -echo '
'; -echo '

'.__('Alert').'

'; -echo html_print_image( - 'images/pixel_yellow.png', - true, - [ - 'width' => '20', - 'height' => '20', - ] -).' - '.__('Fired'); -echo '
'; -echo html_print_image( - 'images/pixel_gray.png', - true, - [ - 'width' => '20', - 'height' => '20', - ] -).' - '.__('Not fired'); -echo '
'; -echo '
'; -echo '

'.__('Action').'

'; -echo html_print_image('images/ok.png', true).' - '.__('Validate'); -echo '
'; -echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']).' - '.__('Delete'); -echo '
'; -echo '
'; -echo '

'.__('Legend').'

'; -foreach (get_priorities() as $num => $name) { - echo ''.$name.''; - echo '
'; -} - -echo '
'; -echo '
 
'; - -ui_include_time_picker(); -?> - - \ No newline at end of file diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index c1089a36b8..0ba6fb5755 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.767 -%define release 221213 +%define release 221220 # 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 445eb9bf39..44024ce062 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.767 -%define release 221213 +%define release 221220 # 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 8b201699ed..cbc9d77422 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.767 -%define release 221213 +%define release 221220 %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 c9f77702c0..cc7cea5dff 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1624,6 +1624,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` ( `ipam_ip_not_assigned_to_agent` TINYINT UNSIGNED NOT NULL DEFAULT 0, `macros_definition` TEXT, `render_definition` TEXT, + `use_prefix_notation` TINYINT UNSIGNED NOT NULL DEFAULT 1, PRIMARY KEY(`id_rc`), FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`) ON UPDATE CASCADE ON DELETE CASCADE @@ -3255,6 +3256,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` ( `ipam_ip_not_assigned_to_agent` TINYINT UNSIGNED NOT NULL DEFAULT 0, `macros_definition` TEXT, `render_definition` TEXT, + `use_prefix_notation` TINYINT UNSIGNED NOT NULL DEFAULT 1, PRIMARY KEY(`id_rc`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 8e00936d8a..f295fd91ee 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -301,28 +301,28 @@ INSERT INTO `ttipo_modulo` VALUES -- INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (1,1,'CPU','CPU','/usr/bin/perl','Model;Company;Speed','IyEvdXNyL2Jpbi9wZXJsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBwYW5kb3JhX2NwdS5wbA0KIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMNCiMgQ29weXJpZ2h0IChjKSAyMDA4IFJhbW9uIE5vdm9hLCBybm92b2FAYXJ0aWNhLmVzDQojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MDQojDQojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3INCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmV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NCglleGl0IDE7DQp9DQoNCmlmICgkI0FSR1YgPCAxKSB7DQoJcHJpbnQgIlVzYWdlOiAkMCA8dGFyZ2V0IGlwPiA8dXNlcm5hbWU+XG4iOw0KCWV4aXQgMTsNCn0NCg0KbXkgJHRhcmdldF9pcCA9ICRBUkdWWzBdOw0KbXkgJHVzZXJuYW1lID0gJEFSR1ZbMV07DQoNCiMgUmV0cmlldmUgQ1BVIGRhdGENCm15ICgkbW9kZWwsICR2ZW5kb3IsICRzcGVlZCk7DQpteSBAY3B1X2luZm8gPSBgJHNzaF9jbGllbnQgJHVzZXJuYW1lXEAkdGFyZ2V0X2lwICJjYXQgL3Byb2MvY3B1aW5mbyJgOw0KZm9yZWFjaCBteSAkbGluZSAoQGNwdV9pbmZvKSB7DQoJaWYgKCRsaW5lID1+IC9tb2RlbCBuYW1lXHMrOlxzKyguKikvKSB7DQoJCSRtb2RlbCA9ICQxOw0KCX0gZWxzaWYgKCRsaW5lID1+IC92ZW5kb3JfaWRccys6XHMrKC4qKS8pIHsNCgkJJHZlbmRvciA9ICQxOw0KCX0gZWxzaWYgKCRsaW5lID1+IC9jcHUgTUh6XHMrOlxzKyguKikvKSB7DQoJCSRzcGVlZCA9ICQxOw0KCX0NCn0NCiANCnJldHVybiAxIGlmICgkbW9kZWwgZXEgJycgfHwgJHZlbmRvciBlcSAnJyB8fCAkc3BlZWQgZXEgJycpOw0KcHJpbnQgIiRtb2RlbDskdmVuZG9yOyIgLiBzcHJpbnRmICgiJS4wZiIsICRzcGVlZCkgLiAiIE1IelxuIjsNCg0KZXhpdCAwOw0K',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (2,9,'CPU','CPU','/usr/bin/perl','Name;Speed;Description','IyEvdXNyL2Jpbi9wZXJsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyM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QkKCQkkcmVzdWx0ID0gJyc7CgoJCSMgSXRlbQoJCWlmIChkZWZpbmVkKCRlbGVtZW50LT57JG1vZHVsZV9pdGVtfSkpIHsKCQkJJHJlc3VsdCAuPSAkZWxlbWVudC0+eyRtb2R1bGVfaXRlbX0gLiAiOyI7CgkJfQoKCQkjIERhdGEKCQlpZiAoZGVmaW5lZCgkZWxlbWVudC0+eyRtb2R1bGVfZGF0YX0pKSB7CgkJCSRyZXN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2RhdGF9IC4gIiBNaHo7IjsKCQl9CgoJCSMgRGVzY3JpcHRpb24KCQlpZiAoZGVmaW5lZCgkZWxlbWVudC0+eyRtb2R1bGVfZGVzY3JpcHRpb259KSkgewoJCQkkcmVzdWx0IC49ICRlbGVtZW50LT57JG1vZHVsZV9kZXNjcmlwdGlvbn0gLiAiOyI7CgkJfQoKCQlwcmludCAkcmVzdWx0IC4gIlxuIjsJCgl9Cn0KCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkgQHJlc3VsdCA9IHJ1bl9xdWVyeSgiU0VMRUNUIE5hbWUsIE1heENsb2NrU3BlZWQsIERlc2NyaXB0aW9uIEZST00gV2luMzJfUHJvY2Vzc29yIik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIk1heENsb2NrU3BlZWQiLCAiRGVzY3JpcHRpb24iLCBcQHJlc3VsdCk7CmV4aXQgMDsK',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (3,1,'RAM','Memory modules','','Model;Size','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (4,9,'RAM','Memory modules','/usr/bin/perl','Slot;Size;Speed','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9yYW0ucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDggQXJ0aWNhIFNvbHVjaW9uZXMgVGVjbm9sb2dpY2FzIFMuTAojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcgojIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCiMgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IHZlcnNpb24gMi4KIwojIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAojIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCiMgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQojIEdOVSBHZW5lcmFsIFB1YmxpYyBM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+INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (4,9,'RAM','Memory modules','/usr/bin/perl','Slot;Size;Speed','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9yYW0ucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDgtMjAyMSBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbiAyLgojCiMgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCiMgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKIyBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlCiMgR05VIEdlbmVyYWwgUHVib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os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (5,1,'Video','Video cards','','Controller;Model;Company','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (6,9,'Video','Video cards','/usr/bin/perl','Name;vRAM;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV92aWRlby5wbAojIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFy dGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2lj YXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3Ry aWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdl bmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUg Rm91bmRhdGlvbjsgdmVyc2lvbiAyLgojCiMgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGlu IHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCiMgYnV0IFdJVEhPVVQgQU5ZIFdBUlJB TlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKIyBNRVJDSEFOVEFCSUxJ VFkgb3IgRklUTkVTUyB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GF0YSAoIkNhcHRp b24iLCAiQWRhcHRlclJBTSIsICJWaWRlb1Byb2Nlc3NvciIsIFxAcmVzdWx0KTsKZXhpdCAwOwo=',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (6,9,'Video','Video cards','/usr/bin/perl','Name;vRAM;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV92aWRlby5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOC0yMDIxIEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyB2ZXJzaW9uIDIuCiMKIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKIyBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgojIE1FUkNIQU5U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ZGF0YSAoIkNhcHRpb24iLCAiQWRhcHRlclJBTSIsICJWaWRlb1Byb2Nlc3NvciIsIFxAcmVzdWx0KTsKZXhpdCAwOwo=',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (7,1,'NIC','Network Interface Cards','','Device;Model;Company;MACAddress','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (8,9,'NIC','Network Interface Cards','/usr/bin/perl','Caption;MACAddress;IPAddress','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9uaWMucGwKIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRp Y2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDggQXJ0aWNhIFNvbHVjaW9uZXMgVGVjbm9sb2dpY2Fz IFMuTAojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmli dXRlIGl0IGFuZC9vcgojIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5l cmFsIFB1YmxpYyBMaWNlbnNlCiMgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZv dW5kYXRpb247IHZlcnNpb24gMi4KIwojIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0 aGUgaG9wZSB0aGF0IGl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3F1ZXJ5KCJTRUxFQ1QgQ2FwdGlvbiwgTUFDQWRkcmVzcywgSVBB ZGRyZXNzIEZST00gV2luMzJfTmV0d29ya0FkYXB0ZXJDb25maWd1cmF0aW9uIik7CnByaW50X21v ZHVsZWRhdGEgKCJDYXB0aW9uIiwgIk1BQ0FkZHJlc3MiLCAiSVBBZGRyZXNzIiwgXEByZXN1bHQp OwpleGl0IDA7Cg==',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (8,9,'NIC','Network Interface Cards','/usr/bin/perl','Caption;MACAddress;IPAddress','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9uaWMucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDgtMjAyMSBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbiAyLgojCiMgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob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2FwdGlvbiwgTUFDQWRkcmVzcywgSVBBZGRyZXNzIEZST00gV2luMzJfTmV0d29ya0FkYXB0ZXJDb25maWd1cmF0aW9uIik7CnByaW50X21vZHVsZWRhdGEgKCJDYXB0aW9uIiwgIk1BQ0FkZHJlc3MiLCAiSVBBZGRyZXNzIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (9,1,'HD','Hard drives','','Type;Model;Size','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (10,9,'HD','Hard drives','/usr/bin/perl','Model;Size;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9oZC5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbi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lYWRlcgogICAgICAgIHNoaWZ0IChAbGluZXMpOwoKICAgICAgICAjIEdldCBjb2x1bW4gbmFtZXMKICAgICAgICBteSBAY29sdW1uX25hbWVzID0gc3BsaXQoL1x8Lywgc2hpZnQgKEBsaW5lcykpOwoKICAgICAgICAjIEdldCByb3cgZGF0YQogICAgICAgIG15ICRpZHggPSAwOwogICAgICAgIGZvciAobXkgJGkgPSAwOyAkaSA8PSAkI2xpbmVzOyAkaSsrKSB7CgogICAgICAgICAgICAgICAgIyBDaGVjayBmb3IgZXJyb3JzCiAgICAgICAgICAgICAgICBpZiAoJGxpbmVzWyRpXSA9fiBtL15FUlJPUi8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXhpdCAxOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICMgQmxhY2sgbGlzdAogICAgICAgICAgICAgICAgaWYgKCRsaW5lc1skaV0gPX4gbS9GaWxlIDEvKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQ7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbXkgQGNvbHVtbiA9IHNwbGl0KC9cfC8sICRsaW5lc1skaV0pOwogICAgICAgICAgICAgICAgZm9yIChteSAkaiA9IDA7ICRqIDw9ICQjY29sdW1uX25hbWVzOyAkaisrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghIGRlZmluZWQoJGNvbHVtblskal0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdFskaWR4XS0+eyRjb2x1bW5fbmFtZXNbJGpdfSA9ICIiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXN1bHRbJGlkeF0tPnskY29sdW1uX25hbWVzWyRqXX0gPSAkY29sdW1uWyRqXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICA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7CiAgICAgICAgICAgICAgICAgICAgICAgICRyZXN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2l0ZW19IC4gJzsnOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICMgRGF0YQogICAgICAgICAgICAgICAgaWYgKGRlZmluZWQoJGVsZW1lbnQtPnskbW9kdWxlX2RhdGF9KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkcmVzdWx0IC49ICcgJyAuIHNwcmludGYoIiUuMWYiLCAkZWxlbWVudC0+eyRtb2R1bGVfZGF0YX0gLyAxMDczNzQxODI0KSAuICIgR0J5dGVzOyI7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgIyBEZXNjcmlwdGlvbgogICAgICAgICAgICAgICAgaWYgKGRlZmluZWQoJGVsZW1lbnQtPnskbW9kdWxlX2Rlc2NyaXB0aW9ufSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdCAuPSAgJGVsZW1lbnQtPnskbW9kdWxlX2Rlc2NyaXB0aW9ufTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2lmIChkZWZpbmVkKCRlbGVtZW50LT57JG1vZHVsZV9leHRyYV9kZXNjcmlwdGlvbn0pKXsKICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdCAuPSAgJGVsZW1lbnQtPnskbW9kdWxlX2V4dHJhX2Rlc2NyaXB0aW9ufTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBwcmludCAkcmVzdWx0IC4gIlxuIjsKICAgICAgICB9Cn0KCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkgQHJlc3VsdCA9IHJ1bl9xdWVyeSgiU0VMRUNUICogRlJPTSBXaW4zMl9EaXNrRHJpdmUiKTsKcHJpbnRfbW9kdWxlZGF0YSAoIkNhcHRpb24iLCAiU2l6ZSIsICJTZXJpYWxOdW1iZXIiLCAiU2lnbmF0dXJlIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (10,9,'HD','Hard drives','/usr/bin/perl','Model;Size;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9oZC5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOC0yMDIxIEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyB2ZXJzaW9uIDIuCiMKIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ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0VMRUNUIE1vZGVsLCBTaXplLCBTeXN0ZW1OYW1lIEZST00gV2luMzJfRGlza0RyaXZlIik7CnByaW50X21vZHVsZWRhdGEgKCJNb2RlbCIsICJTaXplIiwgIlN5c3RlbU5hbWUiLCBcQHJlc3VsdCk7CQpleGl0IDA7Cg==',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (11,1,'CDROM','CD-ROM drives','','Type;Model;Features','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (12,9,'CDROM','CD-ROM drives','/usr/bin/perl','Name;Description;Drive;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9jZHJvbS5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbiAyLgojCiMgVGhpc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iAgICAgICAgc2hpZnQgKEBsaW5lcyk7CgogICAgICAgICMgR2V0IGNvbHVtbiBuYW1lcwogICAgICAgIG15IEBjb2x1bW5fbmFtZXMgPSBzcGxpdCgvXHwvLCBzaGlmdCAoQGxpbmVzKSk7CgogICAgICAgICMgR2V0IHJvdyBkYXRhCiAgICAgICAgbXkgJGlkeCA9IDA7CiAgICAgICAgZm9yIChteSAkaSA9IDA7ICRpIDw9ICQjbGluZXM7ICRpKyspIHsKCiAgICAgICAgICAgICAgICAjIENoZWNrIGZvciBlcnJvcnMKICAgICAgICAgICAgICAgIGlmICgkbGluZXNbJGldID1+IG0vXkVSUk9SLykgewogICAgICAgICAgICAgICAgICAgICAgICBleGl0IDE7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgIyBCbGFjayBsaXN0CiAgICAgICAgICAgICAgICBpZiAoJGxpbmVzWyRpXSA9fiBtL0ZpbGUgMS8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgbmV4dDsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBteSBAY29sdW1uID0gc3BsaXQoL1x8LywgJGxpbmVzWyRpXSk7CiAgICAgICAgICAgICAgICBmb3IgKG15ICRqID0gMDsgJGogPD0gJCNjb2x1bW5fbmFtZXM7ICRqKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEgZGVmaW5lZCgkY29sdW1uWyRqXSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmVzdWx0WyRpZHhdLT57JGNvbHVtbl9uYW1lc1skal19ID0gIiI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdFskaWR4XS0+eyRjb2x1bW5fbmFtZXNbJGpdfSA9ICRjb2x1bW5bJGpdOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CgogICAg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YSBhbmQKIyAkbW9kdWxlX2Rlc2NyaXB0aW9uIGFyZSB1c2VkIHRvIGluZGV4IHRoZSBpdGVtLCBkYXRhIGFuZCBkZXNjcmlwdGlvbgojIFhNTCB0YWdzIHJlc3BlY3RpdmVseS4KIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKc3ViIHByaW50X21vZHVsZWRhdGEgewogICAgICAgIG15IEBtb2R1bGVfaGVhZGVycyA9IEB7JF9bMF19OwogICAgICAgIG15IEBkYXRhID0gQHskX1sxXX07CiAgICAgICAgbXkgJHJlc3VsdDsKCiAgICAgICAgZm9yZWFjaCBteSAkZWxlbWVudCAoQGRhdGEpIHsKICAgICAgICAgICAgICAgICRyZXN1bHQgPSAnJzsKICAgICAgICAgICAgICAgIGZvcmVhY2ggbXkgJG1oZWFkZXIgKEBtb2R1bGVfaGVhZGVycykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVmaW5lZCAoJGVsZW1lbnQtPnskbWhlYWRlcn0pKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3VsdCAuPSAkZWxlbWVudC0+eyRtaGVhZGVyfSAuICc7JzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmVzdWx0IC49ICc7JzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgY2hvcCgkcmVzdWx0KTsKICAgICAgICAgICAgICAgIHByaW50ICRyZXN1bHQgLiAiXG4iOwogICAgICAgIH0KfQoKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgpteSBAcmVzdWx0ICA9IHJ1bl9xdWVyeSgiU0VMRUNUICogRlJPTSBXaW4zMl9DRFJPTURyaXZlIik7Cm15IEBoZWFkZXJzID0gKCJOYW1lIiwgIkRlc2NyaXB0aW9uIiwgIkRyaXZlIiwgIkRldmljZUlkIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycywgXEByZXN1bHQpOwpleGl0IDA7Cgo=',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (12,9,'CDROM','CD-ROM drives','/usr/bin/perl','Name;Description;Drive;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9jZHJvbS5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOC0yMDIxIEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJl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IyMjIyMjIyMjIyMjIyMjIyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLCBEZXNjcmlwdGlvbiwgRHJpdmUgRlJPTSBXaW4zMl9DRFJPTURyaXZlIik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIkRlc2NyaXB0aW9uIiwgIkRyaXZlIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (13,1,'Software','Installed software packages','','Name;Version;Description','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (14,9,'Software','Installed software packages','/usr/bin/perl','Name;Version','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9zb2Z0d2FyZS5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZW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yMjIyMjIyMjCgpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgTmFtZSwgVmVyc2lvbiBGUk9NIFdpbjMyX1Byb2R1Y3QiKTsKcHJpbnRfbW9kdWxlZGF0YSAoIk5hbWUiLCAiVmVyc2lvbiIsIFxAcmVzdWx0KTsKZXhpdCAwOwoK',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (15,9,'Patches','Installed patches','/usr/bin/perl','HotFixID;Description;FixComments;ServicePackInEffect','IyEvdXNyL2Jpbi9wZXJsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBwYW5kb3JhX3BhdGNoLnBsDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMNCiMgICAgICAgICAgIChjKSAyMDA4IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwNCiMNCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcg0KIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQ0KIyBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbiAyLg0KIw0KIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3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G1vZHVsZV9zZXJ2aWNlcGFja30pKSB7DQoJCQkkcmVzdWx0IC49ICRlbGVtZW50LT57JG1vZHVsZV9zZXJ2aWNlcGFja307DQoJCX0NCg0KCQlwcmludCAkcmVzdWx0IC4gIlxuIjsJDQoJfQ0KfQ0KDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KIyBNYWluDQojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw0KDQpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgSG90Rml4SUQsIERlc2NyaXB0aW9uLCBGaXhDb21tZW50cywgU2VydmljZVBhY2tJbkVmZmVjdCBGUk9NIFdpbjMyX1F1aWNrRml4RW5naW5lZXJpbmciKTsNCnByaW50X21vZHVsZWRhdGEgKCJIb3RGaXhJRCIsICJEZXNjcmlwdGlvbiIsICJGaXhDb21tZW50cyIsICJTZXJ2aWNlUGFja0luRWZmZWN0IiwgXEByZXN1bHQpOw0KZXhpdCAwOw0K',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (14,9,'Software','Installed software packages','/usr/bin/perl','Name;Version','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9zb2Z0d2FyZS5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCA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IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkgQHJlc3VsdCA9IHJ1bl9xdWVyeSgiU0VMRUNUIE5hbWUsIFZlcnNpb24gRlJPTSBXaW4zMl9Qcm9kdWN0Iik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIlZlcnNpb24iLCAiIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (15,9,'Patches','Installed patches','/usr/bin/perl','HotFixID;Description;FixComments;ServicePackInEffect','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wYXRjaC5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOC0yMDIxIEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbC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IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBIb3RGaXhJRCwgRGVzY3JpcHRpb24sIEZpeENvbW1lbnRzIEZST00gV2luMzJfUXVpY2tGaXhFbmdpbmVlcmluZyIpOwpwcmludF9tb2R1bGVkYXRhICgiSG90Rml4SUQiLCAiRGVzY3JpcHRpb24iLCAiRml4Q29tbWVudHMiLCBcQHJlc3VsdCk7CmV4aXQgMDsK',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (16,1,'Init services','Services programmed to lauch in Unix','','Service','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (17,9,'Init services','Windows services','/usr/bin/perl','Name;PathName;State','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9zZXJ2aWNlcy5wbAoj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9h QGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xv Z2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRp c3RyaWJ1dGUgaXQgYW5kL29yCiMgbW9kaWZ5IGl0IHVuZGVyIHRoZ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IyMjIyMjIyMjIyMjIyMjIwojIE1haW4KIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLCBQYXRoTmFtZSwgU3Rh dGUgRlJPTSBXaW4zMl9TZXJ2aWNlIik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIlBhdGhO YW1lIiwgIlN0YXRlIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (17,9,'Init services','Windows services','/usr/bin/perl','Name;PathName;State','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9zZXJ2aWNlcy5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOC0yMDIxIEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZS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MjIyMjIyMjIyMjIyMjIyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLCBQYXRoTmFtZSwgU3RhdGUgRlJPTSBXaW4zMl9TZXJ2aWNlIik7CnByaW50X21vZHVsZWRhdGEgKCJOYW1lIiwgIlBhdGhOYW1lIiwgIlN0YXRlIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (18,1,'File system','UNIX filesystem mounted on system','','Device;Free size;Total size;Mount point','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (19,9,'File system','Disk drives','','Device;Total size;Free size;Mount point','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (20,1,'Process','Process running on system','','Process output from ps','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (21,9,'Process','Process running on system','/usr/bin/perl','Name;PathName;State','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcm9jZXNzZXMucGwK IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3Zv YUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDggQXJ0aWNhIFNvbHVjaW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XN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2Rlc2NyaXB0aW9ufTsKCQl9CgoJCXByaW50ICRy ZXN1bHQgLiAiXG4iOwkKCX0KfQoKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjCgpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgTmFtZSwgUGF0aE5hbWUsIFN0 YXRlIEZST00gV2luMzJfU2VydmljZSIpOwpwcmludF9tb2R1bGVkYXRhICgiTmFtZSIsICJQYXRo TmFtZSIsICJTdGF0ZSIsIFxAcmVzdWx0KTsJCmV4aXQgMDsK',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (21,9,'Process','Process running on system','/usr/bin/perl','Name;PathName;State','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcm9jZXNzZXMucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDgtMjAyMSBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyY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HQgLiAiXG4iOwkKCX0KfQoKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgTmFtZSwgUGF0aE5hbWUsIFN0YXRlIEZST00gV2luMzJfU2VydmljZSIpOwpwcmludF9tb2R1bGVkYXRhICgiTmFtZSIsICJQYXRoTmFtZSIsICJTdGF0ZSIsIFxAcmVzdWx0KTsJCmV4aXQgMDsK',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (22,1,'Users','User list','','Username','',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (23,9,'Users','User list','/usr/bin/perl','Domain;User','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV91c2Vycy5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAwOCBSYW1vbiBOb3ZvYSwgcm5vdm9hQGFydGljYS5lcwojICAgICAgICAgICAoYykgMjAwOCBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMgICAgICAgICAgIChjKSAyMDE1IE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fZGVzY3JpcHRpb259OwoJCX0KCgkJcHJpbnQgJHJlc3VsdCAuICJcbiI7CQoJfQp9CgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIE1haW4KIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKCm15IEByZXN1bHQgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLCBGdWxsTmFtZSwgU3RhdHVzIEZST00gV2luMzJfVXNlckFjY291bnQiKTsKcHJpbnRfbW9kdWxlZGF0YSAoIk5hbWUiLCAiRnVsbE5hbWUiLCAiU3RhdHVzIiwgXEByZXN1bHQpOwpleGl0IDA7Cg==',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (23,9,'Users','User list','/usr/bin/perl','Domain;User','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcm9jZXNzZXMucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMDggUmFtb24gTm92b2EsIHJub3ZvYUBhcnRpY2EuZXMKIyAgICAgICAgICAgKGMpIDIwMDgtMjAyMSBBcnRpY2EgU29sdWNpb25lcyBUZWNub2xvZ2ljYXMgUy5MCiMKIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWR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MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgpteSBAcmVzdWx0ID0gcnVuX3F1ZXJ5KCJTRUxFQ1QgTmFtZSwgUGF0aE5hbWUsIFN0YXRlIEZST00gV2luMzJfU2VydmljZSIpOwpwcmludF9tb2R1bGVkYXRhICgiTmFtZSIsICJQYXRoTmFtZSIsICJTdGF0ZSIsIFxAcmVzdWx0KTsJCmV4aXQgMDsK',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (24,9,'Services','Services installed','','Name;Command;Status','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (25,15,'Software','Installed software applications','','Name;Version;Description','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (26,7,'Cisco Interface Remote Inventory','Remote inventory module to get all cards in a Cisco','/usr/bin/perl','Name;Card Name;ID/Serial','IyEvdXNyL2Jpbi9wZXJsDQojSW52ZW50YXJpbyBkZSBUYXJqZXRhcw0KI1Nsb3Q7UGFydE51bWJlcjtTZXJpYWxOdW1iZXINCg0KIyEvdXNyL2Jpbi9wZXJsIC13DQoNCm15ICR0YXJnZXRfaXAgPSAkQVJHVlswXTsNCm15ICRjb21tdW5pdHkgPSAkQVJHVlsxXTsNCg0KI34gRXhlY3V0ZSBjb21tYW5kDQokY29tbWFuZCA9IGBzbm1wd2FsayAtdjJjIC1jICRjb21tdW5pdHkgJHRhcmdldF9pcCBtaW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dldF9pcCBtaWItMi40Ny4xLjEuMS4xLjIuJF9gIC4gJzsnOw0KCQkkcmVzdWx0IC49IGBzbm1wZ2V0IC12MmMgLWMgJGNvbW11bml0eSAtT3ZxICR0YXJnZXRfaXAgbWliLTIuNDcuMS4xLjEuMS4xMy4kX2AgLiAnOyc7DQoJCSRyZXN1bHQgLj0gYHNubXBnZXQgLXYyYyAtYyAkY29tbXVuaXR5IC1PdnEgJHRhcmdldF9pcCBtaWItMi40Ny4xLjEuMS4xLjExLiRfYDsNCgkJDQoJCSRyZXN1bHQgPX4gcy9cInxcbnxcPHxcPnxcJnxcW3xcXS8vZzsNCgkJcHJpbnQgJHJlc3VsdCAuICJcbiI7DQoJfQ0KfQ0KZXhpdCAwOw0K',0,2); @@ -331,11 +331,11 @@ INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `descri INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (29,1,'IP','IP address','','Interface;Address','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (30,1,'Routes','Routes table','','Destination;Gateway;Mask;Flags;Metric;Use;Interface','',0,2); INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (31,7,'Cisco Configuration','This script will collect a remote CISCO configuration','/usr/bin/perl','Configuration dump','IyEvdXNyL2Jpbi9wZXJsIAojCiMgKGMpIEFydGljYSAyMDE0CiMgVGhpcyBpcyBhbiBFbnRlcnByaXNlIGludmVudG9yeSBzY3JpcHQgZm9yIFBhbmRvcmEgRk1TIDUKIyBUaGlzIHNjcmlwdCB3aWxsIGNvbGxlY3QgYSByZW1vdGUgQ0lTQ08gY29uZmlndXJhdGlvbgojIFJFTUVNQkVSIFRPIEFDVElWQVRFIElU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ZWxuZXQtPnByaW50KCdzaG93IHJ1bm5pbmctY29uZmlnJyk7CgpteSAkZmggPSAkdGVsbmV0LT5pbnB1dF9sb2coJG91dHB1dF9maWxlKTsKbXkgJG91dHB1dCA9IDE7Cgp3aGlsZSAoZGVmaW5lZCgkb3V0cHV0KSl7Cgkkb3V0cHV0ID0gJHRlbG5ldC0+d2FpdGZvcignL01vcmUvaScpOyAKCSR0ZWxuZXQtPnByaW50KCIiKTsgCn0KCm15ICRidWZmZXIgPSAiIjsKCm9wZW4gT1VURiwgJG91dHB1dF9maWxlOwp3aGlsZSAoPE9VVEY+KSB7CgkkXyA9fiBzL1x4MDgvL2c7CgkkXyA9fiBzL1wtXC1Nb3JlXC1cLVtcdFxzXSovL2c7CgkkXyA9fiBzL1w7Ly9nOwoJJGJ1ZmZlciA9ICRidWZmZXIgLiAkXzsKfQpjbG9zZSAoT1VURik7Cgp1bmxpbmsgKCRvdXRwdXRfZmlsZSk7CnByaW50ICRidWZmZXI7Cg==',1,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (32,9,'Motherboard','This script retrieves the manufacturer,model and ID from the motherboard of a Windows system','/usr/bin/perl','Manufacturer;Model;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9tb3RoZXJib2FyZC5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAxNSBCb3JqYSBTYW5jaGV6IDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDE1IEFydGljYSBTb2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yMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkgQHJlc3VsdCAgPSBydW5fcXVlcnkoIlNFTEVDVCAqIEZST00gV2luMzJfY29tcHV0ZXJzeXN0ZW0iKTsKIyBSZW1lbWJlciB0byBtYXRjaCBsZW5naHQgb2YgYm90aCBhcnJheXMgaGVhZGVycyAmIHVuaXRzCm15IEBoZWFkZXJzID0gKCJNYW51ZmFjdHVyZXIiLCJNb2RlbCIsIk9FTVN0cmluZ0FycmF5Iik7Cm15IEB1bml0cyAgID0gKCIiLCIiLCIiKTsKcHJpbnRfbW9kdWxlZGF0YSAoXEBoZWFkZXJzLFxAdW5pdHMsIFxAcmVzdWx0KTsKZXhpdCAwOwo=',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (33,9,'Monitors','Retrieve all monitor info from a Windows system.','/usr/bin/perl','Model;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9tb25pdG9ycy5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAxNSBCb3JqYSBTYW5jaGV6IDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDE1IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcm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yMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkgQHJlc3VsdCAgPSBydW5fcXVlcnkoIlNFTEVDVCBOYW1lLFBOUERldmljZUlEIEZST00gV2luMzJfRGVza3RvcE1vbml0b3IiKTsKIyBSZW1lbWJlciB0byBtYXRjaCBsZW5naHQgb2YgYm90aCBhcnJheXMgaGVhZGVycyAmIHVuaXRzCm15IEBoZWFkZXJzID0gKCJOYW1lIiwiUE5QRGV2aWNlSUQiKTsKbXkgQHVuaXRzICAgPSAoIiIsIiIpOwpwcmludF9tb2R1bGVkYXRhIChcQGhlYWRlcnMsXEB1bml0cywgXEByZXN1bHQpOwpleGl0IDA7Cgo=',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (34,9,'Printers','Retrieve all printers of a Windows system','/usr/bin/perl','Name;Driver;Port','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcmludGVycy5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAxNSBCb3JqYSBTYW5jaGV6IDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDA4IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIg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c3VsdCAgPSBydW5fcXVlcnkoIlNFTEVDVCBDYXB0aW9uLERyaXZlck5hbWUsUG9ydE5hbWUgRlJPTSBXaW4zMl9wcmludGVyIik7CiMgUmVtZW1iZXIgdG8gbWF0Y2ggbGVuZ2h0IG9mIGJvdGggYXJyYXlzIGhlYWRlcnMgJiB1bml0cwpteSBAaGVhZGVycyA9ICgiQ2FwdGlvbiIsIkRyaXZlck5hbWUiLCJQb3J0TmFtZSIpOwpteSBAdW5pdHMgICA9ICgiIiwiIiwiIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycyxcQHVuaXRzLCBcQHJlc3VsdCk7CmV4aXQgMDsK',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (35,9,'product_key','Retrieve the Windows product key','/usr/bin/perl','Key','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcm9kdWN0a2V5LnBsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgQ29weXJpZ2h0IChjKSAyMDE1IEJvcmphIFNhbmNoZXosIDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDE1IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGlj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cm9kdWN0S2V5IGZyb20gU29mdHdhcmVMaWNlbnNpbmdTZXJ2aWNlIik7CiMgUmVtZW1iZXIgdG8gbWF0Y2ggbGVuZ2h0IG9mIGJvdGggYXJyYXlzIGhlYWRlcnMgJiB1bml0cwpteSBAaGVhZGVycyA9ICgiT0EzeE9yaWdpbmFsUHJvZHVjdEtleSIpOwpteSBAdW5pdHMgICA9ICgiIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycyxcQHVuaXRzLCBcQHJlc3VsdCk7CmV4aXQgMDsK',0,2); -INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (36,9,'product_ID','Retrieve the Windows product ID','/usr/bin/perl','Key','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcm9kdWN0SUQucGwKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBDb3B5cmlnaHQgKGMpIDIwMTUgQm9yamEgU2FuY2hleiwgPGZib3JqYS5zYW5jaGV6QGFydGljYS5lcz4KIyAgICAgICAgICAgKGMpIDIwMTUgQXJ0aWNhIFNvbHVjaW9uZXMgVGVjbm9sb2dpY2FzIFMuTAojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcgojIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCiMgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kY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5cyBoZWFkZXJzICYgdW5pdHMKbXkgQGhlYWRlcnMgPSAoIlNlcmlhbE51bWJlciIpOwpteSBAdW5pdHMgICA9ICgiIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycyxcQHVuaXRzLCBcQHJlc3VsdCk7CmV4aXQgMDsKCg==',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (32,9,'Motherboard','This script retrieves the manufacturer,model and ID from the motherboard of a Windows system','/usr/bin/perl','Manufacturer;Model;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9tb3RoZXJib2FyZC5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAxNSBCb3JqYSBTYW5jaGV6IDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDE1IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyB2ZXJzaW9uIDIuCiMKIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCB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15IEB1bml0cyAgID0gKCIiLCIiLCIiKTsKcHJpbnRfbW9kdWxlZGF0YSAoXEBoZWFkZXJzLFxAdW5pdHMsIFxAcmVzdWx0KTsKZXhpdCAwOwo=',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (33,9,'Monitors','Retrieve all monitor info from a Windows system.','/usr/bin/perl','Model;ID','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9tb25pdG9ycy5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAxNSBCb3JqYSBTYW5jaGV6IDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDE1IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyB2ZXJzaW9uIDIuCiMKIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKIyBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbi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0IDA7',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (34,9,'Printers','Retrieve all printers of a Windows system','/usr/bin/perl','Name;Driver;Port','IyEvdXNyL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgcGFuZG9yYV9wcmludGVycy5wbAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIENvcHlyaWdodCAoYykgMjAxNSBCb3JqYSBTYW5jaGV6IDxmYm9yamEuc2FuY2hlekBhcnRpY2EuZXM+CiMgICAgICAgICAgIChjKSAyMDA4IEFydGljYSBTb2x1Y2lvbmVzIFRlY25vbG9naWNhcyBTLkwKIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKIyBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyB2ZXJzaW9uIDIuCiMKIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKIyBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgojIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFN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yc7CgkJZm9yICgkaT0wOyAkaTxAbW9kdWxlX2hlYWRlcnM7JGkrKykgewoJCQlpZiAoZGVmaW5lZCAoJGVsZW1lbnQtPnskbW9kdWxlX2hlYWRlcnNbJGldfSkpIHsKCQkJCSRyZXN1bHQgLj0gJGVsZW1lbnQtPnskbW9kdWxlX2hlYWRlcnNbJGldfSAuICRtb2R1bGVfdW5pdHNbJGldIC4gJzsnOwoJCQl9CgkJCWVsc2UgewoJCQkJJHJlc3VsdCAuPSAnOyc7CgkJCX0KCQl9CgkJY2hvcCgkcmVzdWx0KTsKCQlwcmludCAkcmVzdWx0IC4gIlxuIjsJCgl9Cn0KCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgTWFpbgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKbXkgQHJlc3VsdCAgPSBydW5fcXVlcnkoIlNlbGVjdCBPQTN4T3JpZ2luYWxQcm9kdWN0S2V5IGZyb20gU29mdHdhcmVMaWNlbnNpbmdTZXJ2aWNlIik7CiMgUmVtZW1iZXIgdG8gbWF0Y2ggbGVuZ2h0IG9mIGJvdGggYXJyYXlzIGhlYWRlcnMgJiB1bml0cwpteSBAaGVhZGVycyA9ICgiT0EzeE9yaWdpbmFsUHJvZHVjdEtleSIpOwpteSBAdW5pdHMgICA9ICgiIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycyxcQHVuaXRzLCBcQHJlc3VsdCk7CmV4aXQgMDsK',0,2); +INSERT INTO `tmodule_inventory` (`id_module_inventory`, `id_os`, `name`, `description`, `interpreter`, `data_format`, `code`, `block_mode`,`script_mode`) VALUES (36,9,'product_ID','Retrieve the Windows product ID','/usr/bin/perl','Key','IyEvdXNyL2Jpbi9wZ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2R1bGVfaGVhZGVyc1skaV19KSkgewoJCQkJJHJlc3VsdCAuPSAkZWxlbWVudC0+eyRtb2R1bGVfaGVhZGVyc1skaV19IC4gJG1vZHVsZV91bml0c1skaV0gLiAnOyc7CgkJCX0KCQkJZWxzZSB7CgkJCQkkcmVzdWx0IC49ICc7JzsKCQkJfQoJCX0KCQljaG9wKCRyZXN1bHQpOwoJCXByaW50ICRyZXN1bHQgLiAiXG4iOwkKCX0KfQoKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBNYWluCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgpteSBAcmVzdWx0ICA9IHJ1bl9xdWVyeSgiU2VsZWN0IFNlcmlhbE51bWJlciBmcm9tIFdpbjMyX09wZXJhdGluZ1N5c3RlbSIpOwojIFJlbWVtYmVyIHRvIG1hdGNoIGxlbmdodCBvZiBib3RoIGFycmF5cyBoZWFkZXJzICYgdW5pdHMKbXkgQGhlYWRlcnMgPSAoIlNlcmlhbE51bWJlciIpOwpteSBAdW5pdHMgICA9ICgiIik7CnByaW50X21vZHVsZWRhdGEgKFxAaGVhZGVycyxcQHVuaXRzLCBcQHJlc3VsdCk7CmV4aXQgMDsKCg==',0,2); -- Categoria field is used to segregate several types -- (plugin, agents, network) on their data diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php index bdc1186044..737aa70770 100644 --- a/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php +++ b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php @@ -142,26 +142,26 @@ function main_intel_dcm_agent_view() $sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field_derated_power AND id_agent = $id_agent"; $derated_power = db_get_value_sql($sql); - $percent = number_format((($avg_power / $derated_power) * 100), 2); + $percent = number_format((($avg_power / $derated_power) * 100), 2, $config['decimal_separator'], $config['thousand_separator']); $data[0] = ''.__('Power utilization')." $percent%"; $data[0] .= progress_bar($percent, 400, 30, '', 2); $data[0] .= '

'; $data[0] .= ''.__('Current stats').''; $data[0] .= '

'; - $data[0] .= __('Power demand').': '.number_format($avg_power, 2).' Wh'; + $data[0] .= __('Power demand').': '.number_format($avg_power, 2, $config['decimal_separator'], $config['thousand_separator']).' Wh'; $data[0] .= '
'; - $data[0] .= __('Inlet temp').': '.number_format($avg_temp, 2).' ºC'; + $data[0] .= __('Inlet temp').': '.number_format($avg_temp, 2, $config['decimal_separator'], $config['thousand_separator']).' ºC'; $data[0] .= '


'; $data[0] .= ''.__('Last week summary').''; $data[0] .= '

'; - $data[0] .= __('Equipment energy consumed').': '.number_format($mnged_energy, 2).' Wh'; + $data[0] .= __('Equipment energy consumed').': '.number_format($mnged_energy, 2, $config['decimal_separator'], $config['thousand_separator']).' Wh'; $data[0] .= '
'; - $data[0] .= __('Equipment energy bill').': '.number_format($mnged_energy_bill, 2).' €'; + $data[0] .= __('Equipment energy bill').': '.number_format($mnged_energy_bill, 2, $config['decimal_separator'], $config['thousand_separator']).' €'; $data[0] .= '
'; - $data[0] .= __('Calculated cooling energy').': '.number_format($cooling_energy, 2).' Wh'; + $data[0] .= __('Calculated cooling energy').': '.number_format($cooling_energy, 2, $config['decimal_separator'], $config['thousand_separator']).' Wh'; $data[0] .= '
'; - $data[0] .= __('Calculated cooling energy bill').': '.number_format($cooling_energy_bill, 2).' €'; + $data[0] .= __('Calculated cooling energy bill').': '.number_format($cooling_energy_bill, 2, $config['decimal_separator'], $config['thousand_separator']).' €'; // Print avg. power graph $start_date = date('Y-m-d'); diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 1f60dd635a..bd1604fd03 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.767-221213 +Version: 7.0NG.767-221220 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 e1edbb8d26..712201992c 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.767-221213" +pandora_version="7.0NG.767-221220" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 82557ec477..53dbb2067e 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.767"; -my $pandora_build = "221213"; +my $pandora_build = "221220"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 4fde88b237..d8375dd5d1 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.767"; -my $pandora_build = "221213"; +my $pandora_build = "221220"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 6b61da4141..ed826306db 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.767 -%define release 221213 +%define release 221220 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b64cc93145..4534bf85e0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.767 -%define release 221213 +%define release 221220 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2206cc4a0b..d9f5da0f76 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.767" -PI_BUILD="221213" +PI_BUILD="221220" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f321258252..e8a01c41bc 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.767 Build 221213"; +my $version = "7.0NG.767 Build 221220"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9e2e117129..0b77f5dbad 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.767 Build 221213"; +my $version = "7.0NG.767 Build 221220"; # save program name for logging my $progname = basename($0); @@ -1296,7 +1296,6 @@ sub help_screen_line($$$){ sub check_values($) { my ($check) = @_; - use experimental 'smartmatch'; my $arg_cont = 2; my $cont = 0; @@ -1316,7 +1315,7 @@ sub check_values($) { # Check values. if (defined($check->[$cont]->{'values'})) { - if (!($args[$arg_cont] ~~ $check->[$cont]->{'values'})) { + if (!(is_in_array($check->[$cont]->{'values'}, $args[$arg_cont]))) { print "\nError: value `$args[$arg_cont]` is not valid for $check->[$cont]->{'name'}\n"; print "\tAvailable options: \t$check->[$cont]->{'values'}->[0]"; if (defined($check->[$cont]->{'text_extra'}->[0])) { diff --git a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl index 3eb2b4fb53..9b28848b48 100755 --- a/pandora_server/util/plugin/pandora_snmp_bandwidth.pl +++ b/pandora_server/util/plugin/pandora_snmp_bandwidth.pl @@ -2,7 +2,7 @@ # ################################################################################ # -# Bandwith usage plugin +# Bandwidth usage plugin # # Requirements: # snmpget @@ -55,7 +55,7 @@ Where OPTIONS could be: [EXTRA] -ifIndex Target interface to retrieve, if not specified, total - bandwith will be reported. + bandwidth will be reported. -uniqid Use custom temporary file name. -inUsage Show only input usage (in percentage) - 1, or not 0. -outUsage Show only output usage (in percentage) - 1, or not 0. @@ -66,7 +66,7 @@ e.g. -v is equal to -version, -c to -community, etc. EO_HELP use constant { - UNKNOWN_DUPLEX => 0, + UNKNOWN_DUPLEX => 1, HALF_DUPLEX => 2, FULL_DUPLEX => 3, }; @@ -133,9 +133,9 @@ sub update_config_key ($) { if ($arg eq 'inUsage') { return "inUsage"; } - if ($arg eq 'outUsage') { - return "outUsage"; - } + if ($arg eq 'outUsage') { + return "outUsage"; + } } ################################################################################ @@ -188,7 +188,7 @@ sub prepare_tree { my $inOctets = snmp_get(\%inOctets_call); if (ref($inOctets) eq "HASH") { - if ($inOctets->{'data'} eq '') { + if (! exists($inOctets->{'data'}) || $inOctets->{'data'} eq '') { $inOctets = 0; } else { $inOctets = int $inOctets->{'data'}; @@ -198,18 +198,18 @@ sub prepare_tree { next; } - my %outOctets_call = %{$config}; - if (is_enabled($config->{'use_x64'})) { - $outOctets_call{'oid'} = $config->{'oid_base'}; - $outOctets_call{'oid'} .= $config->{'x64_indexes'}{'outOctets'}.$ifIndex; - } else { - $outOctets_call{'oid'} = $config->{'oid_base'}; - $outOctets_call{'oid'} .= $config->{'x86_indexes'}{'outOctets'}.$ifIndex; - } + my %outOctets_call = %{$config}; + if (is_enabled($config->{'use_x64'})) { + $outOctets_call{'oid'} = $config->{'oid_base'}; + $outOctets_call{'oid'} .= $config->{'x64_indexes'}{'outOctets'}.$ifIndex; + } else { + $outOctets_call{'oid'} = $config->{'oid_base'}; + $outOctets_call{'oid'} .= $config->{'x86_indexes'}{'outOctets'}.$ifIndex; + } my $outOctets = snmp_get(\%outOctets_call); if (ref($outOctets) eq "HASH") { - if ($outOctets->{'data'} eq '') { + if (! exists($outOctets->{'data'}) || $outOctets->{'data'} eq '') { $outOctets = 0; } else { $outOctets = int $outOctets->{'data'}; @@ -220,28 +220,27 @@ sub prepare_tree { } my %duplex_call = %{$config}; - if (is_enabled($config->{'use_x64'})) { - $duplex_call{'oid'} = $config->{'oid_base'}; - $duplex_call{'oid'} .= $config->{'x64_indexes'}{'duplex'}.$ifIndex; - } else { - $duplex_call{'oid'} = $config->{'oid_base'}; - $duplex_call{'oid'} .= $config->{'x86_indexes'}{'duplex'}.$ifIndex; - } + if (is_enabled($config->{'use_x64'})) { + $duplex_call{'oid'} = $config->{'oid_base'}; + $duplex_call{'oid'} .= $config->{'x64_indexes'}{'duplex'}.$ifIndex; + } else { + $duplex_call{'oid'} = $config->{'oid_base'}; + $duplex_call{'oid'} .= $config->{'x86_indexes'}{'duplex'}.$ifIndex; + } my $duplex = snmp_get(\%duplex_call); if (ref($duplex) eq "HASH") { - if ($duplex->{'data'} eq '') { + if (! exists($duplex->{'data'}) || $duplex->{'data'} eq '') { $duplex = 0; } else { $duplex = int $duplex->{'data'}; } - } else { # Ignore, cannot retrieve inOctets. next; } - my %speed = %{$config}; + my %speed = %{$config}; if (is_enabled($config->{'use_x64'})) { $speed{'oid'} = $config->{'oid_base'}; $speed{'oid'} .= $config->{'x64_indexes'}{'ifSpeed'}.$ifIndex; @@ -492,9 +491,9 @@ $config->{'tmp_separator'} = ';' if empty($config->{'tmp_separator'}); $config->{'tmp'} = (($^O =~ /win/)?$ENV{'TMP'}:'/tmp') if empty($config->{'tmp'}); # Create unique name for tmp and log file for host -my $filename = $config->{'tmp'}.'/pandora_bandwith_'.$config->{'host'}; +my $filename = $config->{'tmp'}.'/pandora_bandwidth_'.$config->{'host'}; if (!empty($config->{'uniqid'})) { - $filename = $config->{'tmp'}.'/pandora_bandwith_'.$config->{'uniqid'}; + $filename = $config->{'tmp'}.'/pandora_bandwidth_'.$config->{'uniqid'}; } # Replace every dot for underscore $filename =~ tr/./_/; @@ -511,7 +510,7 @@ if ( defined($sysobjectid->{'error'}) || $sysobjectid->{'data'} eq '' ) { # Check SNMP x64 interfaces my $walk64 = snmp_walk({%{$config}, 'oid' => '.1.3.6.1.2.1.31.1.1.1.6'}); -if ( $walk64 =~ 'No Such Instance currently exists at this OID' || $walk64 =~ 'No more variables left in this MIB View') { +if ( $walk64 !~ /.*\.[0-9]+ = Counter64: [0-9]+/ ) { $config->{'use_x64'} = 0; } else { $config->{'use_x64'} = 1; @@ -556,35 +555,35 @@ my $j = 0; my $k = 0; foreach my $iface (keys %{$analysis_tree}) { # Calculate summary; - if (is_enabled($analysis_tree->{$iface}{'bandwidth'})) { - $bandwidth = $analysis_tree->{$iface}{'bandwidth'}; + if (is_enabled($analysis_tree->{$iface}{'bandwidth'}) || $analysis_tree->{$iface}{'bandwidth'} == 0) { + $bandwidth += $analysis_tree->{$iface}{'bandwidth'}; $i++; } - if (is_enabled($analysis_tree->{$iface}{'inUsage'})) { - $inUsage = $analysis_tree->{$iface}{'inUsage'}; + if (is_enabled($analysis_tree->{$iface}{'inUsage'}) || $analysis_tree->{$iface}{'inUsage'} == 0) { + $inUsage += $analysis_tree->{$iface}{'inUsage'}; $j++; } - if (is_enabled($analysis_tree->{$iface}{'outUsage'})) { - $outUsage = $analysis_tree->{$iface}{'outUsage'}; + if (is_enabled($analysis_tree->{$iface}{'outUsage'}) || $analysis_tree->{$iface}{'inUsage'} == 0) { + $outUsage += $analysis_tree->{$iface}{'outUsage'}; $k++; } } if ($j > 0 && is_enabled($config->{'inUsage'})) { - $inUsage /= $j; - print sprintf("%.9f\n", $inUsage); + $inUsage /= $j; + print sprintf("%.9f\n", $inUsage); } elsif ($k > 0 && is_enabled($config->{'outUsage'})) { - $outUsage /= $k; - print sprintf("%.9f\n", $outUsage); + $outUsage /= $k; + print sprintf("%.9f\n", $outUsage); } if ($i > 0 && !is_enabled($config->{'inUsage'}) && !is_enabled($config->{'outUsage'}) ) { - $bandwidth /= $i; - print sprintf("%.9f\n", $bandwidth); + $bandwidth /= $i; + print sprintf("%.9f\n", $bandwidth); } logger($config, 'info', "Plugin ends") if (is_enabled($config->{'debug'}));