Code Monkey home page Code Monkey logo

glustermetrics's Introduction

Installation Process

Objective:

Run a Grafana instance to provide a monitoring dashboard to a gluster cluster.

Pre-requisites

Monitoring host

  • docker and docker-compose (for simplicity)
  • grafana image (official latest 4.3 release from docker hub)
  • graphite image (docker.io/abezhenar/graphite-centos7)
  • the storage for the graphite database should be on SSD/flash if possible

GlusterFS cluster machine

  • python
  • pip install graphitesend

Installation Sequence

Install the monitoring endpoint first, and then setup the collect points on each of the Gluster nodes.

Setting Up the monitoring endpoint

On the monitoring host, perform the following steps;

  1. Pull the required docker images (listed above)
  2. we need to persist the grafana configuration db and settings, as well as the graphite data.
mkdir -p /opt/docker/grafana/etc
mkdir -p /opt/docker/grafana/data/plugins
mkdir -p /opt/docker/graphite
  1. Download the additional status panel plugin
cd /opt/docker/grafana/data/plugins
wget https://grafana.com/api/plugins/vonage-status-panel/versions/1.0.4/download
unzip download
rm -f download
  1. Copy the seed .ini file for grafana to the containers etc directory, and reset the permissions to be compatible with the containers
cp etc/grafana/grafana.ini /opt/docker/grafana/etc
chown -R 104:107 /opt/docker/grafana
chown -R 997 /opt/docker/graphite
chmod g+w /opt/docker/graphite
  1. Edit the docker/docker-compose.yml example (if necessary)
  2. Run docker compose
cd docker/
docker-compose up -d
  1. check that the containers are running and the endpoints are listening 7.1 Use docker ps 7.2 use netstat and look for the following ports: 3000,80,2003,2004,7002

  2. Add the graphite instance as a datasource to grafana 8.1 register the graphite instance to grafana as the default data source

curl -u admin:admin -H "Content-Type: application/json" -X POST http://localhost:3000/api/datasources \
--data-binary @setup/add_datasource.json

Configuration on Each Gluster Node

  • You may need to update your SELINUX policy to allow the write_graphite plugin to access outbound on port 2003. To test, simply disable SELINUX

  • Install Gluster metrics library to enable tracking utilization, process and diskstats

    sudo pip install git+https://github.com/gluster/glustercli-python.git

  • Run below command to start sending metrics to graphite server

$ python gmetrics.py

Graphite server and hostname can be configured using,

$ python gmetrics.py --graphite-server localhost --hostname local

Configurations

To customize the gmetrics, create a config file and override the settings

    [settings]
    interval=10
    enabled_metrics=local_io,local_process
    prefix=gbench_testing
    group=perf_test_1

And call gmetrics.py using,

$ python gmetrics.py -c /root/gmetrics.conf --graphite-server localhost \
        --hostname local

Configuration change will be detected automatically by gmetrics.py, config file can be edited as required.

Available options for enabled_metrics are

    "local_io",
    "local_utilization",
    "local_diskstats",
    "local_process"

Known Issues

  • After login to grafana, currently users have to setup the dashboard themself.
  • (TODO) Update other known issues

Credits

Setting up of docker images for graphite and grafana section in this README is taken over from cephmetrics.

glustermetrics's People

Contributors

amarts avatar aravindavk avatar

Stargazers

 avatar  avatar  avatar John Lee avatar Toan Tran avatar Nicolas Hennion avatar  avatar  avatar Alexander Seryozhin avatar  avatar Manantsoa RAKOTONDRAZAKA avatar  avatar Ross Derewianko avatar Daniel Arvesen avatar Prashanth Pai avatar  avatar John Strunk avatar Raghavendra Talur avatar

Watchers

 avatar James Cloos avatar  avatar Alexander Seryozhin avatar John Strunk avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.