Merge branch 'develop' into ent-10864-conflicto-mergeo-fichero-ver_agentes-php

This commit is contained in:
Jonathan 2023-04-10 09:24:30 +02:00
commit 55fc0c57ad
39 changed files with 348 additions and 51 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.770-230405
Version: 7.0NG.770-230410
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.770-230405"
pandora_version="7.0NG.770-230410"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.770';
use constant AGENT_BUILD => '230405';
use constant AGENT_BUILD => '230410';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230405
%define release 230410
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230405
%define release 230410
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230405"
PI_BUILD="230410"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230405}
{230410}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.770 Build 230405")
#define PANDORA_VERSION ("7.0NG.770 Build 230410")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.770(Build 230405))"
VALUE "ProductVersion", "(7.0NG.770(Build 230410))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.770-230405
Version: 7.0NG.770-230410
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.770-230405"
pandora_version="7.0NG.770-230410"
package_pear=0
package_pandora=1

View File

@ -189,6 +189,12 @@ CREATE TABLE IF NOT EXISTS `tfavmenu_user` (
`section` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`));
ALTER TABLE `tnetflow_filter` ADD COLUMN `netflow_monitoring` TINYINT UNSIGNED NOT NULL default 0;
ALTER TABLE `tnetflow_filter` ADD COLUMN `traffic_max` INTEGER NOT NULL default 0;
ALTER TABLE `tnetflow_filter` ADD COLUMN `traffic_critical` float(20,2) NOT NULL default 0;
ALTER TABLE `tnetflow_filter` ADD COLUMN `traffic_warning` float(20,2) NOT NULL default 0;
ALTER TABLE `tnetflow_filter` ADD COLUMN `utimestamp` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `tnetflow_filter` ADD COLUMN `netflow_monitoring_interval` INT UNSIGNED NOT NULL DEFAULT 300;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('legacy_database_ha', 1);
COMMIT;

View File

@ -26,6 +26,17 @@
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
require_once $config['homedir'].'/include/functions_ui.php';
@ -94,6 +105,11 @@ if ($id) {
$src_port = $filter['src_port'];
$aggregate = $filter['aggregate'];
$advanced_filter = $filter['advanced_filter'];
$netflow_monitoring = $filter['netflow_monitoring'];
$traffic_max = $filter['traffic_max'];
$traffic_critical = $filter['traffic_critical'];
$traffic_warning = $filter['traffic_warning'];
$netflow_monitoring_interval = $filter['netflow_monitoring_interval'];
} else {
$name = '';
$assign_group = '';
@ -103,6 +119,11 @@ if ($id) {
$src_port = '';
$aggregate = 'dstip';
$advanced_filter = '';
$netflow_monitoring = false;
$traffic_max = 0;
$traffic_critical = 0;
$traffic_warning = 0;
$netflow_monitoring_interval = 300;
}
if ($update) {
@ -114,20 +135,31 @@ if ($update) {
$dst_port = get_parameter('dst_port', '');
$src_port = get_parameter('src_port', '');
$advanced_filter = get_parameter('advanced_filter', '');
$netflow_monitoring = (bool) get_parameter('netflow_monitoring', false);
$traffic_max = get_parameter('traffic_max', 0);
$traffic_critical = get_parameter('traffic_critical', 0);
$traffic_warning = get_parameter('traffic_warning', 0);
$netflow_monitoring_interval = get_parameter('netflow_monitoring_interval', 300);
if ($name == '') {
ui_print_error_message(__('Not updated. Blank name'));
} else {
$values = [
'id_sg' => $id,
'id_name' => $name,
'id_group' => $assign_group,
'aggregate' => $aggregate,
'ip_dst' => $ip_dst,
'ip_src' => $ip_src,
'dst_port' => $dst_port,
'src_port' => $src_port,
'advanced_filter' => $advanced_filter,
'id_sg' => $id,
'id_name' => $name,
'id_group' => $assign_group,
'aggregate' => $aggregate,
'ip_dst' => $ip_dst,
'ip_src' => $ip_src,
'dst_port' => $dst_port,
'src_port' => $src_port,
'advanced_filter' => $advanced_filter,
'netflow_monitoring' => $netflow_monitoring,
'traffic_max' => $traffic_max,
'traffic_critical' => $traffic_critical,
'traffic_warning' => $traffic_warning,
'netflow_monitoring_interval' => $netflow_monitoring_interval,
];
// Save filter args.
@ -152,16 +184,27 @@ if ($create) {
$dst_port = get_parameter('dst_port', '');
$src_port = get_parameter('src_port', '');
$advanced_filter = (string) get_parameter('advanced_filter', '');
$netflow_monitoring = (bool) get_parameter('netflow_monitoring', false);
$traffic_max = get_parameter('traffic_max', 0);
$traffic_critical = get_parameter('traffic_critical', 0);
$traffic_warning = get_parameter('traffic_warning', 0);
$netflow_monitoring_interval = get_parameter('netflow_monitoring_interval', 300);
$values = [
'id_name' => $name,
'id_group' => $assign_group,
'ip_dst' => $ip_dst,
'ip_src' => $ip_src,
'dst_port' => $dst_port,
'src_port' => $src_port,
'aggregate' => $aggregate,
'advanced_filter' => $advanced_filter,
'id_name' => $name,
'id_group' => $assign_group,
'ip_dst' => $ip_dst,
'ip_src' => $ip_src,
'dst_port' => $dst_port,
'src_port' => $src_port,
'aggregate' => $aggregate,
'advanced_filter' => $advanced_filter,
'netflow_monitoring' => $netflow_monitoring,
'traffic_max' => $traffic_max,
'traffic_critical' => $traffic_critical,
'traffic_warning' => $traffic_warning,
'netflow_monitoring_interval' => $netflow_monitoring_interval,
];
// Save filter args
@ -203,6 +246,8 @@ $table->data['first_line'][] = html_print_label_input_block(
false,
20,
80,
true,
false,
true
)
);
@ -329,6 +374,77 @@ $table->data['advanced_filters'][] = html_print_label_input_block(
);
// Netflow server options.
$table->colspan['netflow_monitoring'][] = 2;
$table->data['netflow_monitoring'][] = html_print_label_input_block(
__('Enable Netflow monitoring'),
html_print_checkbox_switch(
'netflow_monitoring',
1,
(bool) $netflow_monitoring,
true,
false,
'displayMonitoringFilter()'
).ui_print_input_placeholder(
__('Allows you to create an agent that monitors the traffic volume of this filter. It also creates a module that measures if the traffic of any IP of this filter exceeds a certain threshold. A text type module will be created with the traffic rate for each IP within this filter every five minutes (the 10 IP\'s with the most traffic). Only available for Enterprise version.'),
true
)
);
$table->data['netflow_server_filters'][] = html_print_label_input_block(
__('Netflow monitoring interval'),
html_print_input_number(
[
'step' => 1,
'name' => 'netflow_monitoring_interval',
'id' => 'netflow_monitoring_interval',
'value' => $netflow_monitoring_interval,
]
).ui_print_input_placeholder(__('Netflow monitoring interval in secs.'), true)
);
$table->data['netflow_server_filters'][] = html_print_label_input_block(
__('Maximum traffic value of the filter'),
html_print_input_number(
[
'step' => 1,
'name' => 'traffic_max',
'id' => 'traffic_max',
'value' => $traffic_max,
]
).ui_print_input_placeholder(__('Specifies the maximum rate (in bytes/sec) of traffic in the filter. It is then used to calculate the % of maximum traffic per IP.'), true)
);
$table->colspan['netflow_thresholds'][] = 1;
$table->data['netflow_thresholds'][] = html_print_label_input_block(
__('CRITICAL threshold for the maximum % of traffic for an IP.'),
html_print_input_number(
[
'step' => 0.01,
'name' => 'traffic_critical',
'id' => 'traffic_critical',
'value' => $traffic_critical,
'size' => 40,
'maxlength' => 80,
]
).ui_print_input_placeholder(__('If this % is exceeded by any IP within the filter, a CRITICAL status will be generated.'), true)
);
$table->data['netflow_thresholds'][] = html_print_label_input_block(
__('WARNING threshold for the maximum % of traffic for an IP.'),
html_print_input_number(
[
'step' => 0.01,
'name' => 'traffic_warning',
'id' => 'traffic_warning',
'value' => $traffic_warning,
'size' => 40,
'maxlength' => 80,
]
).ui_print_input_placeholder(__('If this % is exceeded by any IP within the filter, a WARNING status will be generated.'), true)
);
$hiddens = '';
if ($id) {
$buttonTitle = __('Update');
@ -368,10 +484,10 @@ html_print_action_buttons(
else {
displayAdvancedFilter ();
}
displayMonitoringFilter();
});
function displayAdvancedFilter () {
console.log('papapa advanced filter');
// Erase the normal filter
document.getElementById("text-ip_dst").value = '';
document.getElementById("text-ip_src").value = '';
@ -391,9 +507,9 @@ html_print_action_buttons(
};
function displayNormalFilter () {
console.log('papapa normal filter');
// Erase the advanced filter
document.getElementById("textarea_advanced_filter").value = '';
// Hide the advanced filter
//document.getElementById("table1-7").style.display = 'none';
$("#table1-advanced_filters").css("display", "none");
@ -407,4 +523,24 @@ html_print_action_buttons(
document.getElementById("table1-6").style.display = '';
*/
};
function displayMonitoringFilter () {
var checked = $('#checkbox-netflow_monitoring').prop('checked');
if(checked == false) {
// Reset values.
$("#netflow_monitoring_interval").val(300);
$("#traffic_max").val(0);
$("#traffic_critical").val(0);
$("#traffic_warning").val(0);
// Hide filters.
$("#table1-netflow_server_filters").hide();
$("#table1-netflow_thresholds").hide();
} else {
// Show filters.
$("#table1-netflow_server_filters").show();
$("#table1-netflow_thresholds").show();
}
};
</script>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="512px" height="512px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
<g><path style="opacity:0.991" fill="#000000" d="M 233.5,-0.5 C 248.167,-0.5 262.833,-0.5 277.5,-0.5C 366.072,10.0146 433.238,53.3479 479,129.5C 496.968,162.07 507.802,196.737 511.5,233.5C 511.5,248.167 511.5,262.833 511.5,277.5C 500.985,366.072 457.652,433.238 381.5,479C 348.93,496.968 314.263,507.802 277.5,511.5C 262.833,511.5 248.167,511.5 233.5,511.5C 144.928,500.985 77.7616,457.652 32,381.5C 14.0316,348.93 3.19825,314.263 -0.5,277.5C -0.5,262.833 -0.5,248.167 -0.5,233.5C 10.0146,144.928 53.3479,77.7616 129.5,32C 162.07,14.0316 196.737,3.19825 233.5,-0.5 Z M 254.5,39.5 C 256.193,40.4749 257.693,41.8082 259,43.5C 278.833,71.3333 298.667,99.1667 318.5,127C 304.504,127.5 290.504,127.667 276.5,127.5C 276.5,148.833 276.5,170.167 276.5,191.5C 262.5,191.5 248.5,191.5 234.5,191.5C 234.5,170.167 234.5,148.833 234.5,127.5C 220.496,127.667 206.496,127.5 192.5,127C 213.8,98.2136 234.466,69.0469 254.5,39.5 Z M 127.5,192.5 C 156.815,213.475 186.148,234.475 215.5,255.5C 186.245,276.377 157.078,297.377 128,318.5C 127.5,304.504 127.333,290.504 127.5,276.5C 106.167,276.5 84.8333,276.5 63.5,276.5C 63.5,262.5 63.5,248.5 63.5,234.5C 84.8333,234.5 106.167,234.5 127.5,234.5C 127.5,220.5 127.5,206.5 127.5,192.5 Z M 382.5,192.5 C 383.496,206.323 383.829,220.323 383.5,234.5C 404.833,234.5 426.167,234.5 447.5,234.5C 447.5,248.5 447.5,262.5 447.5,276.5C 426.167,276.5 404.833,276.5 383.5,276.5C 383.667,290.504 383.5,304.504 383,318.5C 353.922,297.377 324.755,276.377 295.5,255.5C 324.744,234.723 353.744,213.723 382.5,192.5 Z M 234.5,319.5 C 248.5,319.5 262.5,319.5 276.5,319.5C 276.5,340.833 276.5,362.167 276.5,383.5C 290.504,383.333 304.504,383.5 318.5,384C 297.377,413.078 276.377,442.245 255.5,471.5C 234.623,442.245 213.623,413.078 192.5,384C 206.496,383.5 220.496,383.333 234.5,383.5C 234.5,362.167 234.5,340.833 234.5,319.5 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -3245,7 +3245,7 @@ class NetworkMap
$table->data['template_row']['node_target'] = '';
$table->data['template_row']['edit'] = '';
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/pixel_green.png', true, ['class' => 'main_menu_icon']).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true).'</span>';
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/pixel_green.png', true, ['class' => 'circle-relations']).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true, ['class' => 'circle-relations']).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true, ['class' => 'circle-relations']).'</span>';
// <span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/edit.svg', true, ['class' => 'invert_filter']).'</a></span>';
$table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter', 'style' => 'padding: 10px']).'</a>';

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC230405';
$build_version = 'PC230410';
$pandora_version = 'v7.0NG.770';
// Do not overwrite default timezone set if defined.

View File

@ -440,6 +440,7 @@ define('SERVER_TYPE_MIGRATION', 20);
define('SERVER_TYPE_ALERT', 21);
define('SERVER_TYPE_CORRELATION', 22);
define('SERVER_TYPE_NCM', 23);
define('SERVER_TYPE_NETFLOW', 24);
// REPORTS.
define('REPORT_TOP_N_MAX', 1);

View File

@ -860,6 +860,19 @@ function servers_get_info($id_server=-1)
$id_modulo = 0;
break;
case SERVER_TYPE_NETFLOW:
$server['img'] = html_print_image(
'images/netflow@svg.svg',
true,
[
'title' => __('Netflow server'),
'class' => 'main_menu_icon invert_filter',
]
);
$server['type'] = 'netflow';
$id_modulo = 0;
break;
default:
$server['img'] = '';
$server['type'] = 'unknown';

View File

@ -844,7 +844,7 @@ function edit_node(data_node, dblClick) {
"update_fictional_node(" + node_selected.id_db + ");"
);
$("#node_options-node_name-2 input").attr(
$("#button-upd_only_node").attr(
"onclick",
"update_node_name(" + node_selected.id_db + ");"
);

View File

@ -37,3 +37,8 @@
.holding_area_link {
stroke-dasharray: 12, 3;
}
img.circle-relations {
width: 12px;
border-radius: 50%;
}

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.770';
$build = '230405';
$build = '230410';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -156,7 +156,6 @@ if ($ag_freestring !== '' || $moduletype !== '' || $datatype !== ''
$userRequest = (bool) get_parameter('uptbutton');
if ($userRequest === false) {
$autosearch = true;
$status = AGENT_MODULE_STATUS_NOT_NORMAL;
}
if (is_metaconsole() === false) {

View File

@ -93,7 +93,12 @@ $filter['ip_src'] = get_parameter('ip_src', '');
$filter['dst_port'] = get_parameter('dst_port', '');
$filter['src_port'] = get_parameter('src_port', '');
$filter['advanced_filter'] = get_parameter('advanced_filter', '');
$filter['router_ip'] = get_parameter('router_ip');
$filter['netflow_monitoring'] = (bool) get_parameter('netflow_monitoring');
$filter['netflow_monitoring_interval'] = (int) get_parameter('netflow_monitoring_interval', 300);
$filter['traffic_max'] = get_parameter('traffic_max', 0);
$filter['traffic_critical'] = get_parameter('traffic_critical', 0);
$filter['traffic_warning'] = get_parameter('traffic_warning', 0);
// Read chart configuration.
$chart_type = get_parameter('chart_type', 'netflow_area');
@ -360,6 +365,67 @@ $advanced_toggle .= '<td colspan="2">'.$radio_buttons.'</td>';
$advanced_toggle .= '<td><b>'.__('Source ip').'</b></td>';
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('router_ip', $filter['router_ip'], false, 40, 80, true).'</td>';
$advanced_toggle .= '</tr>';
// Netflow server options.
$advanced_toggle .= '<tr>';
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Enable Netflow monitoring').ui_print_help_tip(__('Allows you to create an agent that monitors the traffic volume of this filter. It also creates a module that measures if the traffic of any IP of this filter exceeds a certain threshold. A text type module will be created with the traffic rate for each IP within this filter every five minutes (the 10 IP\'s with the most traffic). Only available for Enterprise version.'), true).'</td>';
$advanced_toggle .= '<td colspan="2">'.html_print_checkbox_switch(
'netflow_monitoring',
1,
(bool) $filter['netflow_monitoring'],
true,
false,
'displayMonitoringFilter()',
).'</td>';
$advanced_toggle .= '<tr id="netlofw_monitoring_filters">';
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Netflow monitoring interval').ui_print_help_tip(__('Netflow monitoring interval in secs.'), true).'</td>';
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
[
'step' => 1,
'name' => 'netflow_monitoring_interval',
'id' => 'netflow_monitoring_interval',
'value' => $filter['netflow_monitoring_interval'],
]
).'</td>';
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Maximum traffic value of the filter').ui_print_help_tip(__('Specifies the maximum rate (in bytes/sec) of traffic in the filter. It is then used to calculate the % of maximum traffic per IP.'), true).'</td>';
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
[
'step' => 1,
'name' => 'traffic_max',
'id' => 'traffic_max',
'value' => $filter['traffic_max'],
]
).'</td>';
$advanced_toggle .= '</tr>';
$advanced_toggle .= '<tr id="netlofw_monitoring_thresholds">';
$advanced_toggle .= "<td style='font-weight:bold;'>".__('CRITICAL threshold for the maximum % of traffic for an IP.').ui_print_help_tip(__('If this % is exceeded by any IP within the filter, a CRITICAL status will be generated.'), true).'</td>';
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
[
'step' => 0.01,
'name' => 'traffic_critical',
'id' => 'traffic_critical',
'value' => $filter['traffic_critical'],
]
).'</td>';
$advanced_toggle .= "<td style='font-weight:bold;'>".__('WARNING threshold for the maximum % of traffic of an IP.').ui_print_help_tip(__('If this % is exceeded by any IP within the filter, a WARNING status will be generated.'), true).'</td>';
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
[
'step' => 0.01,
'name' => 'traffic_warning',
'id' => 'traffic_warning',
'value' => $filter['traffic_warning'],
]
).'</td>';
$advanced_toggle .= '</tr>';
$advanced_toggle .= '</table>';
@ -713,6 +779,26 @@ ui_include_time_picker();
// Show the normal filter
$(".filter_normal").show();
};
function displayMonitoringFilter () {
var checked = $('#checkbox-netflow_monitoring').prop('checked');
if(checked == false) {
// Reset values.
$("#netflow_monitoring_interval").val(300);
$("#traffic_max").val(0);
$("#traffic_critical").val(0);
$("#traffic_warning").val(0);
// Hide filters.
$("#netlofw_monitoring_filters").hide();
$("#netlofw_monitoring_thresholds").hide();
} else {
// Show filters.
$("#netlofw_monitoring_filters").show();
$("#netlofw_monitoring_thresholds").show();
}
}
// Ask the user to define a name for the filter in order to save it
function defineFilterName () {
@ -736,7 +822,6 @@ ui_include_time_picker();
$("#filter_id").change(function () {
var filter_type;
// Hide information and name/group row
$(".filter_save").hide();
@ -755,6 +840,12 @@ ui_include_time_picker();
$("#text-router_ip").val('');
$("#textarea_advanced_filter").val('');
$("#aggregate").val('');
$("#traffic_max").val('');
$("#traffic_critical").val('');
$("#traffic_warning").val('');
$("#netflow_monitoring_interval").val(300);
$('#checkbox-netflow_monitoring').prop('checked', false);
// Hide update filter button
$("#submit-update_button").hide();
@ -824,18 +915,31 @@ ui_include_time_picker();
$("#textarea_advanced_filter").val(val);
if (i == 'aggregate')
$("#aggregate").val(val);
if (i == 'netflow_monitoring')
$("#checkbox-netflow_monitoring").prop('checked', val == "0" ? false : true);
// Hide or show monitoring filters.
displayMonitoringFilter();
if (i == 'netflow_monitoring_interval')
$("#netflow_monitoring_interval").val(val);
if (i == 'traffic_max')
$("#traffic_max").val(val);
if (i == 'traffic_critical')
$("#traffic_critical").val(val);
if (i == 'traffic_warning')
$("#traffic_warning").val(val);
});
}
<?php echo ', "json");'; ?>
// Shows update filter button
$("#submit-update_button").show();
}
});
$(document).ready( function() {
displayMonitoringFilter();
// Update visibility of controls.
nf_view_click_period();
// Hide update filter button

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
%define release 230405
%define release 230410
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
%define release 230405
%define release 230410
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
%define release 230405
%define release 230410
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -2185,6 +2185,12 @@ CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
`advanced_filter` TEXT,
`filter_args` TEXT,
`aggregate` VARCHAR(60),
`netflow_monitoring` TINYINT UNSIGNED NOT NULL default 0,
`traffic_max` INTEGER NOT NULL default 0,
`traffic_critical` FLOAT(20,2) NOT NULL default 0,
`traffic_warning` FLOAT(20,2) NOT NULL default 0,
`netflow_monitoring_interval` INT UNSIGNED NOT NULL DEFAULT 300,
`utimestamp` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id_sg`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.770-230405
Version: 7.0NG.770-230410
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.770-230405"
pandora_version="7.0NG.770-230410"
package_cpan=0
package_pandora=1

View File

@ -764,3 +764,10 @@ tentacle_service_watchdog 1
# Enable (1) or disable (0) the parameter of mysql ssl certification (mysql_ssl_verify_server_cert) (enabled by default).
verify_mysql_ssl_cert 1
# Enable (1) or disable (0) the Pandora FMS Netflow Server (PANDORA FMS ENTERPRISE ONLY).
netflowserver 0
# Number of threads for the Pandora FMS Netflow Server (PANDORA FMS ENTERPRISE ONLY).
netflowserver_threads 1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.770";
my $pandora_build = "230405";
my $pandora_build = "230410";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -559,6 +559,8 @@ sub pandora_load_config {
$pa_config->{"unknown_block_size"} = 1000; # 7.0.769
$pa_config->{"netflowserver"} = 0; # 7.0.770
$pa_config->{"netflowserver_threads"} = 1; # 7.0.770
$pa_config->{"ha_mode"} = "pacemaker"; # 7.0.770
$pa_config->{"ha_file"} = undef; # 7.0.770
$pa_config->{"ha_hosts_file"} = '/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'; # 7.0.770
@ -1365,6 +1367,12 @@ sub pandora_load_config {
elsif ($parametro =~ m/^dataserver_smart_queue\s([0-1])/i) {
$pa_config->{'dataserver_smart_queue'} = clean_blank($1);
}
elsif ($parametro =~ m/^netflowserver\s([0-1])/i) {
$pa_config->{'netflowserver'} = clean_blank($1);
}
elsif ($parametro =~ m/^netflowserver_threads\s+([0-9]*)/i) {
$pa_config->{'netflowserver_threads'}= clean_blank($1);
}
elsif ($parametro =~ m/^ha_connect_retries\s+([0-9]*)/i) {
$pa_config->{'ha_connect_retries'} = clean_blank($1);
}

View File

@ -296,7 +296,7 @@ our @ServerTypes = qw (
dataserver
networkserver
snmpconsole
reconserver
discoveryserver
pluginserver
predictionserver
wmiserver
@ -307,6 +307,7 @@ our @ServerTypes = qw (
icmpserver
snmpserver
satelliteserver
transactionalserver
mfserver
syncserver
wuxserver
@ -315,6 +316,8 @@ our @ServerTypes = qw (
migrationserver
alertserver
correlationserver
ncmserver
netflowserver
);
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.770";
my $pandora_build = "230405";
my $pandora_build = "230410";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -78,6 +78,7 @@ our @EXPORT = qw(
PROVISIONINGSERVER
MIGRATIONSERVER
NCMSERVER
NETFLOWSERVER
METACONSOLE_LICENSE
OFFLINE_LICENSE
DISCOVERY_HOSTDEVICES
@ -202,6 +203,7 @@ use constant MIGRATIONSERVER => 20;
use constant ALERTSERVER => 21;
use constant CORRELATIONSERVER => 22;
use constant NCMSERVER => 23;
use constant NETFLOWSERVER => 24;
# Module status
use constant MODULE_NORMAL => 0;
@ -2844,6 +2846,8 @@ sub get_server_name {
return "MIGRATIONSERVER" if ($server_type eq MIGRATIONSERVER);
return "ALERTSERVER" if ($server_type eq ALERTSERVER);
return "CORRELATIONSERVER" if ($server_type eq CORRELATIONSERVER);
return "NCMSERVER" if ($server_type eq NCMSERVER);
return "NETFLOWSERVER" if ($server_type eq NETFLOWSERVER);
return "UNKNOWN";
}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
%define release 230405
%define release 230410
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
%define release 230405
%define release 230410
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230405"
PI_BUILD="230410"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.770 Build 230405";
my $version = "7.0NG.770 Build 230410";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.770 Build 230405";
my $version = "7.0NG.770 Build 230410";
# save program name for logging
my $progname = basename($0);