From 5cede7643725a2bd92b239c8bcec14fc1f2ec2b6 Mon Sep 17 00:00:00 2001 From: Sergei A Mamonov Date: Mon, 8 Jun 2026 20:09:59 +0300 Subject: [PATCH 1/3] add set params for FASTNETMON_DO_NOT_CALCULATE_SPEED --- services/fastnetmon/custom-entry.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/fastnetmon/custom-entry.sh b/services/fastnetmon/custom-entry.sh index ac2022d..49a24ac 100755 --- a/services/fastnetmon/custom-entry.sh +++ b/services/fastnetmon/custom-entry.sh @@ -87,6 +87,14 @@ if [[ -f $WEB_API_PASSWORD_FILE ]]; then fi fi +if [[ "${FASTNETMON_DO_NOT_CALCULATE_SPEED}" == "1" ]];then + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_blocked_hosts_during_restart true + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_flow_spec_announces_during_restart true + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_traffic_counters_during_restart true + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main ipv4_automatic_data_cleanup disable + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main ipv6_automatic_data_cleanup disable +fi + FNM_NOT_UPLOAD_ASN_MAPPING="${FNM_NOT_UPLOAD_ASN_MAPPING:-false}" if [[ "${FNM_NOT_UPLOAD_ASN_MAPPING}" != "true" ]]; then echo "Download ASN mapping" From 88d3f278bc5482b595a24268de220cc6edbe600c Mon Sep 17 00:00:00 2001 From: Sergei A Mamonov Date: Mon, 8 Jun 2026 20:48:02 +0300 Subject: [PATCH 2/3] add FNM_IMPORT_CONFIGURATION_PATH to load configuration from backup --- services/fastnetmon/custom-entry.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/fastnetmon/custom-entry.sh b/services/fastnetmon/custom-entry.sh index 49a24ac..281075e 100755 --- a/services/fastnetmon/custom-entry.sh +++ b/services/fastnetmon/custom-entry.sh @@ -38,9 +38,14 @@ elif grep -q "Can't load configuration from configuration source" <<< "$OUTPUT"; # exit 1 fi +if [[ "${FNM_IMPORT_CONFIGURATION_PATH}" != "" ]]; then + echo "Import configuration from ${FNM_IMPORT_CONFIGURATION_PATH}" + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli import_configuration ${FNM_IMPORT_CONFIGURATION_PATH} +fi + if [[ ${FNM_GOBGP_HOST} != "" ]]; then - HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main gobgp_api_host ${FNM_GOBGP_HOST} - HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main gobgp enable + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main gobgp_api_host ${FNM_GOBGP_HOST} + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main gobgp enable fi # Enable clickhouse config @@ -88,6 +93,7 @@ if [[ -f $WEB_API_PASSWORD_FILE ]]; then fi if [[ "${FASTNETMON_DO_NOT_CALCULATE_SPEED}" == "1" ]];then + echo "Disable calculation for fastnetmon" HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_blocked_hosts_during_restart true HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_flow_spec_announces_during_restart true HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_traffic_counters_during_restart true From 8e282612cedf9099bc8115a0597312c26d4e2abe Mon Sep 17 00:00:00 2001 From: Sergei A Mamonov Date: Tue, 9 Jun 2026 13:53:30 +0300 Subject: [PATCH 3/3] add ipv4_remote_automatic_data_cleanup disable to FASTNETMON_DO_NOT_CALCULATE_SPEED mode --- services/fastnetmon/custom-entry.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/services/fastnetmon/custom-entry.sh b/services/fastnetmon/custom-entry.sh index 281075e..db33026 100755 --- a/services/fastnetmon/custom-entry.sh +++ b/services/fastnetmon/custom-entry.sh @@ -99,6 +99,7 @@ if [[ "${FASTNETMON_DO_NOT_CALCULATE_SPEED}" == "1" ]];then HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main keep_traffic_counters_during_restart true HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main ipv4_automatic_data_cleanup disable HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main ipv6_automatic_data_cleanup disable + HTTP_API_MODE=off OFFLINE_MODE=on /usr/bin/fcli set main ipv4_remote_automatic_data_cleanup disable fi FNM_NOT_UPLOAD_ASN_MAPPING="${FNM_NOT_UPLOAD_ASN_MAPPING:-false}"