用于riemann的python客户端
bernhard的Python项目详细描述
#bernhard[riemann]的一个简单的python客户端(http://github.com/aphyr/riemann)。用法:
``python
import bernhard
c.send({host':'myhost.foobar.com','service':'myservice',“metric”:12}
q=c.query('true')
```
bernhard支持自定义属性,语法为:
``python
import bernhard
c.send({host':'awesome.host.com','attributes':{'sky':'sunny','sea':'agatited'})
````
查询索引就像:
``python
import bernhard
q=c.query('true')
for e in q:
print“host:”,e.host,“state:”,e.state
```
``python
import bernhard
q=c.query('true')
```
bernhard支持自定义属性,语法为:
``python
import bernhard
c.send({host':'awesome.host.com','attributes':{'sky':'sunny','sea':'agatited'})
````
查询索引就像:
``python
import bernhard
for e in q:
print“host:”,e.host,“state:”,e.state
```