Skip to content

ris-live

Stream BGP updates from RIPE RIS Live.

Synopsis

bgpipe [...] -- ris-live [OPTIONS]

Description

The ris-live stage connects to the RIPE NCC RIS Live streaming service and injects real-time BGP updates into the pipeline. RIS Live aggregates BGP data from RIPE RIS route collectors worldwide, providing a global view of Internet routing without requiring your own BGP peering sessions.

The stage connects via Server-Sent Events (SSE) to the RIS Live endpoint, extracts raw BGP messages from the stream, and injects them into the pipeline. Each message is tagged with PEER_IP, PEER_AS, COLLECTOR (eg. rrc01), ris-live/host and ris-live/id, eg. for filters like tag[PEER_AS] == 13335 or tag[COLLECTOR] == rrc01.

Connection retries are enabled by default, and the wait before a reconnect resets after a session of over 30 seconds. The stage reconnects if the stream falls behind by more than --delay-err. Individual old messages from a backlogged peer do not count. Errors reported by RIS Live, for example when the client reads too slowly, appear in the log.

Use --sub to pass a RIS Live subscription filter to limit the data at the source. The subscription JSON should include "includeRaw": true (or will be added automatically).

Different RIS peers may use 2-byte or 4-byte ASNs. bgpipe detects 2-byte encoding automatically (see the global --as4 option).

Options

Option Type Default Description
--url string (RIS Live endpoint) Override the streaming endpoint URL
--sub string RIS Subscribe JSON filter
--timeout duration 10s Connect timeout; 0 disables
--read-timeout duration 0 Max time between messages before reconnecting; 0 means 10s, or none with --sub
--retry bool true Retry connection on errors
--retry-max int 0 Max retry attempts; 0 means unlimited
--delay-err duration 3m Reconnect if the stream falls behind by more than this; 0 disables

Examples

Stream all RIS Live updates and print to stdout:

bgpipe -o -- ris-live

Monitor a specific prefix in real-time:

bgpipe -o -- ris-live -- grep 'prefix ~ 1.1.1.0/24'

Subscribe to a specific collector:

bgpipe -o -- ris-live --sub '{"host":"rrc01"}'

Stream with RPKI validation, show only invalid:

bgpipe -o \
    -- ris-live \
    -- rov --invalid keep \
    -- grep 'tag[rov/status] == INVALID'

Archive RIS Live to compressed files with hourly rotation:

bgpipe \
    -- ris-live \
    -- write --every 1h 'ris-live.$TIME.mrt.gz'

See Also

rv-live, mrai, read, RIPE RIS Live, Stages overview