W E K A
3.14
3.14
  • WEKA v3.14 Documentation
  • Weka System Overview
    • About the WEKA System
    • SSD Capacity Management
    • Filesystems, Object Stores & Filesystem Groups
    • Weka Networking
    • Data Lifecycle Management
    • Weka Client & Mount Modes
    • Glossary
  • Getting Started with Weka
    • Quick Install Guide
    • Managing the Weka System
    • CLI Overview
    • GUI Overview
    • Serving IOs with WekaFS
  • Planning & Installation
    • Prerequisites for Installation
    • Bare Metal Installation
      • Planning a Weka System Installation
      • Setting Up the Hosts
        • SR-IOV Enablement
      • Obtaining the Weka Install File
      • Weka System Installation Process Using the CLI
      • Adding Clients
    • AWS Installation
      • Self-Service Portal
      • CloudFormation Template Generator
      • Deployment Types
      • AWS Outposts Deployment
      • Supported EC2 Instance Types
      • Adding Clients
      • Auto Scaling Group
      • Troubleshooting
  • Performance
    • Testing Weka Performance
      • Test Environment Details
  • WekaFS Filesystems
    • Managing Filesystems, Object Stores & Filesystem Groups
      • Managing Object Stores
      • Managing Filesystem Groups
      • Managing Filesystems
      • Attaching/Detaching Object Stores to/from Filesystems
      • KMS Management
    • Advanced Data Lifecycle Management
      • Advanced Time-based Policies for Data Storage Location
      • Data Management in Tiered Filesystems
      • Transition Between Tiered and SSD-Only Filesystems
      • Manual fetch and release of data
    • Mounting Filesystems
    • Snapshots
    • Snap-To-Object
    • Quota Management
  • Additional Protocols
    • NFS
    • SMB
      • SMB Management Using CLIs
      • SMB Management Using the GUI
    • S3
      • S3 Cluster Management
      • S3 Buckets Management
      • S3 Users and Authentication
      • S3 Information Lifecycle Management
      • Audit S3 APIs
      • S3 Limitations
      • S3 Examples using boto3
  • Operation Guide
    • Alerts
      • List of Alerts
    • Events
      • List of Events
    • Statistics
      • List of Statistics
    • System Congestion
    • Security
      • User Management
      • Organizations
    • Expanding & Shrinking Cluster Resources
      • Expand & Shrink Overview
      • Stages in Adding a Backend Host
      • Expansion of Specific Resources
      • Shrinking a Cluster
    • Background Tasks
    • Upgrading Weka Versions
  • Billing & Licensing
    • License Overview
    • Classic License
    • Pay-As-You-Go License
  • Support
    • Prerequisites and Compatibility
    • Getting Support for Your Weka System
    • The Weka Support Cloud
    • Diagnostics CLI Command
  • Appendix
    • Weka CSI Plugin
    • External Monitoring
    • Snapshot Management
  • REST API
Powered by GitBook
On this page
  • Overview
  • Setting up the Weka-mon package
  • Step 1: Install the Weka-mon package
  • Step 2: Run the install.sh script:
  • Step 3: Edit the export.yml file
  • Step 4: Start the containers
  • Integrating with an existing Grafana/Prometheus environment
  • Step 1: Install the Weka-mon package
  • Step 2: Import the dashboards
  • Step 3: Edit the export.yml (optional)
  • Step 4: Run the exporter
  1. Appendix

External Monitoring

This page describes how to set up external monitoring using Prometheus and Grafana

PreviousWeka CSI PluginNextSnapshot Management

Last updated 3 years ago

Overview

The Weka GUI allows monitoring basic information of the CPUs, Network, Drives, IOPS/Throughput, and more advanced information via the statistics as well as Weka Alerts and the Weka Events log.

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.

Setting up the Weka-mon package

Step 1: Install the Weka-mon package

The package resides on GitHub. There are two ways you can pull it from GitHub - either download a Release or clone the repository.

Alternatively, to clone the repository, run the following commands to pull the weka-mon package from GitHub:

# Clone the package from github:
git clone https://github.com/weka/weka-mon
cd weka-mon

Step 2: Run the install.sh script:

The install.sh script creates some directories and sets the permissions on them:

# Set up the package
./install.sh

Step 3: Edit the export.yml file

The export.yml configuration file is used to configure weka-mon and the exporter. The export.yml file can be found in the base of the weka-mon directory hierarchy.

Host Configuration

Edit the list of hosts under the cluster: heading to reflect your hostnames or ip addresses; you need to specify one or more hostnames/ips - there's not need to list all the cluster hostnames; two or three will do.

Also under cluster: is auth_token_file: which is used to provide the security token required to authenticate with the cluster. This file can be generated with the weka user login command on any cluster host (including clients) and copied to the server/VM running weka-mon. It is highly suggested that you create a ReadOnly User just for this package and use it for cluster communications. See the Security section in the Operations Guide for details on creating users and using tokens.

# cluster section - info about the weka cluster we want to export data from:
cluster:
  # a list of hostnames or ip addresses.  Minimum of 1 requred.  You do not need to list all hosts in the 
  #     cluster, but more than one is suggested

  auth_token_file: auth-token.json
  hosts:
    - vweka01      # EDIT THESE LINES 
    - vweka02
    - vweka03

  force_https: True   # only 3.10+ clusters support https
  verify_cert: False  # default cert cannot be verified

Exporter configuration

There are a few more options in the export.yml file in the exporter: section that defines the program behavior.

