This article shows how to use Fluentd to collect GlusterFS logs for analysis (search, analytics, troubleshooting, etc.)
GlusterFS is an open source, distributed file system commercially supported by Red Hat, Inc. Each node in GlusterFS generates its own logs, and it's sometimes convenient to have these logs collected in a central location for analysis (e.g., When one GlusterFS node went down, what was happening on other nodes?).
Fluentd is an open source data collector for high-volume data streams. It's a great fit for monitoring GlusterFS clusters because:
Fluentd supports GlusterFS logs as a data source.
Fluentd supports various output systems (e.g., Elasticsearch,
MongoDB, Treasure Data, etc.) that can help GlusterFS users analyze
The rest of this article explains how to set up Fluentd with GlusterFS. For this example, we chose Elasticsearch as the backend system.
Setting up Fluentd on GlusterFS Nodes
Step 1: Installing Fluentd
First, we'll install Fluentd using the following command:
$ curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh
Next, we'll install the Fluentd plugin for GlusterFS: