Last updated
Last updated
WEKA provides an external monitoring package named WEKAmon. The package implements the well-known dashboard with , which provides a central monitoring dashboard of metrics, logs, alerts, and statistics with enriched capabilities.
The package also includes the following components:
Exporter: The Exporter gets the data from the WEKA cluster and sends the data to Prometheus.
Quota Export: The Quota Export manages the quotas and sends the data to Prometheus.
Alert Manager: The Alert Manger alerts users through an SMTP server when they reach their soft quota limits.
You can set up the WEKAmon package regardless of the data monitoring provided by the Weka GUI.
One of the advantages of setting up the WEKAmon package is that if you already use the Grafana and Prometheus tools for monitoring other products, you can integrate these tools with WEKA to correlate and display monitoring information from all your products on the same dashboard.
Setting up a dedicated physical server (or VM) for the installation is recommended.
4 cores
16 GB RAM
50 GB / partition (for the root)
50 GB /opt/ partition (for WEKAmon installation)
1 Gbps network
Docker is the recommended container for the WEKAmon setup. To use Docker, the following must be installed on the dedicated physical server (or VM):
docker-ce
docker-compose
or docker-compose-plugin,
depending on the existing operating system.
For the WEKAmon host to communicate with the WEKA cluster, a security token is necessary. However, the WEKAmon host is not required to have the WEKA client installed.
Perform the following steps on an existing host with access to the WEKA CLI, for example, on a WEKA backend server.
Create a dedicated user: Create a unique local username (for example, wekamon
) for WEKAmon. The unique username is displayed in the event logs, making the identification and troubleshooting of issues easier. Then, assign the ClusterAdmin or OrgAdmin role.
Example: weka user add wekamon clusteradmin
Generate an authentication token for the user: Run the following command:
weka user login wekamon --path wekamon-authtoken.json
Transfer the token: Copy the wekamon-authtoken.json
file to the WEKAmon management server. It will later be placed in a specific directory on that host.
Remove the token file: Delete the wekamon-authtoken.json
locally.
Example: rm wekamon-authtoken.json
Perform the following steps on the WEKAmon host.
Create a directory for the authentication token: Run the following command:
mkdir /root/.weka
Move the previously-created authentication token into the new directory: : Run the following command: mv ~/wekamon-authtoken.json /root/.weka/auth-token.json
Ensure appropriate ownership and permissions are set: Run the following commands:
chown root:root /root/.weka/auth-token.json
chmod 400 /root/.weka/auth-token.json
Related topics
The WEKAmon package resides on the GitHub repository. Obtain the WEKAmon package using one of the following methods:
On the latest release section, select the Source Code link to download.
Copy the downloaded source code to the dedicated physical server (or VM) and unpack it.
Run the following commands to clone the WEKAmon package from GitHub:
The install.sh
script creates a few directories and sets their permissions.
Run the following command:
The WEKAmon and exporter configuration are defined in the export.yml
file.
Change the directory to weka-mon
and open the export.yml
file.
In the cluster section under the hosts list, replace the hostnames with the actual hostnames/IP addresses of the Weka containers (up to three would be sufficient). Ensure the hostnames are mapped to the IP addresses in /etc/hosts.
Optional. Add custom panels to Grafana containing other metrics.
All other settings in the export.yml
file have pre-defined defaults that do not need modification to work with WEKAmon. All the configurable items are defined but marked as comments by an asterisk (#).
To add custom panels to Grafana containing other metrics from the cluster, you can remove the asterisk from the required metrics (uncomment).
Example: In the following snippet of the export.yml
, to enable getting the FILEATOMICOPEN_OPS statistic, remove the #
character at the beginning of the line.
If the statistic you want to get is in a Category that is commented out, also uncomment the Category line (the first line in the example). Conversely, insert the # character at the beginning of the line to stop getting a statistic.
The WEKAmon deployment includes a dedicated container named quota-export. The container includes an Alert Manager that emails users when they reach their soft quota.
The configuration of the quota-export container is defined in the quota-export.yml
file.
Go to the weka-mon
directory and open the quota-export.yml
file.
Run the following command:
Verify that the containers are running using the following command:
Example:
If the status of the containers is not up, check the logs and troubleshoot accordingly. To check the logs, run the following command:
Once all containers run, you can connect to Grafana on port 3000 of the physical server running the docker containers. The default credentials for Grafana are admin/admin
.
If you already have Grafana and Prometheus running in your environment, you only need to run the exporter and add it to the Prometheus configuration.
Do one of the following:
Get and run the container (the export.yml
configuration file is already edited).
The following example maps the export.yml
configuration file in several volumes in the container:
~/.weka directory
to enable the container to read the authentication file.
/dev/log
to enable entries in the Syslog.
/etc/hosts
to enable the hostname resolution (a DNS can also be used, if exists in the docker environment).
There are more options; you can run the command with-help
or -h
for a full description.
Copy this file to the physical server (or VM).
Do one of the following:
Run git clone https://github.com/weka/export
Install the required python modules by running the following command:
pip3 install -r requirements.txt
The exporter section defines the program behavior.
The exporter always tries to allocate one host per thread but does not exceed the maximum processes specified in the max_procs
parameter. In a cluster with 1000 hosts, it doubles or triples up the hosts on the threads.
Example:
In a cluster with 3000 hosts, max_procs
= 8, and max_threads_per_proc
= 100, only 8 processes running. Each process with 100 threads, but there are close to 4 hosts serviced per thread instead of the default 1 host.
If you have deployed the WMS, follow the procedure in:. Otherwise, continue with this workflow.
For instructions on the Docker installation, see the .
: Obtain the WEKAmon package from the GitHub repository by downloading or cloning.
: The script creates a few directories and sets their permissions.
: The export.yml
file contains the WEKAmon and the exporter configuration. Customize the file according to your actual WEKA deployment.
: The quota-export.yml
file contains the configuration of the quota-export container. Customize the file according to your actual WEKA deployment.
: Once done, you can connect to Grafana on port 3000 of the physical server running the docker containers.
Go to
Optional. In the exporter section, customize the values according to your preferences. For details, see the topic below.
Specify the same hosts as you specified in the export.yml file
(see ).
The configuration of the Alert Manager is defined in the alertmanager.yml
file found in the etc_alertmanager
directory. It contains details about the SMTP server, user email addresses, quotas, and alert rules. To set this file, contact the .
Follow the steps in the section.
In the Grafana application, import the dashboard JSON
files from the directory weka-mon/var_lib_grafana/dashboards
. For instructions, see the topic in Grafana documentation.
Follow steps and in the above sections.
(if you have a docker, this is the simple method).
(if you do not have a docker, use this option)
(requires installing a few Python Modules from PyPi).
Go to and download the tarball from the latest release.
Run the exporter as follows (for the description of the command-line parameters, see the ):
Go to and download the source tarball.
Run the exporter (for the description of the command-line parameters, see the ):