Search code examples
metricscollectd

Several questions regarding Collectd system stats collector


I've recently started checking Collectd system stats collector after using Intel Snap for a while. By far it seems that it is less dynamic then Snapd collector but maybe I'm simply not fully aware of its capabilities. I've got few questions regarding its use:

  1. Is it possible to collect only part of the metrics from each plugin? In case I'm not interested in all of them.
  2. Is it possible to dynamically change the metrics that are being collected, something similar to Snap tasks? For example collecting only part of the metrics of the first 3 plugins? Or I'll need to change the configuration file every time for that?
  3. I couldn't find the list of the stats/metrics that are being collected by each plugin, can I find it somewhere?
  4. For people who used both Intel Snap and Collectd, does Collectd has any advantages/disadvantages over Snap?

Thanks!


Solution

  • (1) Most collectd plugins support some sort of metric selection, and an inverse selection mechanism, which you can find in the plugin documentation. Also, there is the collectd "chain" plugin, that can be used to rename or filter metrics.

    (2) No. collectd does not natively support dynamic changes. See: https://github.com/collectd/collectd/issues/1005

    (3) A couple ways. Look at the man pages for collectd if you aren't finding what you need on the collectd wiki. If you want to check the running collectd process, then a good way to see the metrics is to enable a unixsock plugin, and use the "collectdctl listval" for metric introspection

    (4) Pros and cons to both

    • collectd is more mature
    • collectd supports more legacy and embedded systems
    • collectd is light-weight with many compile time options and embedded interpreters
    • collectd plugins are more frequently available via the OS distribution packages

    • snap supports dynamic configuration (see answer to #2)

    • snap plugin docmentation is more clear. E.g. see the metric lists, roadmap, and install directions
    • snap task scheduling is more advanced : (I know this from suffering the pain for trying to match input plugin intervals to output plugin intervals in collectd)
    • snap processors provide more funcionality than collectd. E.g. I know of no equivalent to tag or anomalydetection from snap in collectd

    collectd and snap do not support the same set of plugins. The presence or lack of plugin will be a clear advanatage/disadvantage based on use case. The method of building a plugin also differs greatly, so that could be a factor as well.