diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 7a6aeff356..9d87093584 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.769-230303 +Version: 7.0NG.769-230306 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 fa61aa49c9..e30ef809b8 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.769-230303" +pandora_version="7.0NG.769-230306" 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 0a12df1c9f..2376f66ea0 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.769'; -use constant AGENT_BUILD => '230303'; +use constant AGENT_BUILD => '230306'; # 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 89ea2a0b9f..2fe2b071e4 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.769 -%define release 230303 +%define release 230306 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 aed2381793..cf54a0a5bb 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.769 -%define release 230303 +%define release 230306 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 c63a4a6cfc..9b77363457 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.769" -PI_BUILD="230303" +PI_BUILD="230306" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2c51bc2a4b..ef28e5b8d7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230303} +{230306} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index acf6b701e5..15de30d4ea 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.769 Build 230303") +#define PANDORA_VERSION ("7.0NG.769 Build 230306") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c6e79f7d24..bf6685685a 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.769(Build 230303))" + VALUE "ProductVersion", "(7.0NG.769(Build 230306))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 57d645e9b5..fc04649747 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.769-230303 +Version: 7.0NG.769-230306 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 f701f80ec0..ce174aea69 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.769-230303" +pandora_version="7.0NG.769-230306" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index d6c1e5c764..c84775d4ed 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -956,7 +956,20 @@ class SnmpConsole extends HTML 'class' => 'invert_filter main_menu_icon', ] ).''; - $tmp->action .= ''.html_print_image('images/edit.svg', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor'), 'class' => 'main_menu_icon invert_filter']).''; + + if ($config['enterprise_installed']) { + $tmp->action .= ''; + $tmp->action .= html_print_image( + 'images/edit.svg', + true, + [ + 'alt' => __('SNMP trap editor'), + 'title' => __('SNMP trap editor'), + 'class' => 'main_menu_icon invert_filter', + ] + ); + $tmp->action .= ''; + } $tmp->m = html_print_checkbox_extended('snmptrapid[]', $tmp->id_trap, false, false, '', 'class="chk"', true); diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index aa4b98aa86..c5af28b54f 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -214,6 +214,11 @@ class Tree AND ta.unknown_count = 0 AND ta.normal_count > 0) '; break; + + case AGENT_STATUS_NOT_NORMAL: + $agent_status_filter = ' AND (ta.critical_count > 0 + OR ta.warning_count > 0) '; + break; } return $agent_status_filter; @@ -285,6 +290,10 @@ class Tree return $show_init_condition; } + if ((int) $this->filter['statusModule'] === 6) { + return ' AND (ta.warning_count > 0 OR ta.critical_count > 0)'; + } + $field_filter = modules_get_counter_by_states($this->filter['statusModule']); if ($field_filter === false) { return ' AND 1=0'; @@ -902,6 +911,18 @@ class Tree $agent['counters']['ok'] = $agent['normal_count']; $agent['counters']['total'] = $agent['normal_count']; break; + + case AGENT_MODULE_STATUS_NOT_NORMAL: + if (empty($agent['critical_count']) === false) { + $agent['counters']['critical'] = $agent['critical_count']; + } + + if (empty($agent['warning_count']) === false) { + $agent['counters']['warning'] = $agent['warning_count']; + } + + $agent['counters']['total'] = ($agent['warning_count'] + $agent['critical_count']); + break; } } diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 70d3efe878..83f3ad15b0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230303'; +$build_version = 'PC230306'; $pandora_version = 'v7.0NG.769'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index c72aa9d77d..7ffafd974f 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -956,6 +956,11 @@ function processTreeSearch(settings) { agents: settings.translate.ok.agents, modules: settings.translate.ok.modules, none: settings.translate.ok.none + }, + not_normal: { + agents: settings.translate.not_normal.agents, + modules: settings.translate.not_normal.modules, + none: settings.translate.not_normal.none } } }); diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php index 373e70c1f6..c7b49be656 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php @@ -248,6 +248,10 @@ class TreeViewWidget extends Widget $values['agentStatus'] = AGENT_STATUS_NOT_INIT; break; + case 6: + $values['agentStatus'] = AGENT_STATUS_NOT_NORMAL; + break; + default: case -1: $values['agentStatus'] = AGENT_STATUS_ALL; @@ -289,6 +293,10 @@ class TreeViewWidget extends Widget $values['moduleStatus'] = AGENT_MODULE_STATUS_NOT_INIT; break; + case 6: + $values['moduleStatus'] = AGENT_MODULE_STATUS_NOT_NORMAL; + break; + default: case -1: $values['moduleStatus'] = -1; @@ -386,12 +394,13 @@ class TreeViewWidget extends Widget // Agents status. $fields = [ - AGENT_STATUS_ALL => __('All'), - AGENT_STATUS_NORMAL => __('Normal'), - AGENT_STATUS_WARNING => __('Warning'), - AGENT_STATUS_CRITICAL => __('Critical'), - AGENT_STATUS_UNKNOWN => __('Unknown'), - AGENT_STATUS_NOT_INIT => __('Not init'), + AGENT_STATUS_ALL => __('All'), + AGENT_STATUS_NORMAL => __('Normal'), + AGENT_STATUS_WARNING => __('Warning'), + AGENT_STATUS_CRITICAL => __('Critical'), + AGENT_STATUS_UNKNOWN => __('Unknown'), + AGENT_STATUS_NOT_INIT => __('Not init'), + AGENT_STATUS_NOT_NORMAL => __('Not normal'), ]; $inputs[] = [ @@ -425,6 +434,7 @@ class TreeViewWidget extends Widget AGENT_MODULE_STATUS_CRITICAL_BAD => __('Critical'), AGENT_MODULE_STATUS_UNKNOWN => __('Unknown'), AGENT_MODULE_STATUS_NOT_INIT => __('Not init'), + AGENT_MODULE_STATUS_NOT_NORMAL => __('Not normal'), ]; if (is_metaconsole() === false) { @@ -702,6 +712,11 @@ class TreeViewWidget extends Widget 'modules' => __('Normal modules'), 'none' => __('Normal'), ], + 'not_normal' => [ + 'agents' => __('Not normal agents'), + 'modules' => __('Not normal modules'), + 'none' => __('Not normal'), + ], 'module' => __('Module'), 'timeOnlyTitle' => __('Choose time'), 'timeText' => __('Time'), diff --git a/pandora_console/install.php b/pandora_console/install.php index f89f637f9e..0bc4e7466e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
", modules: "", none: "" - } + }, + not_normal: { + agents: "", + modules: "", + none: "" + }, } }); } diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index d4cb22170f..73a84d2701 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.769 -%define release 230303 +%define release 230306 # 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 e3c1692425..eddce30352 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.769 -%define release 230303 +%define release 230306 # 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 dfdce87616..f9a4ca19a5 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.769 -%define release 230303 +%define release 230306 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index eaa1453b3b..acb6636dca 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -1,9 +1,9 @@ -- Pandora FMS - the Flexible Monitoring System -- ============================================ --- Copyright (c) 2014-2021 Artica Soluciones Tecnologicas, http://www.artica.es --- Please see http://www.pandorafms.org for full contribution list +-- Copyright (c) 2014-2023 Artica PFMS +-- Please see http://www.pandorafms.com --- Database Data for Pandora FMS 5.1 +-- Database Data for Pandora FMS NG -- PLEASE NO NOT USE MULTILINE COMMENTS -- Because Pandora Installer don't understand them @@ -39,17 +39,18 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('block_size','20'), ('days_purge','45'), ('days_delete_unknown','0'), -('days_delete_not_initialized','0'), +('days_delete_not_initialized','7'), ('days_compact','0'), ('days_autodisable_deletion','30'), ('graph_res','5'), ('step_compact','1'), -('db_scheme_first_version', '6.0dev'), -('db_scheme_version','6.0RC1'), -('db_scheme_build','PD150908'), +('db_scheme_first_version', '7.0NG'), +('db_scheme_version','7.0NG'), +('db_scheme_build','PD230303'), ('show_unknown','0'), ('show_lastalerts','1'), ('style','pandora'), +('graph_image_height', '250'), ('graph_color1', '#99dd00'), ('graph_color2', '#336600'), ('graph_color3', '#3399cc'), @@ -104,7 +105,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('enable_refr', 0), ('meta_num_elements', 100), ('update_manager_installed', 1), -('num_files_attachment', 250), +('num_files_attachment', 500), ('show_vc', 1), ('inventory_changes_blacklist', '1,2,20,21'), ('custom_report_front', 0), @@ -220,10 +221,10 @@ UNLOCK TABLES; LOCK TABLES `tlink` WRITE; INSERT INTO `tlink` VALUES (1,'Documentation','https://pandorafms.com/manual'), -(2,'Enterprise Edition','http://pandorafms.com'), +(2,'Get support','https://pandorafms.com/en/technical-support/'), (3,'Report a bug','https://github.com/pandorafms/pandorafms/issues'), (4,'Suggest new feature','https://pandorafms.com/community/beta-program/'), -(5,'Module library','http://library.pandorafms.com/'); +(5,'Module library','https://pandorafms.com/library/'); UNLOCK TABLES; diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 5ddc61491a..391a2a0a89 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.769-230303 +Version: 7.0NG.769-230306 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 81bab67dcc..e300bbdd89 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.769-230303" +pandora_version="7.0NG.769-230306" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index c9e9b0d67d..6a7b17ee76 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.769"; -my $pandora_build = "230303"; +my $pandora_build = "230306"; 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 4244fbe156..c7979c820e 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.769"; -my $pandora_build = "230303"; +my $pandora_build = "230306"; 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 258f04a16d..600efab86e 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.769 -%define release 230303 +%define release 230306 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 14deb9c3c3..420399a804 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.769 -%define release 230303 +%define release 230306 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index ea2a1a70ed..5334ab0cca 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.769" -PI_BUILD="230303" +PI_BUILD="230306" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 6889216e80..445bd3b2b5 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.769 Build 230303"; +my $version = "7.0NG.769 Build 230306"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b7374ab423..d10d7bc878 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.769 Build 230303"; +my $version = "7.0NG.769 Build 230306"; # save program name for logging my $progname = basename($0);