Commit Graph

7 Commits (3e8ac36f88481af3fdd35bf63fb024b04cd651a7)

Author SHA1 Message Date
Dustin ad96dc2757 r/collectd: Manage collectd.d directory
The `/etc/collectd.d` directory is created by the RPM package on
machines running a Red Hat-based Linux distribution, but it may not
always be present on other machines.
2022-08-10 19:47:12 -05:00
Dustin 8cab0b368e r/collectd: Ignore overlay filesystems
By default, the *df* pluggin for collectd, which monitors filesystem
usage, collects data about all mounted filesystems.  It can be
configured to ignore some filesystems, either by mount point, device, or
filesystem type.  We will uses this capability to avoid collecting data
about OverlayFS mounts, because by definition, they do not represent a
real filesystem, but one or more other mounted filesystems.  Collecting
data about these just creates useless metrics, especially on machines
that run containers.
2022-08-03 21:21:28 -05:00
Dustin 12c3fb950b r/collectd: Add custom types database
All values sent to *collectd* must have an associated type.  The type
defines the acceptable range of values.  Types are defined in a simple
text file database.  *collectd* loads all of the databases specified by
`TypesDB` directives in its configuration file.  When configuring a
custom types database, the default database needs to be specified
explicitly; it will not be loaded automatically if there are any
`TypesDB` directives in the configuration.
2021-10-30 16:47:29 -05:00
Dustin 32d1e0ff6f r/collectd: Enable unixsock plugin
The *unixsock* plugin for *collectd* provides a socket-based interface
that other software can use to communicate with *collectd*.  Notably,
this can be used to publish custom values, query existing values, and
flush caches.

The socket is created at `/run/collectd/socket`.  The `/run/collectd`
directory is managed by systemd; it will be created automatically when
the service starts and cleaned up when it stops.
2021-10-30 16:46:01 -05:00
Dustin 3e08588d98 collectd: Configure the processes plugin
The *processes* plugin for collectd can be configured to monitor
additional information about specific processes.  By specifying one or
more `Process` or `ProcessMatch` directives in the plugin configuration,
collectd will start monitoring the listed processes in detail.

The `collectd_processes` Ansible variable can contain a list of
processes to monitor.  Each item must at least have a `name` property,
and may also have a `regex` property.  If the latter is present, a
`ProcessMatch` directive will be emitted instead of a `Process`
directive.
2021-10-16 16:25:02 -05:00
Dustin 8e180d00ab collectd: Ensure service is enabled 2020-12-23 21:25:49 -06:00
Dustin cbbef24bbd collectd: Install and configure collectd
The *collectd* role, with its corresponding `collectd.yml` playbook,
installs *collectd* onto the managed node and manages basic
configuration for it.  By default, it will enable several plugins,
including the `network` plugin.  The `collectd_disable_plugins` variable
can be set to a list names of plugins that should NOT be enabled.

The default configuration for the `network` plugin instructs *collectd*
to send metrics to the default IPv6 multicast group.  Any host that has
joined this group and is listening on the specified UDP port (default
25826) can receive the data.  This allows for nearly zero configuration,
as the configuration does not need to be updated if the name or IP
address of the receiver changes.

This configuration is ready to be deployed without any variable changes
to all Pyrocufflink servers.  Once *collectd* is running on the servers,
we can set up a *collectd* instance to receive the data and store them
in a time series database (i.e. Prometheus).
2020-12-08 21:11:27 -06:00