From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Robert Schwebel Date: Sun, 25 Jan 2015 01:37:23 +0100 Message-Id: <1422146246-11197-7-git-send-email-r.schwebel@pengutronix.de> In-Reply-To: <1422146246-11197-1-git-send-email-r.schwebel@pengutronix.de> References: <1422146246-11197-1-git-send-email-r.schwebel@pengutronix.de> Subject: [ptxdist] [PATCH 07/10] collectd: add support for rrdtool plugin Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Robert Schwebel Signed-off-by: Robert Schwebel --- generic/etc/collectd.d/rrdtool.conf | 10 ++++++++++ rules/collectd.in | 13 +++++++++++++ rules/collectd.make | 10 +++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 generic/etc/collectd.d/rrdtool.conf diff --git a/generic/etc/collectd.d/rrdtool.conf b/generic/etc/collectd.d/rrdtool.conf new file mode 100644 index 0000000..1f1190e --- /dev/null +++ b/generic/etc/collectd.d/rrdtool.conf @@ -0,0 +1,10 @@ +LoadPlugin rrdtool + + + DataDir "/var/lib/collectd/rrd" + CreateFilesAsync false + CacheTimeout 120 + CacheFlush 900 + WritesPerSecond 50 + + diff --git a/rules/collectd.in b/rules/collectd.in index c5a29d0..7d2d090 100644 --- a/rules/collectd.in +++ b/rules/collectd.in @@ -2,9 +2,22 @@ menuconfig COLLECTD tristate + select RRDTOOL if COLLECTD_RRDTOOL prompt "collectd " help collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files. +if COLLECTD + +comment "Write Plugins" + +config COLLECTD_RRDTOOL + bool + prompt "rrdtool" + help + With the RRDtool plugin, collectd writes values into a + round-robin database, using librrd. + +endif diff --git a/rules/collectd.make b/rules/collectd.make index e2268ae..ed5b5c5 100644 --- a/rules/collectd.make +++ b/rules/collectd.make @@ -127,7 +127,7 @@ COLLECTD_CONF_OPT := $(CROSS_AUTOCONF_USR) \ --disable-redis \ --disable-routeros \ --disable-rrdcached \ - --disable-rrdtool \ + --$(call ptx/endis, PTXCONF_COLLECTD_RRDTOOL)-rrdtool \ --disable-sensors \ --disable-serial \ --disable-sigrok \ @@ -195,6 +195,14 @@ ifdef PTXCONF_INITMETHOD_SYSTEMD /etc/systemd/system/multi-user.target.wants/collectd.service \ ) endif + + # Plugins + +ifdef PTXCONF_COLLECTD_RRDTOOL + @$(call install_copy, collectd, 0, 0, 0644, -, /usr/lib/collectd/rrdtool.so) + @$(call install_alternative, collectd, 0, 0, 0644, /etc/collectd.d/rrdtool.conf) +endif + @$(call install_finish, collectd) @$(call touch) -- 2.1.4 -- ptxdist mailing list ptxdist@pengutronix.de