Also select RRDTOOL_RRDCACHED if rrdcached plugin is used.

Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com>
---
 projectroot/etc/collectd.d/memory.conf    |  1 +
 projectroot/etc/collectd.d/ping.conf      |  5 +++++
 projectroot/etc/collectd.d/rrdcached.conf |  7 +++++++
 rules/collectd.in                         | 28 ++++++++++++++++++++++++++--
 rules/collectd.make                       |  6 +++---
 5 files changed, 42 insertions(+), 5 deletions(-)
 create mode 100644 projectroot/etc/collectd.d/memory.conf
 create mode 100644 projectroot/etc/collectd.d/ping.conf
 create mode 100644 projectroot/etc/collectd.d/rrdcached.conf

diff --git a/projectroot/etc/collectd.d/memory.conf 
b/projectroot/etc/collectd.d/memory.conf
new file mode 100644
index 000000000..249ff7f2e
--- /dev/null
+++ b/projectroot/etc/collectd.d/memory.conf
@@ -0,0 +1 @@
+LoadPlugin memory
diff --git a/projectroot/etc/collectd.d/ping.conf 
b/projectroot/etc/collectd.d/ping.conf
new file mode 100644
index 000000000..f8d63a1bb
--- /dev/null
+++ b/projectroot/etc/collectd.d/ping.conf
@@ -0,0 +1,5 @@
+LoadPlugin ping
+
+<Plugin "ping">
+  Host 8.8.8.8 # changeme
+</Plugin>
diff --git a/projectroot/etc/collectd.d/rrdcached.conf 
b/projectroot/etc/collectd.d/rrdcached.conf
new file mode 100644
index 000000000..9e8206677
--- /dev/null
+++ b/projectroot/etc/collectd.d/rrdcached.conf
@@ -0,0 +1,7 @@
+LoadPlugin rrdcached
+
+<Plugin "rrdcached">
+  DaemonAddress "unix:/tmp/rrdcached.sock"
+  DataDir "/var/lib/collectd/rrd"
+  CreateFiles true
+</Plugin>
diff --git a/rules/collectd.in b/rules/collectd.in
index ba359f092..015e4b6fe 100644
--- a/rules/collectd.in
+++ b/rules/collectd.in
@@ -2,8 +2,10 @@
 
 menuconfig COLLECTD
        tristate
-       select RRDTOOL          if COLLECTD_RRDTOOL
-       select LM_SENSORS       if COLLECTD_SENSORS
+       select LIBOPING                 if COLLECTD_PING
+       select RRDTOOL                  if COLLECTD_RRDTOOL || 
COLLECTD_RRDCACHED
+       select RRDTOOL_RRDCACHED        if COLLECTD_RRDCACHED
+       select LM_SENSORS               if COLLECTD_SENSORS
        prompt "collectd                      "
        help
          collectd is a daemon which collects system performance statistics
@@ -35,6 +37,13 @@ config COLLECTD_RRDTOOL
          With the RRDtool plugin, collectd writes values into a
          round-robin database, using librrd.
 
+config COLLECTD_RRDCACHED
+       bool
+       prompt "rrdcached"
+       help
+         Connects to the RRD caching daemon and submits updates
+         for RRD files to that daemon.
+
 comment "Read Plugins"
 
 config COLLECTD_CPU
@@ -44,6 +53,21 @@ config COLLECTD_CPU
          The CPU plugin collects data about what your CPU is actually doing,
          and if it is being idle or in the various states.
 
+config COLLECTD_MEMORY
+       bool
+       prompt "memory"
+       help
+         The Memory plugin collects physical memory utilization.
+
+config COLLECTD_PING
+       bool
+       prompt "ping"
+       help
+         The Ping plugin starts a new thread which sends ICMP "ping" packets
+         to the configured hosts periodically and measures the network
+         latency.
+
+
 config COLLECTD_SENSORS
        bool
        prompt "sensors"
diff --git a/rules/collectd.make b/rules/collectd.make
index 73d1a1154..0c1a11330 100644
--- a/rules/collectd.make
+++ b/rules/collectd.make
@@ -119,7 +119,7 @@ COLLECTD_ENABLE-                            += mbmon
 COLLECTD_ENABLE-                               += md
 COLLECTD_ENABLE-                               += memcachec
 COLLECTD_ENABLE-                               += memcached
-COLLECTD_ENABLE-                               += memory
+COLLECTD_ENABLE-$(PTXCONF_COLLECTD_MEMORY)     += memory
 COLLECTD_ENABLE-                               += mic
 COLLECTD_ENABLE-                               += modbus
 COLLECTD_ENABLE-                               += mqtt
@@ -144,7 +144,7 @@ COLLECTD_ENABLE-                            += oracle
 COLLECTD_ENABLE-                               += perl
 COLLECTD_ENABLE-                               += pf
 COLLECTD_ENABLE-                               += pinba
-COLLECTD_ENABLE-                               += ping
+COLLECTD_ENABLE-$(PTXCONF_COLLECTD_PING)       += ping
 COLLECTD_ENABLE-                               += postgresql
 COLLECTD_ENABLE-                               += powerdns
 COLLECTD_ENABLE-                               += processes
@@ -152,7 +152,7 @@ COLLECTD_ENABLE-                            += protocols
 COLLECTD_ENABLE-                               += python
 COLLECTD_ENABLE-                               += redis
 COLLECTD_ENABLE-                               += routeros
-COLLECTD_ENABLE-                               += rrdcached
+COLLECTD_ENABLE-$(PTXCONF_COLLECTD_RRDCACHED)  += rrdcached
 COLLECTD_ENABLE-$(PTXCONF_COLLECTD_RRDTOOL)    += rrdtool
 COLLECTD_ENABLE-$(PTXCONF_COLLECTD_SENSORS)    += sensors
 COLLECTD_ENABLE-                               += serial
-- 
2.12.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to