Commit Graph

43 Commits

Author SHA1 Message Date
Alexandros Kosiaris 530ccbc90d 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 <akosiaris@gmail.com>
2023-07-27 09:49:28 +03:00
Maxim Storchak 8270bd173e collectd: enable AllPortsSummary for tcpconns plugin
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
2023-05-29 23:39:38 +03:00
Florian Eckert 4446e8fd16 collectd: extend network uci plugin
The network plugin from collectd also has the option to encrypt the
metrics when sending them to another server. Until now, this was not
possible via the UCI. This commit adds that feature.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-09-05 15:28:29 +02:00
Florian Eckert 3617cb311a
Merge pull request #18778 from bluebrother/collectd-dsl-fixes
collectd: Fix various issues with lantiq dsl metrics.
2022-06-24 09:29:10 +02:00
Dominik Riebeling eb632da5bb collectd: Fix various issues with lantiq dsl metrics.
- Handle bool values correctly. We get the values as bool, but collectd
  requires a bool value to be numeric in the range [0, 1].
- Remove profile and mode values. Those are strings, which cannot be
  represented by collectd.
- Update collectd type for some values.
- Fix latn value being present twice.

Signed-off-by: Dominik Riebeling <bluebrother@posteo.de>
2022-06-22 19:02:44 +02:00
Alexandros Kosiaris 033c19acd7 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>
2022-06-21 18:30:04 +03:00
Jeroen Peelaerts 533c072ee0 collectd: Add lua and exec collectors for lantiq dsl metrics
Signed-off-by: Jeroen Peelaerts <jeroen.peelaerts@gmail.com>
2021-10-22 22:10:17 +02:00
Kevin Darbyshire-Bryant 9db12bbaff collectd: sqm_collect: optimise parent search
There can be only 1 parent process ID, so as soon as we find it, print
it and exit - there's no point searching any of the following lines

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-10-06 12:13:11 +01:00
Kevin Darbyshire-Bryant 8322059f01 collectd: sqm_collect: handle being orphaned
If the master collectd instance gets shut down in an uncontrolled
manner (crashes!) then sqm_collect scripts will be left orphaned and
will run forever.

Modify script to check if it still has a parent and if not, exit.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-10-02 20:37:08 +01:00
John Kohl b5782a0f0d collectd-mod-ping: add support for MaxMissed
Signed-off-by: John Kohl <jtk.git@bostonpog.org>
2021-08-15 10:38:35 +03:00
Florian Eckert 092902a87e collectd: enable collectd-mod-smart
Switching on compilation for collectd smart plugin.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-03-16 13:23:08 +01:00
Maxim Storchak 0412c27fda collectd: enable swap plugin
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
2021-01-10 10:22:54 +02:00
Maxim Storchak 8ab9fd7fff collectd: expose more global parameters to uci
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
2021-01-10 10:22:54 +02:00
Maxim Storchak a5d87390f2 collectd: remove extra newlines from the generated config
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
2021-01-10 10:22:54 +02:00
Maxim Storchak fdd53a4c60 collectd: fix the wrong var name
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
2021-01-10 10:22:54 +02:00
Florian Eckert d2d6220476 collectd: remove quotation on interval this is an number
The value is a number and not a string.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-06-24 20:09:09 +02:00
Florian Eckert 50f56c2ede collectd: move include line
Currently the init script generates a config file from uci, that has the
include line before the interval line. This means, that anything happening
in the include directory does not yet see the changed Interval.

Moving the include line before the uci generation process fix this issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-06-24 20:09:09 +02:00
Florian Eckert a481a2006c collectd: add ubi uci and plugin info
Add uci binding for ubi plugin.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-06-24 13:20:11 +02:00
Kevin Darbyshire-Bryant c2c91ea99e collectd: sqm_collect: tidy interval string handling
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-05-25 22:37:17 +01:00
Kevin Darbyshire-Bryant 947c85bff0 collectd: sqm_collectd: improve error handling
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-05-25 12:39:53 +01:00
Kevin Darbyshire-Bryant a809dc6f3b collectd: Improve sqm_collectd error reporting
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-05-17 16:17:07 +01:00
Kevin Darbyshire-Bryant c8640d1f68 collectd: sqm_collectd improve interface name filter
Increase the range of characters that get substituted by '_' so the
shell doesn't complain about illegal variable names.

