Skip to content

kensho/bernhard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bernhard

A simple Python client for Riemann. Usage:

import bernhard

c = bernhard.Client()
c.send({'host': 'myhost.foobar.com', 'service': 'myservice', 'metric': 12})
q = c.query('true')

Bernhard supports custom attributes with the syntax:

import bernhard

c = bernhard.Client()

c.send({'host': 'awesome.host.com', 'attributes': {'sky': 'sunny', 'sea': 'agitated'}})

Querying the index is as easy as:

import bernhard

c = bernhard.Client()
q = c.query('true')
for e in q:
    print "Host:", e.host, "State:", e.state

Installing

pip install bernhard

You may encounter issues with the protobuf dependency; if so, just run pip install protobuf manually, then pip install bernhard.

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.4%
  • Protocol Buffer 9.6%