Getting useful metrics from GlusterFS into Grafana using Diamond!

0 Comments

Recently one of the RedHat maintainers of GlusterFS requested that I do a quick writeup of the new Diamond collector that I wrote as a way of introducing metrics gathering for GlusterFS using Diamond to feed InfluxDB and ultimately Grafana.

For those of you not familiar with the Diamond metrics collector and publisher, it was originally created by Brightcove to be able to handle the vast amount of metrics they get from their infrastructure and is a very lite weight, fast, extensible and simple way of getting those important metrics delivered into Graphite, MySQL, InfluxDB, RabbitMQ and quite a few more to boot. It’s written in Python which means writing new collectors (modules used to collect the wanted metrics from subsystems) and handlers (modules allowing the publishing of metrics to different storage systems) are a snap.

Anywho. Prior to being able to collect any metrics at all, you will need to enable profiling on the volumes you wish metrics for.

gluster volume profile <VOLUMENAME> start

The GlusterFS collector is the same as all other collectors in that you install it into its own directory under the collectors directory (on Debian systems this is /usr/share/diamond/collectors/glusterfs). After that you create a file called /etc/diamond/collectors/GlusterFSCollector.conf with the following (the only required entry is “enabled”).

enabled = True
gluster_path = /usr/sbin/gluster
target_brick = <brickname>
target_volume = <volumename>

The gluster_path option defaults to “/usr/sbin/gluster”. If target_brick and/or target_volume is excluded from the configuration then metrics on all bricks and volumes reported by /usr/sbin/gluster are sent to the active handler. Depending on your infrastructure the limiting of reported metrics to certain bricks and volumes could be a major bandwidth saver as well as eliminating duplication of information.

Until the collector is officially accepted into the Diamond project you can get a copy from the ITAdmins Wiki.

As always, enjoy.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.