Ganglia is a very good monitoring tool. You can install backand to tracking machines (sys-cluster/ganglia) and use web frontend (sys-clusted/ganglia-web) to see pretty graphics. After installing backend, you must configure /etc/ganglia/gmond.conf

...
cluster {
  name = "jassy"
  owner = "hoxnox"
  latlong = "unspecified"
  url = "unspecified"
}
...
host {
  location = "jassy"
}
...
udp_send_channel {
  host = 192.168.3.3
  port = 8649
  ttl = 1
}
...
udp_recv_channel {
  port = 8649
  bind = 192.168.3.3
  retry_bind = true
}
...

and /etc/ganglia/gmetad.conf

...
RRAs "RRA:AVERAGE:0.5:1:5856" "RRA:AVERAGE:0.5:4:20160" "RRA:AVERAGE:0.5:40:52704"
...
trusted_hosts 127.0.0.1 192.168.30.20 192.168.4.2
...

After starting gmond and gmetad, you can get statistic:

☯ ~  gstat
CLUSTER INFORMATION
       Name: jassy
      Hosts: 1
Gexec Hosts: 0
 Dead Hosts: 0
  Localtime: Thu Oct 22 22:46:08 2015

☭  ~  nc 192.168.30.3 8651
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!DOCTYPE GANGLIA_XML [
   <!ELEMENT GANGLIA_XML (GRID|CLUSTER|HOST)*>

    ...

Out of the box there is no disk io statistic. But there is wonderful ganglia-modules-linux project. I wrote ebuild for it:

# @author Merder Kim
# Distributed under the terms of the Apache license
# Ganglia Linux Modules ebuild script

EAPI=5

inherit autotools-utils eutils

DESCRIPTION="Ganglia linux modules"
HOMEPAGE="https://github.com/ganglia/ganglia-modules-linux"
SRC_URI="https://github.com/ganglia/${PN}/archive/${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
#S="${WORKDIR}/${PN}-${PV}"
LICENSE="Apache"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="sys-cluster/ganglia"
DEPEND="sys-devel/autoconf
        sys-devel/automake
        sys-devel/libtool
        dev-util/pkgconfig
        ${RDEPEND}"

# bug 123456
AUTOTOOLS_IN_SOURCE_BUILD=1

src_prepare()
{
    mkdir m4 && autoreconf --install
}

src_configure()
{
    econf \
        CFLAGS="`apr-1-config --cflags --includes`" \
        --docdir="\$(datarootdir)/doc/${PF}/html" \
        --enable-shared \
        --disable-static
        --prefix="${D}"
    emake || die "emake failed"
}

src_install()
{
    emake DESTDIR="${D}" install || die "emake install failed"
}

There is one problem - ganglia-modules-linux provides better multicpu module. So I had to add COLLISION_IGNORE="/usr/lib/ganglia/modmulticpu.so" into my portage configuration.


Comments

comments powered by Disqus