Hazelcast cluster monitoring and debugging dashboard
hface
monitors a Hazelcast cluster in real time. It currently supports maps, multimaps and queues.
Support for other distributed data structures is coming.
In order to monitor a remote Hazelcast cluster add an 8K
jar dependency to it:
[org.hface/hface-client "0.1.8"]
or
<dependency>
<groupId>org.hface</groupId>
<artifactId>hface-client</artifactId>
<version>0.1.8</version>
</dependency>
it will be collecting the stats from all the nodes and will be sending these stats to hface
for aggregation and visual pleasure. Here is an example of a simple Hazelcast server node with an hface client dependency.
This is what hface dash currently looks like as it monitors the cluster:
All the stats are also available in JSON via /stats
:
for pre Hazelcast 4.0+ clusters: hface config and deps are different and to run it follow this
hface dashboard relies on a small configuraion file that can be pointed to by -Dconf=path-to-config
. Here is a sample config:
{:collector {:refresh-interval 4} ;; refresh cluster stats every 4 seconds
:hz-client {:hosts ["127.0.0.1"] ;; hazelcast cluster hosts/ips
:cluster-name "dev"}} ;; cluster name to connect to
download the hface release from releases i.e. let's say the version is 0.1.1
:
$ wget https://github.com/tolitius/hface/releases/download/v0.1.1/hface-dash-0.1.1.jar
run it:
$ java -jar -Dconf=/opt/app/hface/hface.conf hface-dash-0.1.1.jar
then, for joy, go to http://localhost:3000/
you would need lein (if you come from Java think maven) to compile and build a single runnable jar, a.k.a. an uberjar.
lein is straighforward to install: just download the script and run it
- clone the repo (e.g.
git clone https://github.com/tolitius/hface.git
) cd hface/dash
lein ring uberjar
java -jar -Dconf=/path-to/hface.conf target/hface-dash.jar
then, for joy, go to http://localhost:3000/
starting from 2.9.0+ lein brings newer deps that break backwards compatibility as discussed in this and this issues. If you experience a problem building hface from sources:
$ lein downgrade 2.8.3
$ lein do clean, ring uberjar
which will work, and then:
$ lein upgrade
to bring you back to the latest lein
version.
In case you are working with a Hazelcast 3.x.x
clusters:
bring 0.1.6
hface client instead of the latest:
[org.hface/hface-client "0.1.6"]
hface dashboard relies on a small configuraion file that can be pointed to by -Dconf=path-to-config
. Here is a sample config:
{:collector {:refresh-interval 4} ;; refresh cluster stats every 4 seconds
:hz-client {:hosts ["127.0.0.1" "127.0.0.2"] ;; hazelcast cluster hosts/ips
:retry-ms 5000 ;; retry to reconnect in 5 seconds
:retry-max 720000 ;; 720000 * 5000 = one hour
:group-name "dev" ;; creds to the cluster (dev/dev-pass are hz defaults)
:group-password "dev-pass"}}
download the hface 0.1.0
release from releases:
$ wget https://github.com/tolitius/hface/releases/download/v0.1.0/hface-dash-0.1.0.jar
run it:
$ java -jar -Dconf=/opt/app/hface/hface.conf hface-dash-0.1.0.jar
then, for joy, go to http://localhost:3000/
Copyright © 2020 tolitius
Distributed under the Eclipse Public License, the same as Clojure.