Forward events between riemann instances
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-13 09:06:20 -04:00
cmd/riemann-bridge build: use vanity URL 2025-12-03 07:42:34 -05:00
pipe doc: update copyright dates 2025-12-08 08:00:01 -05:00
sse build: use vanity URL 2025-12-03 07:42:34 -05:00
stdio build: use vanity URL 2025-12-03 07:42:34 -05:00
websocket doc: update copyright dates 2025-12-08 08:00:01 -05:00
.gitignore .gitignore: ignore compiled executable 2024-09-24 07:26:41 -04:00
go.mod chore: update deps 2025-12-04 07:55:32 -05:00
go.sum chore: update deps 2025-12-04 07:55:32 -05:00
LICENSE doc: update copyright dates 2025-12-08 08:00:01 -05:00
README.md doc: reformat 2026-09-13 09:06:20 -04:00

Go Reference

SYNOPSIS

riemann-bridge [options] url

DESCRIPTION

Pipeline for riemann events:

  • read events from a websocket, SSE or stdin
  • write events to a websocket or stdout
  • forward events between riemann instances

Possible uses are:

  • publishing or querying riemann events
  • replicate events to a test server
  • partition events to another riemann server for a restricted view
  • failover or load balancing riemann instances

Stdin

Reads JSON from standard input. If a time field does not exist, the field is added with the value set to the current time.

Websocket

Reading Events

Use /index. For example, if the riemann server is running on port 5556 on localhost:

ws://127.0.0.1:5556/index

Writing Events

Use /events. For example, if the riemann server is running on port 5556 on localhost:

ws://127.0.0.1:5556/events

SSE

Use /index. For example, if the riemann server is running on port 5558 on localhost:

http://127.0.0.1:5558/index

If the riemann service is proxied by path, adjust the URL:

https://example.com/event/index

Reading Events

EXAMPLES

Sending Events

echo '{"service": "foo", "metric": 2}' | \
 riemann-bridge - ws://127.0.0.1:5556/events

Querying Events

# websocket
riemann-bridge --query='service = "foo"' ws://127.0.0.1:5556/index

# SSE
riemann-bridge --query='service = "foo"' http://127.0.0.1:8080/index

Forwarding Events Between Riemann Instances

riemann-bridge \
 --query='service = "test" and not state = "expired"' \
 ws://127.0.0.1:5556/index \
 ws://127.0.0.1:6556/events

ARGS

src string
Source riemann server (default: -)

Examples:

  ws://127.0.0.1:5556/index
  http://127.0.0.1:5558/index
destination
Destination riemann server (default: -)

Examples:

  ws://127.0.0.1:5556/events

OPTIONS

query string
Riemann query (default: not (service ~= "^riemann" or state = "expired"))
number int
Send number events and exit
buffer-size uint
Drop any events exceeding the buffer size (defaut: 0 (unbuffered))
verbose int
Debug messages

ENVIRONMENT VARIABLES

RIEMANN_BRIDGE_SRC
default source riemann server
RIEMANN_BRIDGE_DST
default destination riemann server
RIEMANN_BRIDGE_QUERY
default riemann query

BUILD

go install go.iscode.ca/riemann-bridge/cmd/riemann-bridge@latest

To build a reproducible executable from the git repository:

CGO_ENABLED=0 go build -trimpath -ldflags "-w" ./cmd/riemann-bridge