Commit Graph

17 Commits (b2213416d0c6ed75d2a095e6f4d96a8c4d5fc4a1)

Author SHA1 Message Date
Dustin 7451026d75 r/collectd: Ignore efivarfs mounts
There's not much point in alerting based on the utilization of this
virtual filesystem.
2024-02-16 20:24:46 -06:00
Dustin 31fe128d48 r/collectd: Max unixsock plugin optional
Some hosts may not need this plugin, or may not have it installed.
Notably, it is not needed or used on my systems based on Buildroot,
since the only current use case for it is to keep track of the Fedora
version.
2022-08-10 21:55:54 -05:00
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 c48cc985b2 r/collectd: Ignore filesystems by path
In addition to ignoring particular types of filesystems, e.g. OverlayFS,
we can also ignore filesystems by their mount point.  This could be
useful, for example, for bind-mounted directories, such as those used on
Kubernetes nodes.
2022-08-05 18:56:48 -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 a60327a995 r/collectd: Allow the thermal plugin
Raspberry Pi devices provide SoC temperature information through thermal
zone data in sysfs.
2022-07-21 12:37:07 -05:00
Dustin 29a6a0540f r/collectd: Better control over enabled plugins
Instead of a simple list of disabled plugins, hosts and host groups can
now control whether plugins are enabled or disabled using the
`collectd_plugins` map.  The map keys are plugin names, and the values
are booleans indicating if the plugin is enabled.

Using this mechanism, some plugins can be disabled by default (e.g. the
*md* plugin), and enabling them per host or per host group is simpler.
2022-07-21 12:22:19 -05:00
Dustin c7ca8e5b15 r/collectd: Allow enabling the md plugin
The *md* plugin monitors Linux multi-disk RAID (*mdraid*) devices.
2022-07-21 12:22:19 -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 689d53abfd r/collectd: Disable network plugin by default
The default configuration for *collectd* no longer needs the network
plugin enabled, as hosts are scraped directly by Prometheus now.
2021-10-30 16:41:17 -05:00
Dustin 93bf6593d7 r/collectd: Add missing processes.conf template
I forgot to `git add` the template file.
2021-10-17 09:13:34 -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 58832b392b collectd: Add collectd_df variable
The `collectd_df` variable can be used to configure the *df* plugin for
collectd.  It should contain a map on key-value pairs that correspond
exactly to the plugin's configuration options.
2021-08-22 11:38:40 -05:00
Dustin 8e180d00ab collectd: Ensure service is enabled 2020-12-23 21:25:49 -06:00
Dustin 8d442b2aaf roles/collectd: Support setting server interface
For hosts with multiple network interfaces, collectd may not send
multicast messages through the correct interface.  To ensure that it
does, the `Interface` configuration option can be specified with each
`Server` option.  To define this option, entries in the
`collectd_network_servers` list can now have an `interface` property.
2020-12-23 20:54:48 -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