1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-06-09 05:16:17 +02:00

Breaking change in logging configuration. We've repalced our snowflake 'logging:' prefix by standard 'logging_'

This commit is contained in:
Pavel Odintsov 2022-10-15 13:01:28 +01:00
parent 62524d270d
commit f12ce5ed7b
2 changed files with 13 additions and 10 deletions

View File

@ -4,15 +4,18 @@
### Logging configuration
# Logging level, can be info or debug
logging_level = info
# enable this option if you want to send logs to local syslog facility
logging:local_syslog_logging = off
logging_local_syslog_logging = off
# enable this option if you want to send logs to a remote syslog server via UDP
logging:remote_syslog_logging = off
logging_remote_syslog_logging = off
# specify a custom server and port for remote logging
logging:remote_syslog_server = 10.10.10.10
logging:remote_syslog_port = 514
logging_remote_syslog_server = 10.10.10.10
logging_remote_syslog_port = 514
# To make FastNetMon better we need to know how you use it and what's your software and hardware platform.
# To accomplish this FastNetMon sends usage information every 1 hour to our statistics server https://community-stats.fastnetmon.com
@ -92,7 +95,6 @@ ban_for_icmp_pps = off
#
# Default option for port mirror capture on Linux
# AF_PACKET capture engine
# And please install birq for irq ditribution over cores
mirror_afpacket = off
# High efficient XDP based traffic capture method
@ -311,7 +313,7 @@ cli_stats_file_path = /tmp/fastnetmon.dat
# Path to file where we store IPv6 traffic information for fastnetmon_client
cli_stats_ipv6_file_path = /tmp/fastnetmon_ipv6.dat
# Enable gRPC api (required for fastnetmon_api_client tool)
# Enable gRPC API (required for fastnetmon_api_client tool)
enable_api = on
###
@ -320,5 +322,6 @@ enable_api = on
# Field used for sorting in client, valid values are: packets, bytes or flows
sort_parameter = packets
# How much IPs will be listed for incoming and outgoing channel eaters
max_ips_in_list = 7

View File

@ -480,19 +480,19 @@ void print_attack_details_to_file(std::string details, std::string client_ip_as_
logging_configuration_t read_logging_settings(configuration_map_t configuration_map) {
logging_configuration_t logging_configuration_temp;
if (configuration_map.count("logging:local_syslog_logging") != 0) {
if (configuration_map.count("logging_local_syslog_logging") != 0) {
logging_configuration_temp.local_syslog_logging = configuration_map["logging:local_syslog_logging"] == "on";
}
if (configuration_map.count("logging:remote_syslog_logging") != 0) {
if (configuration_map.count("logging_remote_syslog_logging") != 0) {
logging_configuration_temp.remote_syslog_logging = configuration_map["logging:remote_syslog_logging"] == "on";
}
if (configuration_map.count("logging:remote_syslog_server") != 0) {
if (configuration_map.count("logging_remote_syslog_server") != 0) {
logging_configuration_temp.remote_syslog_server = configuration_map["logging:remote_syslog_server"];
}
if (configuration_map.count("logging:remote_syslog_port") != 0) {
if (configuration_map.count("logging_remote_syslog_port") != 0) {
logging_configuration_temp.remote_syslog_port =
convert_string_to_integer(configuration_map["logging:remote_syslog_port"]);
}