Service for relaying Riemann events to Riemann/Carbon destinations

Go Report Card Coverage Status Build Status Mentioned in Awesome Go

riemann-relay

This is a service that receives a Riemann Protobuf-formatted event stream and sends it to one or more targets in Riemann or Graphite format. Although that can be done in Riemann itself, this service is simpler, probably faster and lightweight (no Java)

Features

  • Receive event batches in Riemann Protobuf format (see riemann.proto)
  • Receive events in Riemann JSON format using Websocket API
  • Convert Riemann events to Carbon metrics using flexible field mapping syntax
  • Send events in configurable batch sizes to any number of Riemann/Carbon targets
  • Supports TCP and Unix Sockets
  • Different target selection algorithms:
    • Round-Robin
    • Hash
    • Failover
    • Broadcast
  • Optional failover to other targets if the selected one is down (in Hash and Round-Robin modes)
  • Prometheus metrics
  • Log stats periodically
  • Configurable batch and buffer sizes, flush intervals, timeouts
  • Build RPM and DEB packages

See riemann-relay.conf for more details on features and how to configure them

Performance

On 2 average CPU cores it's able to handle about 500k events per second, depending on batch size and incoming Riemann message sizes. It will scale to more CPUs when using more targets and clients (each target and client gets it's own thread). There's a room for optimizations, though.

JSON URI and Event structure for Websocket

URI: ws://1.1.1.1:1234/events

{
    "host": "host1",
    "service": "svc1",
    "description": "cool",
    "state": "ok",
    "tags": ["tag1", "tag2"],
    "metric": 123,
    "time": "2018-04-10T13:36:04.787Z",
    "attributes": [
        {
            "key": "key1",
            "value": "val1"
        }
    ]
}

Install

For now in the releases only binaries for linux-amd64 are available. For other platforms see the Build section below.

Build

riemann-relay is written in Go and uses dep as a dependency manager, so you need to install them first.

Then:

# dep ensure
# go build

Packaging

To build RPM & DEB packages you'll need gox and fpm.

Then just do one of:

# make rpm
# make deb

Run

# /path/to/riemann-relay -config /etc/riemann-relay.conf

The logging currently goes to stdout. Use -debug option to get a lot more detailed output (not for production).

Owner
Igor Novgorodov
Software/System Engineer
Igor Novgorodov
Similar Resources

Use Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

Use  Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

目录 gRPC/consul/kafka简介 gRPC+kafka的Demo gRPC+kafka整体示意图 限流器 基于redis计数器生成唯一ID kafka生产消费 kafka生产消费示意图 本文kafka生产消费过程 基于pprof的性能分析Demo 使用pprof统计CPU/HEAP数据的

Jul 9, 2022

Generate types and service clients from protobuf definitions annotated with http rules.

protoc-gen-typescript-http Generates Typescript types and service clients from protobuf definitions annotated with http rules. The generated types fol

Nov 22, 2022

An URL shortener service written in Golang

ggz An URL shortener service written in Golang. Features Support MySQL, Postgres or SQLite Database. Support RESTful or GraphQL API. Support Auth0 or

Dec 26, 2022

MOSN is a cloud native proxy for edge or service mesh. https://mosn.io

MOSN is a cloud native proxy for edge or service mesh. https://mosn.io

中文 MOSN is a network proxy written in Golang. It can be used as a cloud-native network data plane, providing services with the following proxy functio

Dec 30, 2022

A simple RPC framework with protobuf service definitions

Twirp is a framework for service-to-service communication emphasizing simplicity and minimalism. It generates routing and serialization from API defin

Jan 7, 2023

An example go service that is being tested by nonnative.

Nonnative Example An example go service that is being tested by nonnative. Structure The project follows the structure in golang-standards/project-lay

Oct 31, 2021

Helps to find available slots on zh.vacme.ch corona vaccination service

Helps to find available slots on zh.vacme.ch corona vaccination service

vacme-zurich-parser https://zh.vacme.ch provides a way to register for vaccination in Zurich. Since there is not much free slots - its quite tedious t

Jan 8, 2022

TCPProbe is a modern TCP tool and service for network performance observability.

TCPProbe is a modern TCP tool and service for network performance observability.

TCPProbe is a modern TCP tool and service for network performance observability. It exposes information about socket’s underlying TCP session, TLS and HTTP (more than 60 metrics). you can run it through command line or as a service. the request is highly customizable and you can integrate it with your application through gRPC. it runs in a Kubernetes cluster as cloud native application and by adding annotations on pods allow a fine control of the probing process.

Dec 15, 2022

纯Go编写的IM,完全自定义协议的高性能即时通讯服务(High-performance instant messaging service with fully customizable protocol)

纯Go编写的IM,完全自定义协议的高性能即时通讯服务(High-performance instant messaging service with fully customizable protocol)

LiMaoIM (Everything so easy) This project is a simple and easy to use, powerful performance, simple design concept instant messaging service, fully cu

Dec 5, 2022
Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service.

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service. Program can take large input files.

Feb 6, 2022
GSRPC compatible type definitions of events from the ChainBridge substrate pallet

chainbridge-substrate-events GSRPC compatible type definitions of events from the ChainBridge substrate pallet. ChainSafe Security Policy Reporting a

Nov 13, 2021
Goket (Golang Keyboard Event Tree) is a proof-of-concept code for using keyboard events trees for performing operations.

Goket Goket (Golang Keyboard Event Tree) is a proof-of-concept code for using keyboard events trees for performing operations. Its main goal is to all

Jan 3, 2023
TCP output for beats to send events over TCP socket.

beats-tcp-output How To Use Clone this project to elastic/beats/libbeat/output/ Modify elastic/beats/libbeat/publisher/includes/includes.go : // add i

Aug 25, 2022
UDP output for beats to send events over UDP.

beats-udp-output How To Use Clone this project to elastic/beats/libbeat/output/ Modify elastic/beats/libbeat/publisher/includes/includes.go : // add i

Dec 11, 2021
Events - Event Manager - Nodejs like

events Event Manager - Nodejs like Please take a look at the TESTS, for further comprehension. Example package main import ( "errors" "fmt" "log"

Dec 31, 2021
Package event-driven makes it easy for you to drive events between services
Package event-driven makes it easy for you to drive events between services

Event-Driven Event-driven architecture is a software architecture and model for application design. With an event-driven system, the capture, communic

Apr 20, 2022
A service registry and service discovery implemention for kitex based on etcd

kitex etcd Introduction kitexetcd is an implemention of service registry and service discovery for kitex based on etcd. Installation go get -u github.

Feb 18, 2022
A service to proxy requests to a given backend service.

Proxy Service A service to proxy requests to a given backend service. Go 1.17+ Clone git clone [email protected]:janu-cambrelen/proxy-service.git Run (L

Jan 5, 2022
gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies
gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies

gproxy is a reverse proxy service AND library for creating flexible, expression-based, lets-encrypt/acme secured gRPC/http reverse proxies GProxy as a

Sep 11, 2022