[Gluster-users] anyone else playing with gcollect yet?
Craig Carl
craig at gestas.net
Fri Jul 29 01:09:48 UTC 2011
Phil -
Gcollect is agnostic as to the data collector, it is designed to
support adding collectors on the fly. Using the collecd-exec plugin
and PUTVAL it should be easyish to add collectd support. Here is
(roughly) what you need to do -
copy ganglia.d/* to collectd.d/*
edit the bottom of each file in collectd.d, basically you need to
replace the gmetric commands with PUTVALs -
gmetric --name=brick_${GLUSTER_BRICK_MP}_disk_read_io
--value=${IO_KBS_READ} --type=int32 --units=kilobytes
--group=${GLUSTER_VOLNAME}
gmetric --name=brick_${GLUSTER_BRICK_MP}_disk_write_io
--value=${IO_KBS_WRITE} --type=int32 --units=kilobytes
--group=${GLUSTER_VOLNAME}
gmetric --name=fuse_net_io_rx --value=${NET_IO_KBS_RX} --type=int32
--units=kilobytes --group=${GLUSTER_VOLNAME}
gmetric --name=fuse_net_io_tx --value=${NET_IO_KBS_TX} --type=int32
--units=kilobytes --group=${GLUSTER_VOLNAME}
gmetric --name=nfs_net_io_rx --value=${NFS_IO_KBS_RX} --type=int32
--units=kilobytes --group=nfs-common
gmetric --name=nfs_net_io_tx --value=${NFS_IO_KBS_TX} --type=int32
--units=kilobytes --group=nfs-common
would become something like -
PUTVAL $HOSTNAME/$GLUSTER_VOLNAME/$GLUSTER_BRICK_MP/disk_read_io
interval=600 N:$IO_KBS_READ
PUTVAL $HOSTNAME/$GLUSTER_VOLNAME/$GLUSTER_BRICK_MP/disk_write_io
interval=600 N:$IO_KBS_WRITE
PUTVAL $HOSTNAME/$GLUSTER_VOLNAME/fuse_net_io_rx interval=600 N:$NET_IO_KBS_RX
PUTVAL $HOSTNAME/$GLUSTER_VOLNAME/fuse_net_io_tx interval=600 N:$NET_IO_KBS_TX
PUTVAL $HOSTNAME/$GLUSTER_VOLNAME/nfs_net_io_rx interval=600 N:$NFS_IO_KBS_RX
PUTVAL $HOSTNAME/$GLUSTER_VOLNAME/nfs_net_io_tx interval=600 N:$NFS_IO_KBS_TX
Change line 9 of gcollect.cfg to "collector = collectd"
Then you would want to execute gcollect using collectd-exec every 5 min.
Does that help you get started?
Craig
craig at gestas.net
More information about the Gluster-users
mailing list