collectd: Support configuration of write_http plugin
authorAlexandros Kosiaris <akosiaris@gmail.com>
Mon, 20 Jun 2022 16:07:01 +0000 (19:07 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Tue, 21 Jun 2022 15:30:04 +0000 (18:30 +0300)
commit033c19acd7fb96cddd597f2c32ecf5963bc5ede6
tree26be23fe7f8b5ffea201bfe2e05c01790294f2a2
parentbed44796175768d6c0a37eb6a7eaf674fd2e8810
collectd: Support configuration of write_http plugin

write_http plugin is already built and shipped in
collectd-mod-write_http, 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_write_http() and
process_write_http_node(). First one just enables/disables the plugin.
The second one, in the spirit of the curl plugin, adds support for
populating multiple <Node> elements under <Plugin write_http> with
support for a few parameters. Those are:

* name. The name of the <Node>. Mandatory
* URL. Mandatory
* Format. Optional.
* User. Optional.
* Password. Optional.
* Timeout. Optional.
* BufferSize. Optional.

Signed-off-by: Alexandros Kosiaris <akosiaris@gmail.com>
utils/collectd/files/collectd.init
utils/collectd/files/collectd.uci
utils/collectd/files/usr/share/collectd/plugin/write_http.json [new file with mode: 0644]