Search code examples
pythonnode.jsgraphitepusherstatsd

Feed Pusher data to graphite using statsd


I am subscribed to pusher channel and getting live trade data like below

https://www.bitstamp.net/s/examples/live_trades.html

I need to push this data to graphite to visualize.

I installed graphite and statsd.

Graphite is up and running at : http://localhost:8080/

Now I tried pushing content to statsd using "echo" , which is working and data is reflecting in graphite.

But I am not sure how to push the data from pusher , since I am getting those contents in client (browser) , So for every message I am receiving from pusher , I need to fire ajax request to server which run with Python and Ruby ?

Any help will be highly appreciated.


Solution

  • By the sounds of it you really want the information to be received in your Python runtime? If so, could you use the Pusher python client instead?

    This will avoid the need for a web browser and allow you to make a persistent connection - via WebSocket - and recieve the data you want directly within the Python runtime.