Skip to content

Commit

Permalink
Set ARKIME_NODE_HOST from OS_HOST interface rather than default route
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Eaton <[email protected]>
  • Loading branch information
divinehawk authored and mmguero committed Sep 11, 2024
1 parent 3452580 commit ef5e672
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ if [[ -n $SUPERVISOR_PATH ]] && [[ -r "$SUPERVISOR_PATH"/arkime/config.ini ]]; t
fi

# identify node in session metadata for PCAP reachback
PRIMARY_IP=$(ip route get 255.255.255.255 | grep -Po '(?<=src )(\d{1,3}.){4}' | sed "s/ //g")
if [[ -n $OS_HOST ]]; then
PRIMARY_IP=$(ip route get $OS_HOST | grep -Po '(?<=src )(\d{1,3}.){4}' | sed "s/ //g")
else
PRIMARY_IP=$(ip route get 255.255.255.255 | grep -Po '(?<=src )(\d{1,3}.){4}' | sed "s/ //g")
fi
export ARKIME_NODE_NAME="$(hostname --long)"
export ARKIME_NODE_HOST="$PRIMARY_IP"

Expand Down

0 comments on commit ef5e672

Please sign in to comment.