All Projects → borntyping → python-riemann-client

borntyping / python-riemann-client

Licence: MIT license
A Riemann client and command line tool

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-riemann-client

molch
An implementation of the axolotl ratchet based on libsodium.
Stars: ✭ 24 (-36.84%)
Mutual labels:  protobuf
libcluon
libcluon is a small and efficient, single-file and header-only library written in modern C++ to power microservices.
Stars: ✭ 81 (+113.16%)
Mutual labels:  protobuf
go-grpcmw
A Go package and protobuf generator for managing grpc interceptors.
Stars: ✭ 19 (-50%)
Mutual labels:  protobuf
Meshtastic-protobufs
Protobuf definitions for the Meshtastic project
Stars: ✭ 32 (-15.79%)
Mutual labels:  protobuf
j2cl-protobuf
Protocol Buffers implementation for J2CL
Stars: ✭ 23 (-39.47%)
Mutual labels:  protobuf
WebApiClient.Extensions
WebApiClient项目的第三方扩展:Autofac、DependencyInjection、HttpClientFactory、SteeltoeOSS.Discovery、MessagePack、Protobuf、Json-Rpc
Stars: ✭ 73 (+92.11%)
Mutual labels:  protobuf
GameTracking-HalfLifeAlyx
📥 Game Tracker: Half-Life: Alyx
Stars: ✭ 24 (-36.84%)
Mutual labels:  protobuf
faiss-server
faiss serving :)
Stars: ✭ 111 (+192.11%)
Mutual labels:  protobuf
stellarstation-api
The API definition for StellarStation.
Stars: ✭ 22 (-42.11%)
Mutual labels:  protobuf
edap
No description or website provided.
Stars: ✭ 22 (-42.11%)
Mutual labels:  protobuf
rules proto grpc
Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
Stars: ✭ 201 (+428.95%)
Mutual labels:  protobuf
MicroServicePractice
微服务实践的demo
Stars: ✭ 40 (+5.26%)
Mutual labels:  protobuf
go2gql
graphql-go schema generator by proto files
Stars: ✭ 33 (-13.16%)
Mutual labels:  protobuf
protokit
A starter kit for building protoc plugins. Rather than write your own, you can just use an existing one.
Stars: ✭ 69 (+81.58%)
Mutual labels:  protobuf
universe-topology
A universal computer knowledge topology for all the programmers worldwide.
Stars: ✭ 47 (+23.68%)
Mutual labels:  protobuf
sisyphus-js
Sisyphus customized protobuf and gRPC runtime and code generator for JavaScript/TypeScript
Stars: ✭ 19 (-50%)
Mutual labels:  protobuf
metastore
A protobuf schema registry on steroids. It will keep track of the contracts throughout your organization, making sure no contract is broken.
Stars: ✭ 43 (+13.16%)
Mutual labels:  protobuf
veriform
Security-oriented protobuf-like serialization format with "Merkleized" content hashing support
Stars: ✭ 114 (+200%)
Mutual labels:  protobuf
POGOProtos
A central repository for all proto files of PokémonGO.
Stars: ✭ 136 (+257.89%)
Mutual labels:  protobuf
aerospike-scala
Typesafe DSL for work with Aerospike Database
Stars: ✭ 40 (+5.26%)
Mutual labels:  protobuf

riemann-client


A Riemann client library and command line tool for Python. It supports UDP and TCP transports, queries, and all metric types. The client library aims to provide a simple, minimal API, and does not require direct interaction with protocol buffers. There is also a queued client that can queue or batch events and then send them in a single message.

This project is no longer maintained. Please contact me by opening an issue on the GitHub project if you'd like to fork this repository and take over the ``riemann-client`` PyPI package.

Usage

As a command line tool:

riemann-client [--host HOST] [--port PORT] send [-s SERVICE] [-S STATE] [-m METRIC] [...]
riemann-client [--host HOST] [--port PORT] query QUERY

The host and port used by the command line tool can also be set with the RIEMANN_HOST and RIEMANN_PORT environment variables. By default, localhost:5555 will be used.

As a library:

import riemann_client.client

with riemann_client.client.Client() as client:
    client.event(service="riemann-client", state="awesome")
    client.query("service = 'riemann-client'")

A more detailed example, using both a non-default transport and a queued client:

from riemann_client.transport import TCPTransport
from riemann_client.client import QueuedClient

with QueuedClient(TCPTransport("localhost", 5555)) as client:
    client.event(service="one", metric_f=0.1)
    client.event(service="two", metric_f=0.2)
    client.flush()

The QueuedClient class modifies the event() method to add events to a queue instead of immediately sending them, and adds the flush() method to send the current event queue as a single message.

Installation

riemann-client requires Python 2.6 or above, and can be installed with pip install riemann-client. It will use Google's protobuf library when running under Python 2, and GreatFruitOmsk's protobuf-py3 fork when running under Python 3. Python 3 support is experimental and is likely to use Google's protobuf once it supports Python 3 fully.

Requirements

Testing (Linux/OSX)

Testing is done with tox:

tox

Changelog

Version 6.1.3

  • Added --echo/--no-echo option to the CLI.

Version 6.1.2

  • Fixed tests inclusion in tarball.

Version 6.1.1

  • Fixed socket error handling in riemann_client.client.AutoFlushingQueuedClient.

Version 6.1.0

  • riemann_client.client.AutoFlushingQueuedClient added.

Version 6.0.0

  • riemann_client.client.Client.create_dict only returns event fields that are set on the Protocol Buffers Event object
  • riemann-client send ... only outputs fields that were set on the message

Version 5.1.0

  • Added Python 3 support
  • Changed riemann_client.riemann_pb2 to wrap _py2 and _py3 modules
  • Changed setup.py to dynamically select a protobuf dependency

Version 5.0.x

  • Added API documentation (http://riemann-client.readthedocs.org/)
  • Replaced argparse with click for an improved CLI
  • Various command line parameters changed
  • --event-host became --host
  • --print was removed, send always prints the sent event
  • Minor fixes to QueuedClient API
  • UDPTransport.send returns None instead of NotImplemented

Version 4.2.x

  • Added events() and send_events() methods to the client
  • Added clear_queue() method to the queued client
  • Add --timeout option for TCP based transports

Version 4.1.x

  • Full Riemann protocol support (TLS transport, event attributes)
  • Fixes for multiple broken features (--tags, --print)
  • Raise errors when clients are used incorrectly
  • Client displays errors from Riemann nicely
  • Relaxed version requirements to fit CentOS 6 packages

Version 3.0.x

  • Renamed module from riemann to riemann_client
  • Command line interface was rewritten, and is now the only part of the library that respects the RIEMANN_HOST and RIEMANN_PORT environment variables
  • Support for querying the Riemann index was added
  • Internally, transports now define send instead of write, and TCPTransport.send returns Riemann's response message

Licence

riemann-client is licensed under the MIT Licence. The protocol buffer definition is sourced from the Riemann Java client, which is licensed under the Apache Licence.

Authors

riemann-client was written by Sam Clements, while working at DataSift.

https://0.gravatar.com/avatar/8dd5661684a7385fe723b7e7588e91ee?d=https%3A%2F%2Fidenticons.github.com%2Fe83ef7586374403a328e175927b98cac.png&r=x&s=40

https://1.gravatar.com/avatar/a3a6d949b43b6b880ffb3e277a65f49d?d=https%3A%2F%2Fidenticons.github.com%2F065affbc170e2511eeacb3bd0e975ec1.png&r=x&s=40

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].