Giter VIP home page Giter VIP logo

riemann-bridge's Introduction

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 github.com/msantos/riemann-bridge@latest

# or
cd cmd/riemann-bridge
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w"

riemann-bridge's People

Contributors

msantos avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.