Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions services/fastnetmon/custom-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -87,6 +92,16 @@ if [[ -f $WEB_API_PASSWORD_FILE ]]; then
fi
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
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}"
if [[ "${FNM_NOT_UPLOAD_ASN_MAPPING}" != "true" ]]; then
echo "Download ASN mapping"
Expand Down