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 @@