From 7c85b530adaaaf18d10585762f0b3868e8f274e4 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 22 Mar 2023 12:49:39 +0100 Subject: [PATCH 1/2] Add support for the Enterprise Netflow Server. --- pandora_server/lib/PandoraFMS/Config.pm | 9 +++++++++ pandora_server/lib/PandoraFMS/Core.pm | 5 ++++- pandora_server/lib/PandoraFMS/Tools.pm | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index a826b7e573..60bab4ca43 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -553,6 +553,9 @@ 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 + # Check for UID0 if ($pa_config->{"quiet"} != 0){ if ($> == 0){ @@ -1313,6 +1316,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); + } } # end of loop for parameter # diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index b911f05b50..6078c59f01 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -293,7 +293,7 @@ our @ServerTypes = qw ( dataserver networkserver snmpconsole - reconserver + discoveryserver pluginserver predictionserver wmiserver @@ -304,6 +304,7 @@ our @ServerTypes = qw ( icmpserver snmpserver satelliteserver + transactionalserver mfserver syncserver wuxserver @@ -312,6 +313,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'); diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 590fdf2020..fb4b551a3a 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -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"; } From 31f9aa7b4b8fcb785ec290db8a28deb710fe37b9 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 22 Mar 2023 12:52:36 +0100 Subject: [PATCH 2/2] Add configuration options for the Netflow Server. --- pandora_server/conf/pandora_server.conf.new | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 21449c7df4..f77cde5c9f 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -736,3 +736,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 +