aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-03-08 09:56:45 +0100
committerFlorian Eckert <fe@dev.tdt.de>2021-03-16 13:23:08 +0100
commit092902a87ee14e3b4b0b37a4ddb81719ae27fcc8 (patch)
tree0257676a371c38ed74b42558d63fec3f2d3e5c4c
parent87e52cf180921d1fb778298c1ee699e652639b79 (diff)
collectd: enable collectd-mod-smart
Switching on compilation for collectd smart plugin. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-rw-r--r--utils/collectd/Makefile17
-rw-r--r--utils/collectd/files/usr/share/collectd/plugin/smart.json10
2 files changed, 23 insertions, 4 deletions
diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile
index 5d4724601..551ccf556 100644
--- a/utils/collectd/Makefile
+++ b/utils/collectd/Makefile
@@ -101,7 +101,6 @@ COLLECTD_PLUGINS_DISABLED:= \
serial \
sigrok \
slurm \
- smart \
snmp_agent \
statsd \
synproxy \
@@ -184,6 +183,7 @@ COLLECTD_PLUGINS_SELECTED:= \
routeros \
rrdtool \
sensors \
+ smart \
snmp \
snmp6 \
swap \
@@ -251,8 +251,7 @@ CONFIGURE_ARGS+= \
--enable-daemon \
--with-nan-emulation \
--with-libyajl=no \
- --without-perl-bindings \
- --without-libudev
+ --without-perl-bindings
CONFIGURE_VARS+= \
CFLAGS="$$$$CFLAGS $(FPIC)" \
@@ -318,6 +317,15 @@ ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool),)
CONFIGURE_ARGS+= --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
endif
+# exception: mod-smart needs libatasmart
+ifneq ($(CONFIG_PACKAGE_collectd-mod-smart),)
+ CONFIGURE_ARGS+= \
+ --with-libatasmart="$(STAGING_DIR)/usr" \
+ --with-libudev="$(STAGING_DIR)/usr"
+else
+ CONFIGURE_ARGS+= --without-libudev
+endif
+
define Package/collectd/conffiles
/etc/collectd.conf
/etc/config/collectd
@@ -412,7 +420,7 @@ $(eval $(call BuildPlugin,curl,cURL input,curl,+PACKAGE_collectd-mod-curl:libcur
#$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi))
$(eval $(call BuildPlugin,df,disk space input,df,))
$(eval $(call BuildPlugin,dhcpleases,show dhcpleases,dhcpleases,))
-$(eval $(call BuildPlugin,disk,disk usage/timing input,disk,))
+$(eval $(call BuildPlugin,disk,disk usage/timing input,disk,+PACKAGE_collectd-mod-smart:libudev))
$(eval $(call BuildPlugin,dns,DNS traffic input,dns,+PACKAGE_collectd-mod-dns:libpcap))
$(eval $(call BuildPlugin,email,email output,email,))
$(eval $(call BuildPlugin,entropy,Entropy amount input,entropy,))
@@ -452,6 +460,7 @@ $(eval $(call BuildPlugin,protocols,network protocols input,protocols,))
$(eval $(call BuildPlugin,routeros,MikroTik RouterOS input,routeros,+PACKAGE_collectd-mod-routeros:librouteros))
$(eval $(call BuildPlugin,rrdtool,RRDtool output,rrdtool,+PACKAGE_collectd-mod-rrdtool:librrd1))
$(eval $(call BuildPlugin,sensors,lm_sensors input,sensors,+PACKAGE_collectd-mod-sensors:libsensors))
+$(eval $(call BuildPlugin,smart,smart input,smart,+PACKAGE_collectd-mod-smart:libatasmart))
$(eval $(call BuildPlugin,snmp,SNMP input,snmp,+PACKAGE_collectd-mod-snmp:libnetsnmp))
$(eval $(call BuildPlugin,snmp6,snmp6 input,snmp6,))
$(eval $(call BuildPlugin,swap,swap input,swap,))
diff --git a/utils/collectd/files/usr/share/collectd/plugin/smart.json b/utils/collectd/files/usr/share/collectd/plugin/smart.json
new file mode 100644
index 000000000..52d624687
--- /dev/null
+++ b/utils/collectd/files/usr/share/collectd/plugin/smart.json
@@ -0,0 +1,10 @@
+{
+ "bool": [
+ "IgnoreSelected",
+ "IgnoreSleepMode",
+ "UseSerial"
+ ],
+ "list": [
+ "Disk"
+ ]
+}