Commit Graph

7 Commits (77c64081872e1491b75563da4d8453b9bfe99e8a)

Author SHA1 Message Date
Dustin cfffd1d782 collectd: Only configure SELinux when used
The `selinux_permissive` module fails on hosts that do not have SELinux
activated.  We must skip running this task on those machines to avoid
fatal errors.
2022-08-14 19:39:02 -05:00
Dustin 8f90d802f4 collectd: Only install collectd-version on Red Hat
Although the `collectd-version` script is fairly generic and *should*
work for most Linux distributions, it cannot be installed on machines
that a have an immutable root filesystem, e.g. Buildroot-based systems.
For Buildroot-based systems in particular, tracking the OS version makes
very little sense anyway.  If we do end up with hosts running an OS
besides either Fedora or Buildroot, we can re-evaluate how to deploy
this feature.
2022-08-10 19:47:12 -05:00
Dustin c9dbaa32b9 collectd: Control SELinux domain permissiveness
It seems with each new release of Fedora, some feature or other of
*collectd* gets broken.  In Feodra 36, the *interfaces* plugin does not
seem to work reliably, and the *md* plugin logs a *lot* of errors.
While these issues are investigated upstream, we either need to manage
our own policy for collectd or mark the `collectd_t` domain permissive.
I chose the latter because I'm lazy and I don't consider collectd to be
that big of a threat to security.
2022-07-24 10:35:32 -05:00
Dustin ee0e6873ad r/collectd-sensors: Install collectd sensors plugin
The *sensors* plugin for collectd reads temperature information from the
I²C/SMBus using *lm_sensors*.  Naturally, it is only useful on physical
machines, so it is not installed or enabled by default.
2022-07-21 13:14:25 -05:00
Dustin a178dc4af9 r/collectd-version: Add OS version plugin
The `collectd-version` script uses the *collectd* UNIX socket to send
custom values to *collectd* to track the OS version.  Since these values
obviously cannot change while the system is running, the values are
specified with a very long interval.  This avoids having to continuously
insert the values, either with a long-running process or by repeatedly
running a script.  The values only need to be inserted once when
*collectd* starts.
2021-10-30 16:50:37 -05:00
Dustin 881c8de625 Switch Prometheus/collectd to pull
Transitioning from push-based to pull-based monitoring with
Prometheus/collectd.  The *write_prometheus* plugin will be installed on
all hosts, and Prometheus will be configured to scrape them directly.
2021-10-30 16:41:17 -05: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