KB450091 – Gdash – Glusterfs monitoring tool

Last modified: October 23, 2019
You are here:
Estimated reading time: 1 min

Gdash is a python-written web-based monitoring tool for Glusterfs. It can be installed on any or all of the nodes in the cluster. Once installed and a service is created, you can monitor your cluster in a browser at W.X.Y.Z:8080 (W.X.Y.Z = IP of the node)

Installing packages

The first package needed is python2-pip – this is installed if you used preconfig before setting up the cluster. To ensure it is installed run :

    rpm -qa | grep python2-pip

If that provides no output, then run

    yum install python2-pip -y

Next you’ll want to upgrade pip to the latest version and install gdash through pip

    pip install --upgrade pip
    pip install gdash

There is an issue with the latest version of gdash that we need to fix. First we need to install flask-caching

    pip install flask-caching

Now we need to edit line 12 of /usr/lib/python2.7/site-packages/gdash/app.py ( make it “from flask_caching import cache )

    vim /usr/lib/python2.7/site-packages/gdash/app.py
     # -*- coding: utf-8 -*-
     """
     gdash.main.py
     :copyright: (c) 2014 by Aravinda VK
     :license: MIT, see LICENSE for more details.
     """
     
     from argparse import ArgumentParser, RawDescriptionHelpFormatter
     import ConfigParser
     from flask import Flask, render_template, Response
     from flask_caching import Cache    (THIS LINE)
     import json
     import os
     import sys
     
     from gdash.cliparser import parse
     ...

Creating Gdash service

To make Gdash a service, we need to create the /usr/lib/systemd/system/gdash.service file:

   vim /usr/lib/systemd/system/gdash.service 

Enter the following text into the file:

   [Unit]
   Description=Gdash
   
   [Service]
   ExecStart=/usr/bin/gdash
   
   [Instsall]
   WantedBy=multi-user.target

Now you’re ready to enable and start the Gdash service

   systemctl enable gdash && systemctl start gdash

Now the web UI should be up and running at the Ip address of the node :8080

Was this article helpful?
Dislike 0
Views: 208
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access