Simplify the implementation of IPv6 data ingestion

This commit is contained in:
Yifan Gao 2024-04-01 17:58:16 +08:00
parent a57f02534c
commit 42909f8965

View File

@ -28,10 +28,7 @@ prepare_data_v4(){
log_info "finish bgpdump v4"
}
prepare_data_v6(){
IP6UPSTREAM="http://archive.routeviews.org/route-views6/bgpdata"
MONTH6=$(date -u +%Y.%m)
LATEST6=$(lftp -e 'cls -1;exit' $IP6UPSTREAM/$MONTH6/RIBS/ 2>/dev/null | sort | tail -n 1)
curl -sSLo rib6.bz2 "$IP6UPSTREAM/$MONTH6/RIBS/$LATEST6"
bgpkit-broker latest -c route-views6 --json | jq -c '.[] | select( .data_type | contains("rib")) | .url' | head -n 1 | xargs curl -sSL -o rib6.bz2
stat rib6.bz2
log_info "runing bgpdump v6 ..."
bgpdump -m -O rib6.txt rib6.bz2