# exporter section - info about how we're going to run
exporter:
  listen_port: 8001
  loki_host:
  loki_port: 3100
  timeout: 10.0
  max_procs: 8
  max_threads_per_proc: 100

The listen_port: parameter defines the port that Prometheus should scrape. This should not be changed unless you change the Prometheus configuration.

The loki_host:and loki_port: parameters should not be changed if you're using the weka-mon setup. Make loki_host: blank to disable sending events to Loki entirely.

The timeout: parameter is the max time in seconds to wait for an API call to return. The default should be sufficient for most purposes.

The max_procs: and max_threads_per_proc: parameters define the scaling behavior. If the total number of hosts (servers and clients) exceeds max_threads_per_proc, the exporter will spawn more processes accordingly.

For example, a cluster with 80 weka servers and 200 compute nodes (aka clients) has 280 total hosts. With the default max_threads_per_proc of 100, it would spawn 3 processes (280 / 100 = 2.8, round up to 3).

It's recommended to have 1 available core per process. With the above example, you should deploy on a VM or server with at least 4 available cores.

The exporter will always try to allocate one host per thread, but will not exceed max_procs processes. If you have 1000's of hosts, it will double/triple up hosts on the threads.

For example, with 3000 hosts and defaults of max_procs of 8 and max_threads_per_procof 100, only 8 proccesses will be spawned, each with 100 threads, but there will be close to 4 hosts serviced per thread instead of the default 1 host per thread.

All other settings have pre-defined defaults that should work with weka-mon without modification.

If you want to add custom panels to Grafana containing other metrics from the cluster, you can uncomment any metrics you would like to gather.

To edit the file, do not add or delete any lines; all the configurable items are already in there but commented out with a #. To enable collecting data for these additional metrics, just uncomment them.

To edit the file, do not add or delete any lines; all the configurable items are already in there but commented out with a #. To enable collecting data for these additional metrics, just uncomment them.

For example, below is a snippet of the export.yml. To enable collecting the FILEATOMICOPEN_OPS statistic, remove the # character at the beginning of the line. Note that if the statistic you wish to gather is in a Category that is commented out, you will need to uncomment the Category line as well if it is not already uncommented (the first line in the example below). Conversely, to stop collecting a statistic, comment out the statistic by inserting a # at the beginning of the line.

 'ops_driver':     # Category
   'DIRECT_READ_SIZES':  'sizes'
   'DIRECT_WRITE_SIZES':  'sizes'
#   'FILEATOMICOPEN_LATENCY':  'microsecs'
#   'FILEATOMICOPEN_OPS':  'ops'

Step 4: Start the containers

To start the containers with docker-compose, run the following command:

docker-compose up -d

That's it! Grafana should appear on port 3000 on the server running the docker containers. The default credentials for Grafana are admin/admin.

Integrating with an existing Grafana/Prometheus environment

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.

Step 1: Install the Weka-mon package

Step 2: Import the dashboards

Step 3: Edit the export.yml (optional)

Step 4: Run the exporter

You can run the exporter in a number of ways - as a Docker container, as a compiled binary, or as a Python script. The Docker container is the simplest, but if you don't want or don't have Docker, you can run the binary directly. Running the Python scripts directly is also an option, but will require installing some Python Modules from PyPi.

Perform one of the next 3 steps - 4a, 4b, or 4c:

Step 4a: Getting and running the container

Get and run the container. There are no required command-line arguments, but you do need to fill in the export.yml configuration file. (see above)

The below example maps in several volumes: the ~/.weka directory (so the container can read the auth file), /dev/log so it can put entries in the Syslog, /etc/hosts so it has some name resolution (you can also use DNS if your Docker environment is set up to do so), and finally mapping the config file (export.yml) into the container.

There are other options, and you can run the command with --help or -h for a full description.

# get the container from dockerhub:
docker pull wekasolutions/export

# example of how to run the container
docker run -d --network=host \
  --mount type=bind,source=/root/.weka/,target=/weka/.weka/ \
  --mount type=bind,source=/dev/log,target=/dev/log \
  --mount type=bind,source=/etc/hosts,target=/etc/hosts \
  --mount type=bind,source=$PWD/export.yml,target=/weka/export.yml \
  wekasolutions/export -v
  

Step 4b: Getting the binary version

Then, run the exporter (see above for an explanation of the command-line arguments):

tar xvf export-1.3.0.tar
cd export
./export -v

Step 4c: Getting the sources

After cloning or unpacking the tarball, you will need to run pip3 install -r requirements.txt command to install all the required python modules.

Then, run the exporter (see above for an explanation of the command-line arguments):

./export -v

The easiest way to set up a Grafana environment is with Docker. For that, make sure docker-ce and docker-compose are installed on that machine. Installation instructions for installing Docker are on the .

To download a Release, go to in your web browser, and select the latest release. Click on the "Source Code" link to download. Copy this to your intended management server or VM and unpack it.

Follow the instructions appearing in the above section.

The dashboard JSON files are in the subdirectory weka-mon/var_lib_grafana/dashboards. Please follow the on how to import the files.

Follow the instructions appearing in the above section.

Go to and download the tarball from the latest release. As of the time of this last doc update, the current version is 1.3.0, so download the export-1.3.0.tar file from the Version-1.3.0 release. Copy this file to your management server or VM.

You can either git clone https://github.com/weka/export or go to and download the source tarball.

Docker website
https://github.com/weka/weka-mon/releases
Grafana documentation
https://github.com/weka/export/releases
https://github.com/weka/export/releases
Install the Weka-mon package
Edit the export.yml file
Screenshot of Weka Grafana Dashboard
Weka-mon GitHub Releases Page