Primarily done to catch '.' and '-' but who knows what funnies will
appear in i/f names.

It's a shame that busybox ash doesn't understand :alnum:

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-05-07 10:48:45 +01:00
Kevin Darbyshire-Bryant 38235de9c3 collectd: SQM collect data from some qdiscs
Add a script that can collect data from mq (multi queue) and cake
qdiscs.

Script is reliant on collectd's 'exec' module.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-05-05 12:00:56 +01:00
Florian Eckert bb666cc9ff collectd: add syslog json plugin
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-05-04 14:51:14 +02:00
Marcin Jurkowski 3763b238e7 collectd: add vmem uci config
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2019-12-11 00:22:47 +01:00
Florian Eckert f4349995e6 collectd: add reload and service trigger
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-20 16:09:26 +02:00
Florian Eckert 2b221b5b06 collectd: add logfile plugin definitions
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-20 16:09:24 +02:00
Florian Eckert 6141aa2f23 collectd: add iptables uci config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-17 10:15:46 +02:00
Florian Eckert 7d3cbda4af collectd: add network uci config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-17 10:15:34 +02:00
Florian Eckert 1205ab461b collectd: add curl uci config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-17 10:15:26 +02:00
Florian Eckert 55eb459887 collectd: add apcups uci config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-17 10:15:18 +02:00
Florian Eckert 1082477fbc collectd: add new memory config values
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-13 13:01:23 +02:00
Florian Eckert cae6563091 collectd: add new cpu config values
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-09-13 13:00:49 +02:00
Yousong Zhou 6583414797 collectd: use uname to get default Hostname
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-08-10 09:52:22 +08:00
Yousong Zhou 02840f4c2a collectd: log stderr output
Collectd without log type plugin loaded will write log lines to stderr.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-08-10 09:52:22 +08:00
Florian Eckert 6c64f8f4ba collectd: move jshn.sh include to remove warning
Redmine-patch-id: 3680
If I build an image with the imagebuilder I get the following output
during image building:

../root-x86/etc/init.d/collectd: line 4: /usr/share/libubox/jshn.sh:
No such file or directory

To remove this messsage move include to the needed postion, so that the
message does not occur during image building on the host system anymore.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-04 13:14:40 +02:00
Florian Eckert 3d15ebca31 collectd: add uci config support
Add uci config support.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-04-25 13:01:42 +02:00
Marc Benoit b33ec70c95 utils/collectd: run with low priority
Even on a powerful platform a collectd process'
activities are sometimes affecting throoughput and
latency. This is a backgroud process, that should not
be running with default priority.
Even if it is a little deplayed, that is not a worry in
this case. The routing should be the main priority,
stats collection can wait a bit.

Tested on Netgear R7800
Signed-off-by: Marc Benoit <marcb62185@gmail.com>
Make niceness more moderate, bump version.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-07-08 10:14:35 +03:00
Jo-Philipp Wich ea01eccee0 collectd: ensure that /var/lib/collectd exists
With the conversion to procd a required mkdir has been dropped, readd it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-27 21:45:36 +02:00
Jo-Philipp Wich 8228cee3f3 collectd: stop service on shutdown
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-15 12:33:32 +02:00
Hannu Nyman a62ff02b8d collectd: use procd
Change collectd to use procd for startup.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-02-03 19:00:14 +02:00
Hannu Nyman 8e944a0826 collectd: Clarify config file example/placeholder
The config file shipped with collectd dates from 2010 and
leads to error messages if luci-statistics & collectd are installed,
as it references several plugins not usually installed, or such ones
that have been renamed since then.

For most users, this file is just a placeholder during collectd installation,
as /usr/bin/stat-genconfig from /etc/init.d/luci_statistics will overwrite it.

Sanitize and shorten the placeholder config file:
* Reference actively only the default plugins installed by luci statistics.
* Match the placeholder config with the genuine config from luci statistics.

If somebody uses collectd separately from luci statistics, he will need to
edit these settings anyway.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-30 10:51:37 +03:00
Jo-Philipp Wich 56fd1eaa78 collectd: import from packages, add myself as maintainer
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-06-11 16:43:00 +02:00