aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2013-10-15 22:11:20 +0100
committerAndrew McDermott <andrew.mcdermott@linaro.org>2013-10-17 10:05:29 +0100
commit3465ecd59a583010b15f951537e83ea922882e7d (patch)
tree8f61f032ca801bd04a9b0ad9952b06163c404082 /meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb
parent8ce8e2bdf42ff96fba76f8bcddfa3f488fd22f6d (diff)
downloadmeta-linaro-3465ecd59a583010b15f951537e83ea922882e7d.tar.gz
meta-linaro: ganglia: add monitoring utilities to system startup
Added gmond and gmetad to system startup. Also ships with default configurations; for gmond this comes from running `gmond --default_config'. Change-Id: I5274b722245cbc2476b08c293a5b25d2cd25e36b Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb')
-rw-r--r--meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb43
1 files changed, 40 insertions, 3 deletions
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb b/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb
index a30d2e4a..f925884b 100644
--- a/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb
+++ b/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb
@@ -5,16 +5,21 @@ HOMEPAGE = "http://ganglia.sourceforge.net/"
SECTION = "console/utils"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://NEWS;md5=ff8c91481123c7d3be4e31fcac997747"
-DEPENDS = "apr confuse pcre python"
+DEPENDS = "apr confuse pcre python rrdtool"
SRC_URI = "\
${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+ file://gmetad-example.conf \
+ file://gmetad.init \
+ file://gmond-example.conf \
+ file://gmond.init \
"
-
SRC_URI[md5sum] = "05926bb18c22af508a3718a90b2e9a2c"
SRC_URI[sha256sum] = "89eae02e1a117040d60b3b561fe55f88d7f8cf41b94af1492969ef68e6797886"
-inherit autotools pythonnative
+EXTRA_OECONF += "--with-gmetad"
+
+inherit autotools pythonnative update-rc.d
# The ganglia autoconf setup doesn't include libmetrics in its
# AC_OUTPUT list -- it reconfigures libmetrics using its own rules.
@@ -27,4 +32,36 @@ do_configure_append() {
(cd libmetrics; autoreconf -fvi)
}
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ # gmetad expects the following directory and owned by user 'nobody'
+ install -o nobody -d ${D}${localstatedir}/lib/${PN}/rrds
+ # gmond and gmetad configurations
+ install -m 0644 ${WORKDIR}/gmetad-example.conf ${D}${sysconfdir}/gmetad.conf
+ install -m 0644 ${WORKDIR}/gmond-example.conf ${D}${sysconfdir}/gmond.conf
+ # Init scripts
+ install -m 0755 ${WORKDIR}/gmetad.init ${D}${sysconfdir}/init.d/gmetad
+ install -m 0755 ${WORKDIR}/gmond.init ${D}${sysconfdir}/init.d/gmond
+ # Fixup hard-coded paths
+ sed -i -e 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/gmetad
+ sed -i -e 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/gmond
+ sed -i -e 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/gmetad
+ sed -i -e 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/gmond
+ sed -i -e 's!/etc/conf.d/!${sysconfdir}/conf.d/!g' ${D}${sysconfdir}/gmond.conf
+}
+
+PACKAGES =+ "gmetad"
+
+RDEPENDS_${PN} = "gmetad"
+
BBCLASSEXTEND = "native"
+
+FILES_gmetad = "\
+ ${sbindir}/gmetad \
+ ${sysconfdir}/init.d/gmetad \
+"
+
+INITSCRIPT_PACKAGES = "${PN} gmetad"
+INITSCRIPT_NAME_ganglia = "gmond"
+INITSCRIPT_NAME_gmetad = "gmetad"
+INITSCRIPT_PARAMS = "defaults 66"