Browse Source

Add collectd listening script

develop
Sven Slootweg 8 years ago
parent
commit
96aa2b020f
  1. 12
      ccollectd/listen

12
ccollectd/listen

@ -0,0 +1,12 @@
import socket, yaml, random, zmq, msgpack, time, uuid, fnmatch
import cPickle as pickle
ctx = zmq.Context()
fetcher = ctx.socket(zmq.SUB)
fetcher.setsockopt(zmq.SUBSCRIBE, "")
fetcher.connect("ipc:///tmp/ccollectd-stats")
while True:
message = msgpack.unpackb(fetcher.recv())
print message
Loading…
Cancel
Save