collectd: Support config of mqtt plugin
authorAlexandros Kosiaris <redacted>
Tue, 14 Mar 2023 08:38:52 +0000 (10:38 +0200)
committerAlexandros Kosiaris <redacted>
Thu, 27 Jul 2023 06:49:28 +0000 (09:49 +0300)
commit530ccbc90daea6ad3cd24b3c2a7474005f8e6997
treecd896742874be117271816ce866bb4cd198602a2
parent89391d42138c05560b983dfac4d7405dea84eb23
collectd: Support config of mqtt plugin

mqtt plugin is already built and shipped in
collectd-mod-mqtt, however it is not possible to configure it via
uci currently, instead having to rely on populating the config file manually.

Add support by adding 2 functions, process_mqtt() and
process_mqtt_block(). First one just enables/disables the plugin.
The second one, in the spirit of the curl plugin, adds support for
populating multiple <Publish> and <Subscribe> blocks under <Plugin mqtt>
with support for some parameters. Those are:

* blocktype. Publish or Subscribe. Mandatory
* name. The name of the block. Mandatory
* Host. Mandatory
* Port. Optional
* User. Optional
* Password. Optional
* ClientId. Optional
* QoS. Optional
* Prefix. Optional
* Retain. Optional
* StoreRates. Optional
* CleanSession. Optional
* Topic. Optional

Bump PKG_RELEASE per comments in PR

Signed-off-by: Alexandros Kosiaris <redacted>
utils/collectd/Makefile
utils/collectd/files/collectd.init
utils/collectd/files/collectd.uci
utils/collectd/files/usr/share/collectd/plugin/mqtt.json [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT