Commit Graph

15 Commits (master)

Author SHA1 Message Date
Dustin eedf030dae p/vm: Update to 1.85.3
dustin/metricspi/pipeline/pr-master This commit looks good Details
dustin/metricspi/pipeline/head This commit looks good Details
2022-12-22 13:52:20 -06:00
Dustin e3a349e3a1 pkg/alertmanager: Configure state directory
dustin/metricspi/pipeline/head This commit looks good Details
AlertManager is a stateful service, and as such needs a writable
location for its data.  Using the `StateDirectory` service unit
directive, we can configure systemd to create this directory
automatically, if it does not already exist when the service starts.

In order for the service to be able to write to the state directory, it
must have a stable UID.  This means it cannot use the `DynamicUser`
service unit directive.
2022-08-10 18:21:36 -05:00
Dustin 276bcce2a4 pkg/victoriametrics: Fix up vmalert unit file
dustin/metricspi/pipeline/head This commit looks good Details
I really bundled the `vmalert.service` unit file.  I obviously copied it
from `vmagent.service` but didn't finish editing it.
2022-08-10 18:02:55 -05:00
Dustin 8099546ec8 pkg/alertmanager: Add systemd unit
dustin/metricspi/pipeline/head This commit looks good Details
The *alertmanager.service* systemd unit allows the AlertManager to run
as a daemon process.
2022-08-10 17:40:17 -05:00
Dustin 7fddc6fef5 pkg/v-m: vmagent: Remove IP address restrictions
dustin/metricspi/pipeline/head This commit looks good Details
Setting `IPAddressAllow` and `IPAddressDeny` instructs systemd to
construct BPF firewall rules to restrict traffic.  Since `vmagent` is
responsible for scraping metrics from hosts on the network, it does not
make any sense to restrict it to localhost-only communication.
2022-08-07 21:29:26 -05:00
Dustin c1a6f3bb8e package/v-m: Remove DynamicUser from systemd units
None of the Victoria Metrics services should run as a dynamic user.
Indeed, enabling the setting appears to have no effect when `User` is
defined and refers to a user that already exists.  To reduce confusion,
we should omit these directives from the unit files.
2022-08-07 21:26:49 -05:00
Dustin a836526d40 Add and enable blackbox_exporter package
dustin/metricspi/pipeline/head There was a failure building this commit Details
*blackbox_exporter* is a generic exporter for Prometheus that can be
used to provide metrics about HTTP, etc. services.  I use it to monitor
the availability and responsiveness of websites I host.
2022-08-06 16:05:21 -05:00
Dustin 5fd8878417 Define victoriametrics user in the package
dustin/metricspi/pipeline/head This commit looks good Details
When I originally added the *victoriametrics* user to the `users` file,
I did not realize that it was possible for a package to define a user.
It makes much more sense to define it there.
2022-06-28 17:13:53 -05:00
Dustin d99c3b8f4c Merge victoriametrics and vmutils packages
There's no reason for these to be separate packages.  They come from the
same source tree, so having a single package makes more sense.  I only
separated them originally because I wasn't sure exactly how to express
the proper options in the kconfig language.
2022-06-28 17:13:53 -05:00
Dustin 66e8246c3b Add systemd units for Victoria Metrics
I think it makes the most sense to install the systemd unit files for
services along with their binaries.  This is how most software provided
by Linux distribution package manager works.  Providing the systemd unit
with the package eliminates the need for variability, since the paths to
the executable and other files are well defined.
2022-06-28 17:02:03 -05:00
Dustin 37cea1dd47 dhcpcd: Wait for carrier before active
In order to ensure that network interfaces are active, but not
necessarily fully configured, before *network.target* is reached, the
*dhcpcd.service* unit now waits until at least one interface has
processed the `CARRIER` event before being marked as active.  This is
accomplished using the *sd_notify* infrastructure, via the
`systemd-notify` command, executed in a client configuration hook
script.
2022-06-28 17:02:03 -05:00
Dustin a299e3d91c grafana: Install grafana-server.service 2022-06-28 17:02:03 -05:00
Dustin 52e28b6912 dhcpcd: Fix startup process
The *dhcpcd.service* systemd unit file that ships with Buildroot is
broken.  It orders the unit after *network.target*, which makes no
sense.  It also configures the process to fork, but incorrectly
configures the PID file.  Finally, by relying on the fork to indicate
that the network is "online," it does not distinguish between "an
interface is up" and "the network is reachable."  As most daemons only
need the former, they only rely on *network.target*, and thus can fail
to start correctly.

To correct this brokenness, we provide our own unit file for
*dhcpcd.service*, based on the one included in the Fedora *dhcpcd* RPM
package.  For "online" signalling, we provide a pair of shell scripts:
one reads from a named pipe waiting for a message and the other sends a
message to the pipe when configuration is complete.
2022-06-27 10:25:07 -05:00
Dustin 5a9e9c0597 Add Grafana, AlertManager, vmutils
The *vmutils* package can be built from source easily, as its just a
collection of Go applications.  Grafana and Alertmanager are quite a bit
more complicated because of their respective browser applications.  In
the interest of getting this project actually going, we'll just install
the official binary releases of these (for now?).
2022-06-26 12:35:12 -05:00
Dustin 2befb681c7 Install Victoria Metrics
dustin/metricspi/pipeline/head This commit looks good Details
Victoria Metrics is not available by default with Buildroot, but adding
a package description for it is very straightforward.  The flags and
tags are specified within Victoria Metrics's own Makefile.
2022-06-23 10:59:07 -05:00