From: Florian Eckert Date: Mon, 8 Mar 2021 08:56:45 +0000 (+0100) Subject: collectd: enable collectd-mod-smart X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=092902a87ee14e3b4b0b37a4ddb81719ae27fcc8;p=feed%2Fpackages.git collectd: enable collectd-mod-smart Switching on compilation for collectd smart plugin. Signed-off-by: Florian Eckert --- diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile index 5d4724601b..551ccf5568 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 0000000000..52d6246879 --- /dev/null +++ b/utils/collectd/files/usr/share/collectd/plugin/smart.json @@ -0,0 +1,10 @@ +{ + "bool": [ + "IgnoreSelected", + "IgnoreSleepMode", + "UseSerial" + ], + "list": [ + "Disk" + ] +}