Support sending new moksha stats into collectd.
This commit is contained in:
parent
a63afc8031
commit
821d2f8176
1 changed files with 18 additions and 0 deletions
|
@ -30,6 +30,24 @@ def print_consumer(service, consumer):
|
||||||
timestamp,
|
timestamp,
|
||||||
consumer['exceptions']
|
consumer['exceptions']
|
||||||
)
|
)
|
||||||
|
# These got introduced in a later version of moksha, so not every host has them
|
||||||
|
if 'headcount_in' in consumer:
|
||||||
|
print "PUTVAL %s/%s/gauge-%s interval=5 %i:%i" % (
|
||||||
|
hostname,
|
||||||
|
service,
|
||||||
|
'%s_in' % consumer['name'],
|
||||||
|
timestamp,
|
||||||
|
consumer['headcount_in']
|
||||||
|
)
|
||||||
|
|
||||||
|
if 'headcount_out' in consumer:
|
||||||
|
print "PUTVAL %s/%s/gauge-%s interval=5 %i:%i" % (
|
||||||
|
hostname,
|
||||||
|
service,
|
||||||
|
'%s_out' % consumer['name'],
|
||||||
|
timestamp,
|
||||||
|
consumer['headcount_out']
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def print_producer(service, producer):
|
def print_producer(service, producer):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue