Monitoring Riak-KV using Golang

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Monitoring Riak-KV using Golang

Prakash Parmar
Hi All,

For my project I have to read riak status periodically. From CLI, I can do using command 'riak-admin status’. How I can get in Golang Program ? 

I have gone through riak-go-client but didn’t find any API.

Any help is really appreciated :)


Thanks,
Prakash Parmar 

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Riak-KV using Golang

Magnus Kessler
On 30 April 2017 at 10:34, Prakash Parmar <[hidden email]> wrote:
Hi All,

For my project I have to read riak status periodically. From CLI, I can do using command 'riak-admin status’. How I can get in Golang Program ? 

I have gone through riak-go-client but didn’t find any API.

Any help is really appreciated :)


Thanks,
Prakash Parmar 


Hi Prakash,

You can use the HTTP /stats endpoint [0], which returns all monitored properties in JSON format.

Kind Regards,

Magnus


--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Riak-KV using Golang

Prakash Parmar
Hi Magnus,

Thanks for your quick response.

One more question. How I can get Cluster Status ?

Regards,
Prakash Parmar

On 30-Apr-2017, at 3:49 PM, Magnus Kessler <[hidden email]> wrote:

Magnus


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Riak-KV using Golang

Magnus Kessler
On 30 April 2017 at 13:06, Prakash Parmar <[hidden email]> wrote:
Hi Magnus,

Thanks for your quick response.

One more question. How I can get Cluster Status ?

Regards,
Prakash Parmar


Hi Prakash,

The command 'riak-admin cluster status' does not have an equivalent access via HTTP. Like most sub-commands of 'riak-admin' it is implemented as an RPC call [0] to the riak_core_console Erlang module.



Kind Regards,

Magnus


--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Riak-KV using Golang

Prakash Parmar
Hi Magnus,

How I can interpret health statics and decide that whether riak cluster is healthy or not ? I have gone through all statistics but not able to conclude that which and all I have to use to monitor health of cluster and based on what I can give conclusion. For eg. Disk status will give percent utilises so I monitor it and if it's >85% I can say it's warning, >95% alarm(not healthy) and < 85% is normal.

Thanks for kind helps,
Prakash Parmar

Sent from my iPad

On 02-May-2017, at 4:10 PM, Magnus Kessler <[hidden email]> wrote:

On 30 April 2017 at 13:06, Prakash Parmar <[hidden email]> wrote:
Hi Magnus,

Thanks for your quick response.

One more question. How I can get Cluster Status ?

Regards,
Prakash Parmar


Hi Prakash,

The command 'riak-admin cluster status' does not have an equivalent access via HTTP. Like most sub-commands of 'riak-admin' it is implemented as an RPC call [0] to the riak_core_console Erlang module.



Kind Regards,

Magnus


--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Riak-KV using Golang

Magnus Kessler

On 4 May 2017 at 18:46, Prakash Parmar <[hidden email]> wrote:
Hi Magnus,

How I can interpret health statics and decide that whether riak cluster is healthy or not ? I have gone through all statistics but not able to conclude that which and all I have to use to monitor health of cluster and based on what I can give conclusion. For eg. Disk status will give percent utilises so I monitor it and if it's >85% I can say it's warning, >95% alarm(not healthy) and < 85% is normal.

Thanks for kind helps,
Prakash Parmar



Hi Prakash,

Please have a look at the documentation of Riak's stats module [0]. In addition, as a general rule, Riak's data disk should never get more than about 80% full (assuming it holds only Riak data), as additional disk space may be needed when fallback partitions are created when another node is down. Rather than looking at point in time values as reported by `riak-admin status` and the HTTP `stats` endpoint, it is often more valuable to graph the development of the reported statistics over time. Of particular interest are the GET and PUT times reported (both node and vnode), as these will show the latencies of the cluster when returning results.

Kind Regards,

Magnus

[0]: http://docs.basho.com/riak/kv/2.2.3/using/reference/statistics-monitoring/

--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Loading...