From 4589a7c298de516a1503b0c29ce08210da8bf799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 12 May 2022 18:31:24 +0200 Subject: [PATCH 01/17] Added control for WMI binary --- pandora_console/godmode/setup/performance.php | 10 ++++++++++ .../include/class/AgentWizard.class.php | 18 +++++++++++++----- pandora_console/include/functions_config.php | 8 ++++++++ pandora_console/include/functions_wmi.php | 6 +++--- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index ad74c490c2..a2851b568c 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -661,6 +661,16 @@ $tip = ui_print_help_tip( true ); +$table_other->data[$i][0] = __('WMI binary'); +$table_other->data[$i++][1] = html_print_input_text( + 'wmiBinary', + $config['wmiBinary'], + '', + 50, + 10, + true +); + if (enterprise_installed() === true) { $table_other->data[$i][0] = __('PhantomJS cache cleanup ').$tip; $table_other->data[$i++][1] = html_print_input( diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 2d7f2f37da..0cf4afaeab 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -278,6 +278,13 @@ class AgentWizard extends HTML */ private $extraArguments = ''; + /** + * Binary of wmic. + * + * @var string + */ + private $wmiBinary = ''; + /** * Constructor @@ -291,7 +298,7 @@ class AgentWizard extends HTML // Check access. check_login(); - if (!check_acl($config['id_user'], 0, 'AR')) { + if ((bool) check_acl($config['id_user'], 0, 'AR') === false) { db_pandora_audit( AUDIT_LOG_ACL_VIOLATION, 'Trying to access event viewer' @@ -311,6 +318,7 @@ class AgentWizard extends HTML $this->idAgent = get_parameter('id_agente', ''); $this->idPolicy = get_parameter('id', ''); $this->targetIp = get_parameter('targetIp', ''); + $this->wmiBinary = $config['wmiBinary']; if (empty($this->idAgent) === false) { $array_aux = db_get_all_rows_sql( @@ -1044,7 +1052,7 @@ class AgentWizard extends HTML $oidExplore = '.1.3.6.1.2.1.1.2.0'; } - // Explore general or interfaces + // Explore general or interfaces. $receivedOid = $this->snmpWalkValues( $oidExplore, false, @@ -1080,7 +1088,7 @@ class AgentWizard extends HTML // Capture the parameters. // Call WMI Explorer function. $this->wmiCommand = wmi_compose_query( - 'wmic', + $this->wmiBinary, $this->usernameWMI, $this->passwordWMI, $this->targetIp, @@ -5717,7 +5725,7 @@ class AgentWizard extends HTML $(this).removeClass('hidden'); return; } - + if (this.id.match(regex)) { $(this).removeClass('hidden'); } else { @@ -5729,7 +5737,7 @@ class AgentWizard extends HTML $(this).addClass('hidden'); } } - + if (filter_up == true) { if ($(this).attr('operstatus') != 1) { $(this).addClass('hidden'); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 07537de173..b730d9cfe0 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -928,6 +928,10 @@ function config_update_config() $error_update[] = __('SNMP walk binary path (fallback for v1)'); } + if (config_update_value('wmiBinary', get_parameter('wmiBinary'), true) === false) { + $error_update[] = __('Default WMI Binary'); + } + $pjs = get_parameter('phantomjs_cache_interval'); switch ($pjs) { case $config['phantomjs_cache_interval']: @@ -2088,6 +2092,10 @@ function config_process_config() config_update_value('snmpwalk_fallback', 'snmpwalk'); } + if (isset($config['wmiBinary']) === false) { + config_update_value('wmiBinary', 'pandorawmic'); + } + if (!isset($config['event_purge'])) { config_update_value('event_purge', 15); } diff --git a/pandora_console/include/functions_wmi.php b/pandora_console/include/functions_wmi.php index 7148233957..7f01e3f2bd 100644 --- a/pandora_console/include/functions_wmi.php +++ b/pandora_console/include/functions_wmi.php @@ -32,13 +32,13 @@ function wmi_compose_query($wmi_client, $user, $password, $host, $namespace='') { $wmi_command = ''; - if (!empty($password)) { - $wmi_command = $wmi_client.' -U "'.$user.'"%"'.$password.'"'; + if (empty($password) === false) { + $wmi_command = $wmi_client.' -U \''.$user.'\'%\''.$password.'\''; } else { $wmi_command = $wmi_client.' -U "'.$user.'"'; } - if (!empty($namespace)) { + if (empty($namespace) === false) { $namespace = str_replace('"', "'", $namespace); $wmi_command .= ' --namespace="'.$namespace.'"'; } From ececdca0b6ddf7f1d2e161b34f7e5891e025b406 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Fri, 13 May 2022 12:54:58 +0200 Subject: [PATCH 02/17] Not orientation CV view mobile pandora_enterprise#8888 --- pandora_console/general/logon_ok.php | 2 +- .../godmode/setup/setup_visuals.php | 61 ++++++++++++++++--- pandora_console/include/class/HTML.class.php | 2 + .../include/class/WelcomeWindow.class.php | 2 +- pandora_console/include/functions_config.php | 8 +++ pandora_console/include/functions_html.php | 2 +- .../include/functions_tactical.php | 17 ++++-- .../include/functions_visual_map.php | 28 ++++++--- .../include/javascript/pandora_dashboards.js | 54 ++++++++-------- .../Dashboard/Widgets/maps_made_by_user.php | 27 ++++---- .../include/rest-api/models/Model.php | 13 +++- .../VisualConsole/Items/StaticGraph.php | 8 +++ .../style/jquery.mobile-1.5.0-rc1.min.css | 2 +- pandora_console/mobile/include/ui.class.php | 4 ++ .../mobile/operation/visualmap.php | 29 ++++++--- 15 files changed, 184 insertions(+), 75 deletions(-) diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index d836d9f22c..7cb8f1d81b 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -288,7 +288,7 @@ foreach ($sessions as $session) { array_push($table->data, $data); } -$activity .= html_print_table($table, true); +$activity = html_print_table($table, true); unset($table); ui_toggle( diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 9a36b3ac1c..d425c13b14 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -11,7 +11,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// Load global vars +// Load global vars. global $config; check_login(); @@ -181,7 +181,8 @@ $backgrounds_list = array_merge($backgrounds_list_jpg, $backgrounds_list_png); $backgrounds_list = array_merge($backgrounds_list, $backgrounds_list_gif); asort($backgrounds_list); -if (!enterprise_installed()) { +$open = false; +if (enterprise_installed() === false) { $open = true; } @@ -953,7 +954,7 @@ $options_full_escale[2] = __('On Boolean graphs'); $table_chars->data[$row][1] = html_print_select( $options_full_escale, 'full_scale_option', - $config['full_scale_option'], + (isset($config['full_scale_option']) === true) ? $config['full_scale_option'] : 0, '', '', 0, @@ -973,7 +974,7 @@ $options_soft_graphs[1] = __('Show MAX/AVG/MIN by default'); $table_chars->data[$row][1] = html_print_select( $options_soft_graphs, 'type_mode_graph', - $config['type_mode_graph'], + (isset($config['type_mode_graph']) === true) ? $config['type_mode_graph'] : 0, '', '', 0, @@ -1053,13 +1054,31 @@ $table_vc->data[$row][1] = html_print_extended_select_for_time( $row++; $table_vc->data[$row][0] = __('Default interval for refresh on Visual Console'); -$table_vc->data[$row][1] = html_print_select($values, 'vc_refr', (int) $config['vc_refr'], '', 'N/A', 0, true, false, false); +$table_vc->data[$row][1] = html_print_select( + $values, + 'vc_refr', + (int) $config['vc_refr'], + '', + 'N/A', + 0, + true, + false, + false +); $row++; $vc_favourite_view_array[0] = __('Classic view'); $vc_favourite_view_array[1] = __('View of favorites'); $table_vc->data[$row][0] = __('Type of view of visual consoles'); -$table_vc->data[$row][1] = html_print_select($vc_favourite_view_array, 'vc_favourite_view', $config['vc_favourite_view'], '', '', 0, true); +$table_vc->data[$row][1] = html_print_select( + $vc_favourite_view_array, + 'vc_favourite_view', + $config['vc_favourite_view'], + '', + '', + 0, + true +); $row++; $table_vc->data[$row][0] = __('Number of favorite visual consoles to show in the menu'); @@ -1067,7 +1086,23 @@ $table_vc->data[$row][1] = " $visualConsoleData, - 'items' => $visualConsoleItems, - 'baseUrl' => ui_get_full_url('/', false, false, false), - 'ratio' => $ratio, - 'size' => $size, - 'cellId' => $this->cellId, - 'hash' => User::generatePublicHash(), - 'id_user' => $config['id_user'], - 'page' => 'include/ajax/visual_console.ajax', - 'uniq' => $uniq, + 'props' => $visualConsoleData, + 'items' => $visualConsoleItems, + 'baseUrl' => ui_get_full_url( + '/', + false, + false, + false + ), + 'ratio' => $ratio, + 'size' => $size, + 'cellId' => $this->cellId, + 'hash' => User::generatePublicHash(), + 'id_user' => $config['id_user'], + 'page' => 'include/ajax/visual_console.ajax', + 'uniq' => $uniq, + 'mobile_view_orientation_vc' => false, ] ); @@ -507,7 +513,6 @@ class MapsMadeByUser extends Widget }, dataType: 'JSON', success: function(data) { - console.log(data); $('#vcId').empty(); Object.entries(data).forEach(e => { key = e[0]; diff --git a/pandora_console/include/rest-api/models/Model.php b/pandora_console/include/rest-api/models/Model.php index fda301983a..c257c05b9f 100644 --- a/pandora_console/include/rest-api/models/Model.php +++ b/pandora_console/include/rest-api/models/Model.php @@ -223,6 +223,7 @@ abstract class Model */ public function adjustToViewport($size, $mode='') { + global $config; $ratio_visualconsole = $this->getRatio(); $ratio_w = ($size['width'] / $this->data['width']); $ratio_h = ($size['height'] / $this->data['height']); @@ -232,8 +233,16 @@ abstract class Model $ratio = $ratio_w; if ($mode === 'mobile') { - if ($this->data['height'] < $this->data['width']) { - if ($this->data['height'] > $size['height']) { + if ((bool) $config['mobile_view_orientation_vc'] === true) { + if ($this->data['height'] < $this->data['width']) { + if ($this->data['height'] > $size['height']) { + $ratio = $ratio_h; + $this->data['height'] = $size['height']; + $this->data['width'] = ($size['height'] / $ratio_visualconsole); + } + } + } else { + if ($this->data['height'] > $this->data['width']) { $ratio = $ratio_h; $this->data['height'] = $size['height']; $this->data['width'] = ($size['height'] / $ratio_visualconsole); 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 2bc262103a..adeaa9c29e 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php @@ -174,6 +174,14 @@ final class StaticGraph extends Item throw new \InvalidArgumentException('missing module Id'); } + if (isset($data['agentDisabled']) === false) { + $data['agentDisabled'] = false; + } + + if (isset($data['moduleDisabled']) === false) { + $data['moduleDisabled'] = false; + } + if ((bool) $data['agentDisabled'] === false && (bool) $data['moduleDisabled'] === false ) { diff --git a/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css b/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css index 60cf0cf83a..e543176676 100644 --- a/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css +++ b/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css @@ -1396,7 +1396,7 @@ div.ui-mobile-viewport { overflow: visible; overflow-x: hidden; padding: 1em; - min-height: calc(100vh - 60px); + /*min-height: calc(100vh - 60px);*/ } .ui-corner-all > .ui-toolbar-header:first-child, .ui-corner-all > .ui-content:first-child, diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index 31d841d353..a08d29a208 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -1003,6 +1003,10 @@ class Ui $(document).ready(function () { dashboardLoadVC(settings); + if(settings.mobile_view_orientation_vc === false) { + $(".container-center").css("transform", "rotate(90deg)"); + $(".container-center").css("margin-top", "40px"); + } }); ' ); diff --git a/pandora_console/mobile/operation/visualmap.php b/pandora_console/mobile/operation/visualmap.php index 754afe9c0f..5ec1f6f25b 100644 --- a/pandora_console/mobile/operation/visualmap.php +++ b/pandora_console/mobile/operation/visualmap.php @@ -216,6 +216,7 @@ class Visualmap */ private function show_visualmap() { + global $config; $ui = Ui::getInstance(); $system = System::getInstance(); @@ -279,6 +280,13 @@ class Visualmap 'height' => $this->height, ]; + if ((bool) $config['mobile_view_orientation_vc'] === true) { + $size = [ + 'width' => $this->height, + 'height' => $this->width, + ]; + } + $ratio_t = $visualConsole->adjustToViewport($size, 'mobile'); $visualConsoleData = $visualConsole->toArray(); @@ -340,16 +348,17 @@ class Visualmap $settings = \json_encode( [ - 'props' => $visualConsoleData, - 'items' => $visualConsoleItems, - 'baseUrl' => ui_get_full_url('/', false, false, false), - 'page' => 'include/ajax/visual_console.ajax', - 'ratio' => $ratio_t, - 'size' => $size, - 'cellId' => $uniq, - 'uniq' => $uniq, - 'mobile' => true, - 'vcId' => $visualConsoleId, + 'props' => $visualConsoleData, + 'items' => $visualConsoleItems, + 'baseUrl' => ui_get_full_url('/', false, false, false), + 'page' => 'include/ajax/visual_console.ajax', + 'ratio' => $ratio_t, + 'size' => $size, + 'cellId' => $uniq, + 'uniq' => $uniq, + 'mobile' => true, + 'vcId' => $visualConsoleId, + 'mobile_view_orientation_vc' => (bool) !$config['mobile_view_orientation_vc'], ] ); From 0775b12caabf1285019c60f803782c698bae4fc5 Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 13 May 2022 14:23:48 +0200 Subject: [PATCH 03/17] Description and unit on discovery network snmp interfaces --- .../lib/PandoraFMS/DiscoveryServer.pm | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index fcc1c8ca47..72d7a9b014 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -713,7 +713,9 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'plugin_user' => $self->{'task_data'}{'snmp_auth_user'}, 'plugin_pass' => $self->{'task_data'}{'snmp_auth_pass'}, 'snmp_community' => $community, - 'snmp_oid' => "$PandoraFMS::Recon::Base::IFOPERSTATUS.$if_index" + 'snmp_oid' => "$PandoraFMS::Recon::Base::IFOPERSTATUS.$if_index", + 'unit' => '' + } ); @@ -741,7 +743,9 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'plugin_user' => $self->{'task_data'}{'snmp_auth_user'}, 'plugin_pass' => $self->{'task_data'}{'snmp_auth_pass'}, 'snmp_community' => $community, - 'snmp_oid' => "$PandoraFMS::Recon::Base::IFHCINOCTECTS.$if_index" + 'snmp_oid' => "$PandoraFMS::Recon::Base::IFHCINOCTECTS.$if_index", + 'unit' => safe_input('bytes/s') + } ); } else { @@ -766,7 +770,9 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'plugin_user' => $self->{'task_data'}{'snmp_auth_user'}, 'plugin_pass' => $self->{'task_data'}{'snmp_auth_pass'}, 'snmp_community' => $community, - 'snmp_oid' => "$PandoraFMS::Recon::Base::IFINOCTECTS.$if_index" + 'snmp_oid' => "$PandoraFMS::Recon::Base::IFINOCTECTS.$if_index", + 'unit' => safe_input('bytes/s') + } ); } @@ -795,7 +801,9 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'plugin_user' => $self->{'task_data'}{'snmp_auth_user'}, 'plugin_pass' => $self->{'task_data'}{'snmp_auth_pass'}, 'snmp_community' => $community, - 'snmp_oid' => "$PandoraFMS::Recon::Base::IFHCOUTOCTECTS.$if_index" + 'snmp_oid' => "$PandoraFMS::Recon::Base::IFHCOUTOCTECTS.$if_index", + 'unit' => safe_input('bytes/s') + } ); } else { @@ -820,7 +828,8 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'plugin_user' => $self->{'task_data'}{'snmp_auth_user'}, 'plugin_pass' => $self->{'task_data'}{'snmp_auth_pass'}, 'snmp_community' => $community, - 'snmp_oid' => "$PandoraFMS::Recon::Base::IFOUTOCTECTS.$if_index" + 'snmp_oid' => "$PandoraFMS::Recon::Base::IFOUTOCTECTS.$if_index", + 'unit' => safe_input('bytes/s') } ); } @@ -1253,9 +1262,13 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { $id_tipo_modulo = get_module_id($self->{'dbh'}, $module->{'type'}) if is_empty($id_tipo_modulo); - my $description = safe_output($module->{'description'}); + my $description = safe_output($module->{'descripcion'}); $description = '' if is_empty($description); + my $unit = safe_output($module->{'unit'}); + $unit = '' if is_empty($unit); + + if (is_enabled($module->{'__module_component'})) { # Module from network component. delete $module->{'__module_component'}; @@ -1275,6 +1288,11 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { } else { # Create module - Direct. my $name = $module->{'name'}; + my $description = safe_output($module->{'descripcion'}); + + my $unit = safe_output($module->{'unit'}); + $unit = '' if is_empty($unit); + delete $module->{'name'}; delete $module->{'description'}; $agentmodule_id = pandora_create_module_from_hash( @@ -1286,7 +1304,8 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { 'nombre' => safe_input($name), 'descripcion' => safe_input($description), 'id_agente' => $agent_id, - 'ip_target' => $data->{'agent'}{'direccion'} + 'ip_target' => $data->{'agent'}{'direccion'}, + 'unit' => safe_input($unit) }, $self->{'dbh'} ); From d22c667776df719a3b495aeca312146c9c7172da Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 15 Jun 2022 19:50:19 +0200 Subject: [PATCH 04/17] fixed VC pandora_enterprise#8888 --- .../include/rest-api/models/Model.php | 7 +++++++ pandora_console/mobile/include/ui.class.php | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/rest-api/models/Model.php b/pandora_console/include/rest-api/models/Model.php index c257c05b9f..ef698b2fcd 100644 --- a/pandora_console/include/rest-api/models/Model.php +++ b/pandora_console/include/rest-api/models/Model.php @@ -227,6 +227,8 @@ abstract class Model $ratio_visualconsole = $this->getRatio(); $ratio_w = ($size['width'] / $this->data['width']); $ratio_h = ($size['height'] / $this->data['height']); + $acum_height = $this->data['height']; + $acum_width = $this->data['width']; $this->data['width'] = $size['width']; $this->data['height'] = ($size['width'] * $ratio_visualconsole); @@ -240,6 +242,11 @@ abstract class Model $this->data['height'] = $size['height']; $this->data['width'] = ($size['height'] / $ratio_visualconsole); } + } else { + $ratio = $ratio_w; + $height = (($acum_height * ($size['width'])) / $acum_width); + $this->data['height'] = $height; + $this->data['width'] = ($height / $ratio_visualconsole); } } else { if ($this->data['height'] > $this->data['width']) { diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index a08d29a208..1123839a6c 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -1004,9 +1004,22 @@ class Ui $(document).ready(function () { dashboardLoadVC(settings); if(settings.mobile_view_orientation_vc === false) { - $(".container-center").css("transform", "rotate(90deg)"); - $(".container-center").css("margin-top", "40px"); + //$(".container-center").css("transform", "rotate(90deg)"); + //$(".container-center").css("margin-top", "40px"); + $("#main_page > .ui-content").css("display", "block"); + + $(".container-center").css("padding", "50% 0"); + $(".visual-console-container-dashboard").css("display", "block"); + $(".visual-console-container-dashboard").css("transform-origin", "left top"); + $(".visual-console-container-dashboard").css("transform", "rotate(-90deg) translate(-100%)"); + $(".visual-console-container-dashboard").css("margin-top", "-50%"); + $(".visual-console-container-dashboard").css("white-space", "nowrap"); + if(settings.props.height > settings.props.width) { + $(".container-center").css("overflow", "auto"); + } } + + }); ' ); From c46f1ac31adbc8ad4751908a72ffa82f57e016fa Mon Sep 17 00:00:00 2001 From: Calvo Date: Thu, 16 Jun 2022 11:11:04 +0200 Subject: [PATCH 05/17] SNMP Bandwith modules on discovery task --- .../lib/PandoraFMS/DiscoveryServer.pm | 171 +++++++++++++++++- 1 file changed, 170 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index 72d7a9b014..cd0fa787a7 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -536,9 +536,54 @@ sub PandoraFMS::Recon::Base::test_module($$) { # Column $test->{'tcp_port'} ); + } elsif ($test->{'id_modulo'} == 4) { + # SNMP Bandwith plugin modules. + # Check if plugin is running. + if ($module->{'macros'} ne '') { + + # Get Bandwidth plugin. + my $plugin = get_db_single_row( + $self->{'dbh'}, + 'SELECT * FROM tplugin WHERE name = "Network bandwidth SNMP"', + ); + + return 0 unless defined($plugin); + my $parameters = safe_output($plugin->{'parameters'}); + my $plugin_exec = $plugin->{'plugin_exec'}; + + # Decode macros. + my $macros = p_decode_json($self->{'config'}, safe_output($test->{'macros'})); + + my %macros = %{$macros}; + if(ref($macros) eq "HASH") { + foreach my $macro_id (keys(%macros)) + { + my $macro_field = safe_output($macros{$macro_id}{'macro'}); + my $macro_desc = safe_output($macros{$macro_id}{'desc'}); + my $macro_value = (defined($macros{$macro_id}{'hide'}) && $macros{$macro_id}{'hide'} eq '1') ? + pandora_output_password($self->{'config'}, safe_output($macros{$macro_id}{'value'})) : + safe_output($macros{$macro_id}{'value'}); + + # build parameters to invoke plugin + $parameters =~ s/\'$macros{$macro_id}{'macro'}\'/$macro_value/g; + + } + } + my $command = safe_output($plugin_exec); + + # Execute the plugin. + my $output = `$command 2>$DEVNULL`; + # Do not save the output if there was an error. + if ($? != 0) { + return 0; + } else { + $value = 1; + } + } } elsif(is_enabled($test->{'id_plugin'})) { # XXX TODO: Test plugins. How to identify arguments? and values? # Disabled until we can ensure result. + return 0; } @@ -702,7 +747,7 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'id_modulo' => 2, 'name' => $if_name."_ifOperStatus", 'descripcion' => safe_input( - $if_desc + 'The current operational state of the interface: up(1), down(2), testing(3), unknown(4), dormant(5), notPresent(6), lowerLayerDown(7)', ), 'ip_target' => $device, 'tcp_send' => $self->{'task_data'}{'snmp_version'}, @@ -833,6 +878,130 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { } ); } + + # Bandwidth plugin. + my $plugin = get_db_single_row( + $self->{'dbh'}, + 'SELECT id, macros FROM tplugin WHERE name = "Network bandwidth SNMP"', + ); + next unless defined($plugin); + + # Network Bandwidth is installed. + my $macros = p_decode_json($self->{'config'}, safe_output($plugin->{'macros'})); + my $id_plugin = $plugin->{'id'}; + + if(ref($macros) eq "HASH") { + + # SNMP Version. + $macros->{'1'}->{'value'} = $self->{'task_data'}->{'snmp_version'}; + # Community. + $macros->{'2'}->{'value'} = $community; + # Host. + $macros->{'3'}->{'value'} = $device; + # Port. + $macros->{'4'}->{'value'} = 161; + # Interface index filter. + $macros->{'5'}->{'value'} = $if_index; + # SecurityName. + $macros->{'6'}->{'value'} = $self->{'task_data'}->{'snmp_auth_method'}; + # SecurityContext. + $macros->{'7'}->{'value'} = $community; + # SecurityLevel. + $macros->{'8'}->{'value'} = $self->{'task_data'}->{'snmp_security_level'}; + # AuthProtocol. + $macros->{'9'}->{'value'} = $self->{'task_data'}->{'snmp_auth_method'}; + # AuthKey. + $macros->{'10'}->{'value'} = $self->{'task_data'}->{'snmp_auth_pass'}; + # PrivProtocol. + $macros->{'11'}->{'value'} = $self->{'task_data'}->{'snmp_privacy_method'}; + # PrivKey. + $macros->{'12'}->{'value'} = $self->{'task_data'}->{'snmp_privacy_pass'}; + # Hash identifier. + $macros->{'13'}->{'value'} = PandoraFMS::Tools::generate_agent_name_hash($if_name, $device); + # Get input usage. + $macros->{'14'}->{'value'} = 0; + # Get output usage. + $macros->{'15'}->{'value'} = 0; + + $self->call( + 'add_module', + $device, + { + 'id_tipo_modulo' => 1, + 'id_modulo' => 4, + 'name' => $if_name."_Bandwith", + 'description' => safe_input( + 'Amount of digital information sent and received from this interface over a particular time', + ), + 'unit' => '%', + 'macros' => p_encode_json($self->{'config'}, $macros), + 'id_plugin' => $id_plugin, + 'unit' => '%', + 'min_warning' => '0', + 'max_warning' => '0', + 'min_critical' => '85', + 'max_critical' => '0', + } + ); + + # inUsage + # Hash identifier. + $macros->{'13'}->{'value'} = PandoraFMS::Tools::generate_agent_name_hash($if_name, $device); + # Get input usage. + $macros->{'14'}->{'value'} = 1; + # Get output usage. + $macros->{'15'}->{'value'} = 0; + + $self->call( + 'add_module', + $device, + { + 'id_tipo_modulo' => 1, + 'id_modulo' => 4, + 'name' => $if_name."_outUsage", + 'description' => safe_input( + 'Bandwidth usage received from this interface over a particular time', + ), + 'unit' => '%', + 'macros' => p_encode_json($self->{'config'}, $macros), + 'id_plugin' => $id_plugin, + 'unit' => '%', + 'min_warning' => '0', + 'max_warning' => '0', + 'min_critical' => '85', + 'max_critical' => '0', + } + ); + + # OutUsage. + # Hash identifier. + $macros->{'13'}->{'value'} = PandoraFMS::Tools::generate_agent_name_hash($if_name, $device); + # Get input usage. + $macros->{'14'}->{'value'} = 0; + # Get output usage. + $macros->{'15'}->{'value'} = 1; + + $self->call( + 'add_module', + $device, + { + 'id_tipo_modulo' => 1, + 'id_modulo' => 4, + 'name' => $if_name."_outUsage", + 'description' => safe_input( + 'Bandwidth usage sent from this interface over a particular time', + ), + 'unit' => '%', + 'macros' => p_encode_json($self->{'config'}, $macros), + 'id_plugin' => $id_plugin, + 'unit' => '%', + 'min_warning' => '0', + 'max_warning' => '0', + 'min_critical' => '85', + 'max_critical' => '0', + } + ); + } } } From ea60e4be71580425e24041e07166b0e0aadee682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 16 Jun 2022 11:14:00 +0200 Subject: [PATCH 06/17] Added database changes --- pandora_console/extras/mr/55.sql | 9 +++++++++ pandora_console/pandoradb.sql | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pandora_console/extras/mr/55.sql b/pandora_console/extras/mr/55.sql index f53133c456..4542d76b80 100644 --- a/pandora_console/extras/mr/55.sql +++ b/pandora_console/extras/mr/55.sql @@ -4,4 +4,13 @@ ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default ALTER TABLE `tdashboard` MODIFY `name` TEXT NOT NULL DEFAULT ''; +ALTER TABLE `tevent_alert` ADD COLUMN `field1_recovery` text DEFAULT '' AFTER `recovery_notify`; +ALTER TABLE `tevent_alert` ADD COLUMN `field4_recovery` text DEFAULT '' AFTER `field3_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` text DEFAULT '' AFTER `field4_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` text DEFAULT '' AFTER `field5_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` text DEFAULT '' AFTER `field6_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` text DEFAULT '' AFTER `field7_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field0_recovery` text DEFAULT '' AFTER `field8_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` text DEFAULT '' AFTER `field9_recovery`; + COMMIT; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index ebd940c749..0634f10555 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3016,8 +3016,16 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` ( `saturday` TINYINT DEFAULT 1, `sunday` TINYINT DEFAULT 1, `recovery_notify` TINYINT DEFAULT 0, - `field2_recovery` TEXT , - `field3_recovery` TEXT, + `field1_recovery` TEXT DEFAULT '', + `field2_recovery` TEXT DEFAULT '', + `field3_recovery` TEXT DEFAULT '', + `field4_recovery` TEXT DEFAULT '', + `field5_recovery` TEXT DEFAULT '', + `field6_recovery` TEXT DEFAULT '', + `field7_recovery` TEXT DEFAULT '', + `field8_recovery` TEXT DEFAULT '', + `field9_recovery` TEXT DEFAULT '', + `field10_recovery` TEXT DEFAULT '', `id_group` MEDIUMINT UNSIGNED NULL DEFAULT 0, `internal_counter` INT DEFAULT 0, `last_fired` BIGINT NOT NULL DEFAULT 0, From bad033550227191db570d05193b18eee4bb8706b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 16 Jun 2022 11:14:29 +0200 Subject: [PATCH 07/17] Changed styles --- pandora_console/include/styles/alert.css | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 15f8cb367e..74820af632 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -94,6 +94,7 @@ form#advanced_filters_alert textarea { flex: 1 1 auto; height: 5em; min-height: 5em; + width: 2em; } form#advanced_filters_alert ul li label img { From 6f49f63353a4cdbdf64a89768cc0cdfc5984cbbb Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Thu, 16 Jun 2022 14:09:30 +0200 Subject: [PATCH 08/17] fixed VC pandora_enterprise#8888 --- .../include/functions_visual_map.php | 2 +- .../include/javascript/pandora_dashboards.js | 19 +++++++++++++++++-- pandora_console/mobile/include/ui.class.php | 3 +-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 1ea7b0335c..fd01d5dad8 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -4566,7 +4566,7 @@ function css_label_styles_visual_console($uniq, $ratio=1) $output .= '.c-'.$uniq.' a {color: #3f3f3f } '; $output .= '.c-'.$uniq.' .label p strong span {display: inline-block !important; line-height: normal !important} '; $output .= '.c-'.$uniq.' *:not(.parent_graph p table tr td span) { font-size: '.(8 * $ratio).'pt; line-height:'.(8 * ($ratio)).'pt; }'; - $output .= '.c-'.$uniq.' .visual-console-item-label table tr td { padding: 0; margin: 0; }'; + $output .= '.c-'.$uniq.' .visual-console-item-label table tr td { padding: 0; margin: 0; white-space: pre-wrap; }'; $output .= '.c-'.$uniq.' .visual_font_size_4pt, .c-'.$uniq.' .visual_font_size_4pt * { font-size: '.(4 * $ratio).'pt !important; line-height:'.(4 * ($ratio)).'pt !important; }'; $output .= '.c-'.$uniq.' .visual_font_size_6pt, .c-'.$uniq.' .visual_font_size_6pt * { font-size: '.(6 * $ratio).'pt !important; line-height:'.(6 * ($ratio)).'pt !important; }'; $output .= '.c-'.$uniq.' .visual_font_size_8pt, .c-'.$uniq.' .visual_font_size_8pt * { font-size: '.(8 * $ratio).'pt !important; line-height:'.(8 * ($ratio)).'pt !important; }'; diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index 45cc55759c..8f4740aaca 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -1223,6 +1223,8 @@ function dashboardLoadVC(settings) { var ratio_visualconsole = props.height / props.width; var ratio_w = size.width / props.width; var ratio_h = size.height / props.height; + var acum_height = props.height; + var acum_width = props.width; props.width = size.width; props.height = size.width * ratio_visualconsole; @@ -1235,6 +1237,11 @@ function dashboardLoadVC(settings) { props.height = size.height; props.width = size.height / ratio_visualconsole; } + } else { + ratio = ratio_w; + var height = (acum_height * size.width) / acum_width; + props.height = height; + props.width = height / ratio_visualconsole; } } else { if (props.height > size.height) { @@ -1290,22 +1297,30 @@ function dashboardLoadVC(settings) { var regex_hash = /(hash=)[^&]+(&?)/gi; var replacement_hash = "$1" + props.hash + "$2"; + /* var regex_width = /(width=)[^&]+(&?)/gi; var replacement_width = "$1" + size.width + "$2"; var regex_height = /(height=)[^&]+(&?)/gi; var replacement_height = "$1" + (size.height + headerMobileFix) + "$2"; + */ // Change the URL (if the browser has support). if ("history" in window) { var href = window.location.href.replace(regex, replacement); href = href.replace(regex_hash, replacement_hash); - href = href.replace(regex_width, replacement_width); - href = href.replace(regex_height, replacement_height); + //href = href.replace(regex_width, replacement_width); + //href = href.replace(regex_height, replacement_height); window.history.replaceState({}, document.title, href); } + if (props.height > props.width) { + $(".container-center").css("overflow", "auto"); + } else { + $(".container-center").css("overflow", "inherit"); + } + container.classList.remove("cv-overflow"); // View title. diff --git a/pandora_console/mobile/include/ui.class.php b/pandora_console/mobile/include/ui.class.php index 1123839a6c..af9f4d7a95 100755 --- a/pandora_console/mobile/include/ui.class.php +++ b/pandora_console/mobile/include/ui.class.php @@ -1004,11 +1004,10 @@ class Ui $(document).ready(function () { dashboardLoadVC(settings); if(settings.mobile_view_orientation_vc === false) { - //$(".container-center").css("transform", "rotate(90deg)"); - //$(".container-center").css("margin-top", "40px"); $("#main_page > .ui-content").css("display", "block"); $(".container-center").css("padding", "50% 0"); + $(".container-center").css("height", "100vh"); $(".visual-console-container-dashboard").css("display", "block"); $(".visual-console-container-dashboard").css("transform-origin", "left top"); $(".visual-console-container-dashboard").css("transform", "rotate(-90deg) translate(-100%)"); From 6d70353254c58d82b804c918a479c7006fdb462d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= <79-jose.gonzalez@users.noreply.brutus.artica.es> Date: Thu, 16 Jun 2022 16:09:05 +0000 Subject: [PATCH 09/17] Fix mistake --- pandora_console/extras/mr/55.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/extras/mr/55.sql b/pandora_console/extras/mr/55.sql index b9c87d8af7..b006649dd8 100644 --- a/pandora_console/extras/mr/55.sql +++ b/pandora_console/extras/mr/55.sql @@ -44,7 +44,7 @@ ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` text DEFAULT '' AFTER `f ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` text DEFAULT '' AFTER `field5_recovery`; ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` text DEFAULT '' AFTER `field6_recovery`; ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` text DEFAULT '' AFTER `field7_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field0_recovery` text DEFAULT '' AFTER `field8_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field9_recovery` text DEFAULT '' AFTER `field8_recovery`; ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` text DEFAULT '' AFTER `field9_recovery`; SET @st_oum763 = (SELECT IF( From 93b9e6142e7e320bc93d0aed4c49f2b603cf5c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 17 Jun 2022 09:00:35 +0200 Subject: [PATCH 10/17] DB Changes #8912 --- pandora_console/extras/mr/55.sql | 16 ++++++++-------- pandora_console/pandoradb.sql | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pandora_console/extras/mr/55.sql b/pandora_console/extras/mr/55.sql index b9c87d8af7..882b822f88 100644 --- a/pandora_console/extras/mr/55.sql +++ b/pandora_console/extras/mr/55.sql @@ -38,14 +38,14 @@ ALTER TABLE `tbackup` MODIFY COLUMN `id_user` VARCHAR(255) DEFAULT ''; ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0; ALTER TABLE `tdashboard` MODIFY `name` TEXT NOT NULL DEFAULT ''; -ALTER TABLE `tevent_alert` ADD COLUMN `field1_recovery` text DEFAULT '' AFTER `recovery_notify`; -ALTER TABLE `tevent_alert` ADD COLUMN `field4_recovery` text DEFAULT '' AFTER `field3_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` text DEFAULT '' AFTER `field4_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` text DEFAULT '' AFTER `field5_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` text DEFAULT '' AFTER `field6_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` text DEFAULT '' AFTER `field7_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field0_recovery` text DEFAULT '' AFTER `field8_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` text DEFAULT '' AFTER `field9_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field1_recovery` TEXT AFTER `recovery_notify`; +ALTER TABLE `tevent_alert` ADD COLUMN `field4_recovery` TEXT AFTER `field3_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` TEXT AFTER `field4_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` TEXT AFTER `field5_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` TEXT AFTER `field6_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` TEXT AFTER `field7_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field9_recovery` TEXT AFTER `field8_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` TEXT AFTER `field9_recovery`; SET @st_oum763 = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tautoconfig' AND table_schema = DATABASE() AND column_name = 'disabled') > 0, diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 37c58a0d4a..2fff33a003 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3016,16 +3016,16 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` ( `saturday` TINYINT DEFAULT 1, `sunday` TINYINT DEFAULT 1, `recovery_notify` TINYINT DEFAULT 0, - `field1_recovery` TEXT DEFAULT '', - `field2_recovery` TEXT DEFAULT '', - `field3_recovery` TEXT DEFAULT '', - `field4_recovery` TEXT DEFAULT '', - `field5_recovery` TEXT DEFAULT '', - `field6_recovery` TEXT DEFAULT '', - `field7_recovery` TEXT DEFAULT '', - `field8_recovery` TEXT DEFAULT '', - `field9_recovery` TEXT DEFAULT '', - `field10_recovery` TEXT DEFAULT '', + `field1_recovery` TEXT, + `field2_recovery` TEXT, + `field3_recovery` TEXT, + `field4_recovery` TEXT, + `field5_recovery` TEXT, + `field6_recovery` TEXT, + `field7_recovery` TEXT, + `field8_recovery` TEXT, + `field9_recovery` TEXT, + `field10_recovery` TEXT, `id_group` MEDIUMINT UNSIGNED NULL DEFAULT 0, `internal_counter` INT DEFAULT 0, `last_fired` BIGINT NOT NULL DEFAULT 0, From 7edd4335666ed87eac1225f2909d6f226c933d25 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 17 Jun 2022 10:21:06 +0200 Subject: [PATCH 11/17] Add recovery support for correlation alerts. --- pandora_server/lib/PandoraFMS/Core.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index acc4d83546..b33d0f95da 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -506,7 +506,7 @@ B: ########################################################################## sub pandora_evaluate_alert ($$$$$$$;$$$$) { my ($pa_config, $agent, $data, $last_status, $alert, $utimestamp, $dbh, - $last_data_value, $correlatedItems, $event, $log) = @_; + $last_data_value, $correlated_items, $event, $log) = @_; if (defined ($agent)) { logger ($pa_config, "Evaluating alert '" . safe_output($alert->{'name'}) . "' for agent '" . safe_output ($agent->{'nombre'}) . "'.", 10); @@ -604,13 +604,16 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) { # Cease on valid data $status = 3; - + + # Unlike module alerts, correlated alerts recover when they cease! + $status = 4 if ($alert->{'recovery_notify'} == 1 && !defined($alert->{'id_template_module'})); + # Always reset ($alert->{'internal_counter'}, $alert->{'times_fired'}) = (0, 0); } # Recover takes precedence over cease - $status = 4 if ($alert->{'recovery_notify'} == 1); + $status = 4 if ($alert->{'recovery_notify'} == 1 && defined ($alert->{'id_template_module'})); } elsif ($utimestamp > $limit_utimestamp && $alert->{'internal_counter'} > 0) { @@ -691,7 +694,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) { $pa_config, $dbh, $alert, - $correlatedItems, + $correlated_items, $event, $log ] From 275fd2ed19a565b770ff74cd6ee5a42143bf07af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 20 Jun 2022 16:20:49 +0200 Subject: [PATCH 12/17] Fix minor issues related with pandorawmic --- pandora_console/godmode/setup/performance.php | 2 +- .../include/class/AgentWizard.class.php | 75 +++++++++++-------- 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index a2851b568c..1246cd8abc 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -667,7 +667,7 @@ $table_other->data[$i++][1] = html_print_input_text( $config['wmiBinary'], '', 50, - 10, + 50, true ); diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 0cf4afaeab..7cc44f2d4b 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -2814,7 +2814,7 @@ class AgentWizard extends HTML // Unpack the query filters. $queryFilters = json_decode($module['query_filters'], true); // Name of query filter field. - $fieldValueName = $fieldSet[$queryFilters['field']]; + $fieldValueName = (empty($fieldSet[$queryFilters['field']]) === false) ? $fieldSet[$queryFilters['field']] : '1'; // Evaluate type of scan and execution. if ($module['scan_type'] == SCAN_TYPE_FIXED) { @@ -2900,6 +2900,7 @@ class AgentWizard extends HTML $dataCombined = array_combine($columnsList, $rowList); // Change the macros for values. foreach ($dataCombined as $macroKey => $macroValue) { + $macroKey = trim($macroKey); if (preg_match('/_'.$macroKey.'_/', $valueOperation) !== 0) { $valueOperation = preg_replace( '/_'.$macroKey.'_/', @@ -3003,6 +3004,7 @@ class AgentWizard extends HTML ); // Change the macros for values. foreach ($dataCombined as $macroKey => $macroValue) { + $macroKey = trim($macroKey); if (preg_match('/_'.$macroKey.'_/', $valueOperation) !== 0) { $valueOperation = preg_replace( '/_'.$macroKey.'_/', @@ -3030,39 +3032,48 @@ class AgentWizard extends HTML } } - // Create the final table with all of data received. - foreach ($moduleBlocks as $module) { - // Prepare the blocks. If its new, create a new index. - if (key_exists($module['group'], $blockTables) === false) { - $blockTables[$module['group']] = [ - 'name' => $module['group_name'], - 'data' => [], - ]; + // If we not retrieve information (P.E. connection refused). + if (empty($moduleBlocks) === true) { + $this->message['type'][] = 'warning'; + $this->message['message'][] = __( + 'No information could be retrieved.' + ); + $this->showMessage(); + } else { + // Create the final table with all of data received. + foreach ($moduleBlocks as $module) { + // Prepare the blocks. If its new, create a new index. + if (key_exists($module['group'], $blockTables) === false) { + $blockTables[$module['group']] = [ + 'name' => $module['group_name'], + 'data' => [], + ]; + } + + // Add the module info in the block. + $blockTables[$module['group']]['data'][] = $module; + if (isset($blockTables[$module['group']]['activeModules']) === false + && (int) $module['module_enabled'] === 1 + ) { + $blockTables[$module['group']]['activeModules'] = 2; + } else if (isset($blockTables[$module['group']]['activeModules']) === true + && (int) $module['module_enabled'] === 0 + ) { + $blockTables[$module['group']]['activeModules'] = 1; + } } - // Add the module info in the block. - $blockTables[$module['group']]['data'][] = $module; - if (isset($blockTables[$module['group']]['activeModules']) === false - && (int) $module['module_enabled'] === 1 - ) { - $blockTables[$module['group']]['activeModules'] = 2; - } else if (isset($blockTables[$module['group']]['activeModules']) === true - && (int) $module['module_enabled'] === 0 - ) { - $blockTables[$module['group']]['activeModules'] = 1; - } + // General Default monitoring. + html_print_div( + [ + 'class' => 'wizard wizard-result', + 'style' => 'margin-top: 20px;', + 'content' => $this->toggleTableModules($blockTables), + ] + ); + // Add Create Modules form. + $this->createModulesForm(); } - - // General Default monitoring. - html_print_div( - [ - 'class' => 'wizard wizard-result', - 'style' => 'margin-top: 20px;', - 'content' => $this->toggleTableModules($blockTables), - ] - ); - // Add Create Modules form. - $this->createModulesForm(); } @@ -5544,13 +5555,13 @@ class AgentWizard extends HTML string $unit='', ?int $type=0 ) { + $output = ''; try { // Avoid non-numeric or arithmetic chars for security reasons. if (preg_match('/(([^0-9\s\+\-\*\/\(\).,])+)/', $operation) === 1) { throw new Exception(sprintf(__("The operation '%s' is not permitted. Review for remote components."), $operation)); } else { // Get the result of the operation and set it. - $output = ''; eval('$output = '.$operation.';'); // If this module has unit, attach to current value. $output = $this->replacementUnit( From 036505fa68918f622a9ec2adfabf4f67dd3d6612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Tue, 21 Jun 2022 09:38:13 +0200 Subject: [PATCH 13/17] Fix DB issue --- pandora_console/extras/mr/55.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/extras/mr/55.sql b/pandora_console/extras/mr/55.sql index b006649dd8..882b822f88 100644 --- a/pandora_console/extras/mr/55.sql +++ b/pandora_console/extras/mr/55.sql @@ -38,14 +38,14 @@ ALTER TABLE `tbackup` MODIFY COLUMN `id_user` VARCHAR(255) DEFAULT ''; ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0; ALTER TABLE `tdashboard` MODIFY `name` TEXT NOT NULL DEFAULT ''; -ALTER TABLE `tevent_alert` ADD COLUMN `field1_recovery` text DEFAULT '' AFTER `recovery_notify`; -ALTER TABLE `tevent_alert` ADD COLUMN `field4_recovery` text DEFAULT '' AFTER `field3_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` text DEFAULT '' AFTER `field4_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` text DEFAULT '' AFTER `field5_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` text DEFAULT '' AFTER `field6_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` text DEFAULT '' AFTER `field7_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field9_recovery` text DEFAULT '' AFTER `field8_recovery`; -ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` text DEFAULT '' AFTER `field9_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field1_recovery` TEXT AFTER `recovery_notify`; +ALTER TABLE `tevent_alert` ADD COLUMN `field4_recovery` TEXT AFTER `field3_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field5_recovery` TEXT AFTER `field4_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field6_recovery` TEXT AFTER `field5_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field7_recovery` TEXT AFTER `field6_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field8_recovery` TEXT AFTER `field7_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field9_recovery` TEXT AFTER `field8_recovery`; +ALTER TABLE `tevent_alert` ADD COLUMN `field10_recovery` TEXT AFTER `field9_recovery`; SET @st_oum763 = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tautoconfig' AND table_schema = DATABASE() AND column_name = 'disabled') > 0, From 1330cb8881bc6fae1367422cdc1836c87342bf67 Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 21 Jun 2022 10:45:34 +0200 Subject: [PATCH 14/17] Fix discovery snmp v3 bugs --- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index cd0fa787a7..3297f3ec9b 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -835,7 +835,7 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'id_modulo' => 2, 'name' => $if_name."_ifHCOutOctets", 'descripcion' => safe_input( - 'The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifOutOctets.' + 'The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.' ), 'ip_target' => $device, 'tcp_send' => $self->{'task_data'}{'snmp_version'}, @@ -862,7 +862,7 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'id_modulo' => 2, 'name' => $if_name."_ifOutOctets", 'descripcion' => safe_input( - 'The total number of octets received on the interface, including framing characters.' + 'The total number of octets transmitted out of the interface, including framing characters.' ), 'ip_target' => $device, 'tcp_send' => $self->{'task_data'}{'snmp_version'}, @@ -903,7 +903,7 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { # Interface index filter. $macros->{'5'}->{'value'} = $if_index; # SecurityName. - $macros->{'6'}->{'value'} = $self->{'task_data'}->{'snmp_auth_method'}; + $macros->{'6'}->{'value'} = $self->{'task_data'}->{'snmp_auth_user'}; # SecurityContext. $macros->{'7'}->{'value'} = $community; # SecurityLevel. @@ -930,7 +930,7 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'id_tipo_modulo' => 1, 'id_modulo' => 4, 'name' => $if_name."_Bandwith", - 'description' => safe_input( + 'descripcion' => safe_input( 'Amount of digital information sent and received from this interface over a particular time', ), 'unit' => '%', @@ -958,9 +958,9 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { { 'id_tipo_modulo' => 1, 'id_modulo' => 4, - 'name' => $if_name."_outUsage", - 'description' => safe_input( - 'Bandwidth usage received from this interface over a particular time', + 'name' => $if_name."_inUsage", + 'descripcion' => safe_input( + 'Bandwidth usage received into this interface over a particular time', ), 'unit' => '%', 'macros' => p_encode_json($self->{'config'}, $macros), @@ -988,7 +988,7 @@ sub PandoraFMS::Recon::Base::create_interface_modules($$) { 'id_tipo_modulo' => 1, 'id_modulo' => 4, 'name' => $if_name."_outUsage", - 'description' => safe_input( + 'descripcion' => safe_input( 'Bandwidth usage sent from this interface over a particular time', ), 'unit' => '%', From 38ecfd5b62f51c61efbadfff51042226f4ff5d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Wed, 22 Jun 2022 14:25:08 +0200 Subject: [PATCH 15/17] Added message for control return code in WMI --- .../include/class/AgentWizard.class.php | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php index 7cc44f2d4b..382fa2fca9 100644 --- a/pandora_console/include/class/AgentWizard.class.php +++ b/pandora_console/include/class/AgentWizard.class.php @@ -1098,19 +1098,26 @@ class AgentWizard extends HTML // the host is Windows (and allow WMI). $commandQuery = $this->wmiCommand; $commandQuery .= ' "SELECT Caption FROM Win32_ComputerSystem"'; - // Execute the wmic command. + // Declare the vars. $result = []; - exec($commandQuery, $result); - $execCorrect = true; + $returnVar = 0; $tmpError = ''; - - // Look for the response if we have ERROR messages. - foreach ($result as $info) { - if (preg_match('/ERROR:/', $info) !== 0) { - $execCorrect = false; - $tmpError = strrchr($info, 'ERROR:'); - break; + $execCorrect = true; + // Execute the command. + exec($commandQuery, $result, $returnVar); + // Only is valid if return code is 0. + if ($returnVar === 0) { + // Look for the response if we have ERROR messages. + foreach ($result as $info) { + if (preg_match('/ERROR:/', $info) !== 0) { + $execCorrect = false; + $tmpError = strrchr($info, 'ERROR:'); + break; + } } + } else { + $tmpError = sprintf('Return Code %s', $returnVar); + $execCorrect = false; } // FOUND ERRORS: TIMEOUT. @@ -2849,13 +2856,13 @@ class AgentWizard extends HTML // If name of the module have a macro. $moduleBlocks[$k]['name'] = $this->macroFilter( - $module['name'], + io_safe_output($module['name']), $columnsList, $rowList ); // Description can have macros too. $moduleBlocks[$k]['description'] = $this->macroFilter( - $module['description'], + io_safe_output($module['description']), $columnsList, $rowList ); @@ -2867,7 +2874,7 @@ class AgentWizard extends HTML ); foreach ($columnsList as $columnKey => $columnValue) { - $macros['macros']['_'.$columnValue.'_'] = $rowList[$columnKey]; + $macros['macros']['_'.trim($columnValue).'_'] = $rowList[trim($columnKey)]; } $moduleBlocks[$k]['macros'] = json_encode($macros); @@ -2946,19 +2953,19 @@ class AgentWizard extends HTML $rowList = explode('|', $rowContent); // If name of the module have a macro. $newModule['name'] = $this->macroFilter( - $module['name'], + io_safe_output($module['name']), $columnsList, $rowList ); // Description can have macros too. $newModule['description'] = $this->macroFilter( - $module['description'], + io_safe_output($module['description']), $columnsList, $rowList ); $newModule['query_filters'] = $this->macroFilter( - $module['query_filters'], + io_safe_output($module['query_filters']), $columnsList, $rowList ); From 7854206edeb5e114f48a13975b27278a23dd0a03 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 23 Jun 2022 08:27:31 +0200 Subject: [PATCH 16/17] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh | 2 +- pandora_agents/unix/Darwin/dmg/extras/distribution.xml | 4 ++-- .../PandoraFMS agent uninstaller.app/Contents/Info.plist | 6 +++--- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.rhel7.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 53 files changed, 64 insertions(+), 64 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index cb45a7bd15..ef8ca498c6 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, AIX version +# Version 7.0NG.763, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index fa1ffa8133..d2c0f24d97 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, FreeBSD Version +# Version 7.0NG.763, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 1036c5ac99..8c95d1c74f 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, HP-UX Version +# Version 7.0NG.763, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 1dadeb7920..b93c5160c5 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, GNU/Linux +# Version 7.0NG.763, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 4562f53bac..2ee611a89f 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, GNU/Linux +# Version 7.0NG.763, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 00fa5178a7..b709ffa298 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, Solaris Version +# Version 7.0NG.763, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index a48eb35ce5..1f034d834d 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2021 Artica Soluciones Tecnologicas -# Version 7.0NG.762 +# Version 7.0NG.763 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software # Foundation; either version 2 of the Licence or any later version diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index d0e6d59918..1b8d89e078 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.762, AIX version +# Version 7.0NG.763, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 849edefe11..442a93f6e8 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.762 +# Version 7.0NG.763 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index e3ce77d2a8..3843656944 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.762, HPUX Version +# Version 7.0NG.763, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index af53f47562..2ac7522aa8 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762 +# Version 7.0NG.763 # Licensed under GPL license v2, # (c) 2003-2021 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 39ad8d5ad5..f2f6e7c873 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762 +# Version 7.0NG.763 # Licensed under GPL license v2, # (c) 2003-2021 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 402ff05149..9c2f026dbf 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762 +# Version 7.0NG.763 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index c6dea91d32..578dc0c8e3 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.762, Solaris version +# Version 7.0NG.763, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 85b4668cb5..62cd823d30 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.762, AIX version +# Version 7.0NG.763, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 85a29c3c75..ec83e273a0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.762-220623 +Version: 7.0NG.763 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 4aaad34b7a..1a643ebb3f 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.762-220623" +pandora_version="7.0NG.763" 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/Darwin/dmg/build_darwin_dmg.sh b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh index 5cbb605e1b..c144a8662c 100644 --- a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh +++ b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh @@ -31,7 +31,7 @@ fi if [ "$#" -ge 2 ]; then VERSION="$2" else - VERSION="7.0NG.762" + VERSION="7.0NG.763" fi # Path for the generated DMG file diff --git a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml index 534111e992..aac2c6f6f6 100644 --- a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml +++ b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml @@ -19,11 +19,11 @@ - pandorafms_src.pdk + pandorafms_src.pdk - pandorafms_uninstall.pdk + pandorafms_uninstall.pdk