[collectd] Monitoring a shared SAN disk

Amos Shapira amos.shapira at gmail.com
Thu Sep 16 05:30:33 CEST 2010


Hello,

I'm configuring collectd to monitor statistics of multiple filesystems
on multiple LUN's on a shared SAN disk (i.e. the same ext3 filesystem
can be mounted at every point in time on up to 1 of many servers in a
cluster).

Each group of filesystems is "attached" to a process and a Virtual IP
address which get moved around (via RedHat Cluster Suite).
So I can tell that whenever I access a specific VIP I'll should see
that group of file systems mounted on that particular server.

The problem I'm facing is that collectd as it is now just sends the
data per *server* (as opposed to "per *service*"). So the file systems
are treated differently if they are reported while mounted on server A
vs. when they are mounted on server B.

I'm thinking of solving this problem by:
1. prepare a self-contained configuration file for each "file system
group". It will list the "Hostname" to be of the VIP associated with
it (given a proper internal DNS name), so it can be the same on
whichever server owns this resource group.
2. As part of the resource group which defines the service (file
system, processes), I'll add a collectd instance which will use the
configuration file setup in (1).

Another way, which I'm not sure I understand correctly, might be to
write a Filter using the Perl plugin. I see in "collectd-perl(5)" that
the write function can dictate the host name that the values will be
sent from. Would it be possible to write a Perl plugin which will
filter the results of the "df" and "disk" plugins, decide which of
them is relevant in the current constellation, then send them with the
right $hostname?

Any comments about this plan? Is it sane? Is there a better way
(mainly - more efficient on resources) to achieve what I want?

Thanks.

--Amos



More information about the collectd mailing list