Riemann的Python客户端
项目描述
# Bernhard
A simple Python client for [Riemann](http://github.com/aphyr/riemann). Usage
```python
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
```python
import bernhard
c = bernhard.Client()
c.send({'host': 'awesome.host.com', 'attributes': {'sky': 'sunny', 'sea': 'agitated'}})
```
Querying the index is as easy as
```python
import bernhard
c = bernhard.Client()
q = c.query('true')
for e in q
print "Host:", e.host, "State:", e.state
```
## Installing
```bash
pip install bernhard
```
You may encounter issues with the `protobuf` dependency; if so, just run `pip
install protobuf` manually, then `pip install bernhard`.
A simple Python client for [Riemann](http://github.com/aphyr/riemann). Usage
```python
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
```python
import bernhard
c = bernhard.Client()
c.send({'host': 'awesome.host.com', 'attributes': {'sky': 'sunny', 'sea': 'agitated'}})
```
Querying the index is as easy as
```python
import bernhard
c = bernhard.Client()
q = c.query('true')
for e in q
print "Host:", e.host, "State:", e.state
```
## Installing
```bash
pip install bernhard
```
You may encounter issues with the `protobuf` dependency; if so, just run `pip
install protobuf` manually, then `pip install bernhard`.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bernhard-0.2.6.tar.gz (10.4 kB 查看哈希值)
关闭
bernhard-0.2.6.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 7efafa3ae1221a465fcbd74c4f78e5ad4a1841b9fa70c95eb38ba103a71bdb9b |
|
MD5 | 9bd7b57f00c3a76e7efbbb5d34677e51 |
|
BLAKE2b-256 | 51d4b2701097f9062321262c4d4e3488fdf127887502b2619e8fd1ae13955a36 |