The Weka GUI allows monitoring basic information of the CPUs, Network, Drives, IOPS/Throughput, and more advanced information via the statistics.
It is sometimes useful to use external tools like Prometheus and Grafana for monitoring. It could be that you already have them in the environment and would like to correlate with other products and see all information on the same dashboard.
In this guide, we will learn how to easily set-up a nice Grafana dashboard to monitor Weka. We will use a custom Prometheus client that presents weka statistics.
It is advisable to set-up a machine (or a VM) to run the external services used if you do not already have those running in the environment.
The easiest way to set up a Grafana environment is with Docker. For that, make sure
docker-ce is installed on that machine. Installation instructions for installing Docker are on the Docker website.
Run the following commands to install the Docker Containers for Grafana, Prometheus, and Weka's metrics exporter:
# Get the Grafana container from Docker Hub:docker pull grafana/grafana# Get the Prometheus container from Docker Hub:docker pull prom/prometheus# Get the Weka metrics exporter from Docker Hub:docker pull wekasolutions/metrics-exporter
Weka provides some examples of Grafana Dashboards to display data collected from Weka. To get and set them up, execute the following commands:
# Get the Weka Dashboards for Grafana from Github:git clone http://github.com/weka/grafana-dashboards# Set up the environment so Prometheus has a place to save datacd grafana-dashboards./set_permissions.sh
To get everything going, all that needs to be done is to start the containers:
docker run -d --net=host --restart unless-stopped --mount type=bind,source=$PWD/etc_grafana_provisioning/,target=/etc/grafana/provisioning --mount type=bind,source=$PWD/var_lib_grafana_dashboards/,target=/var/lib/grafana/dashboards grafana/grafanadocker run -d --net=host --restart unless-stopped --mount type=bind,source=$PWD/etc_prometheus/prometheus.yml,target=/etc/prometheus/prometheus.yml --mount type=bind,source=$PWD/prometheus_data,target=/prometheus prom/prometheusdocker run -d --network=host \--mount type=bind,source=/root/.weka/,target=/weka/.weka/ \--mount type=bind,source=/dev/log,target=/dev/log \wekasolutions/metrics-exporter -vv -a <clustersepc>
clusterspec is as a list of hostnames,
auth-token file, e.g.:
weka01,weka02,weka03:~/.weka/auth-token.json, with the minimum being a single Weka host.
auth-token file is generated by the
weka cluster login command.
Multiple clusters may be monitored by listing multiple
Prometheus server is available on port 9090:
Grafana server is available on port 3000:
Weka exporter is available on port 8001:
The previous steps set the Weka exporter to push data to the Prometheus instance, set Prometheus as a data source to the Grafana instance, and pre-populated Grafana with the pre-build Weka dashboard.
To monitor the cluster, simply connect to Grafana and view the pre-populated Weka dashboards.