1

I'm trying to monitor Riak-KV from Go program. Riak has a client for go named 'riak-go-client', But it doesn't have any api to get Riak performance/Status data. Is there any way to get it ?

parmar7725274
  • 233
  • 1
  • 3
  • 12
  • I have gone through riak docs but I didn't find any way to Get its status using Go program, they have provided CLI commands. – parmar7725274 Apr 30 '17 at 10:15
  • I'm not saying I want to read from command line tool But my question is what is possible(best) ways to read Riak Status ? – parmar7725274 Apr 30 '17 at 10:22

1 Answers1

0

The best way to get Riak performance/status/metrics might be via its stats HTTP API. It works with any language or even using curl. As long as you know how to connect via HTTP and parse JSON, you should be able to use it.

Using the API can be as simple as running:

curl -v http://127.0.0.1:8098/stats -H "Accept: application/json"

It gives you a lot of useful information like allocated and used memory, get/put statistics, CPU utilization, ring status, etc.

Riak Explorer exposes an even more powerful API that allows not only to monitor, but also manage Riak clusters. You have to install the tool separately though.

vempo
  • 3,093
  • 1
  • 14
  • 16