Commit Graph

176 Commits (ed42f848b99f138acd4fa6126d0fa231aa1cec11)

Author SHA1 Message Date
Dustin a4cc9d0c46 metricspi: Scrape tabitha.biz 2023-04-23 20:03:43 -05:00
Dustin 6c68126a3a grafana: Update LDAP server host name
*dc0.p.b* has been gone for a while now.  All the current domain
controllers use LDAPS certificates signed by Let's Encrypt and include
the *pyrocufflink.blue* name, so we can now use the apex domain A record
to connect to the directory.
2023-04-12 14:07:51 -05:00
Dustin 78f65355fa gitea: Back up with BURP 2023-04-12 14:07:51 -05:00
Dustin 1da4c17a8c alerts: Add alerts for HTTPS certificates
These alerts will generate notifications when websites' HTTPS
certificates are not properly renewed automatically and become in danger
of expiring.
2023-04-12 13:55:31 -05:00
Dustin bf4133652c metrics: Scrape Jenkins with blackbox exporter
This is mostly to monitor the HTTPS certificate expiration.
2023-04-12 13:55:31 -05:00
Dustin dc2a05dc8f alerts: Add alert for BURP RAID array swap
This alert counts how long its been since the number of "active" disks
in the RAID array on the BURP server has changed.  The assumption is
that the number will typically be `1`, but it will be `2` when the
second disk synchronized before the swap occurs.
2023-04-11 22:25:36 -05:00
Dustin 2394bf7436 metricspi: Fix vmalert links
1. Grafana 8 changed the format of the query string parameters for the
   Explore page.
2. vmalert no longer needs the http.pathPrefix argument when behind a
   reverse proxy, rather it uses the request path like the other
   Victoria Metrics components.
2023-04-11 21:46:43 -05:00
Dustin 6c562c9821 alerts: Ignore missing mdraid disk for BURP
The way I am handling swapping out the BURP disk now is by using the
Linux MD RAID driver to manage a RAID 1 mirror array.  The array
normally operates with one disk missing, as it is in the fireproof safe.
When it is time to swap the disks, I reattach the offline disk, let the
array resync, then disconnect and store the other disk.

This works considerably better than the previous method, as it does not
require BURP or the NFS server to be offline during the synchronization.
2023-04-11 20:08:07 -05:00
Dustin a59f24a8b5 metricspi: Stop scraping speedtest
Running the speed test periodically was just wasting bandwidth.  It
failed frequently, and generally did not provide useful information.
2023-04-02 11:05:16 -05:00
Dustin 94de5d6067 samba-dc: Decrease Samba log level
The default log level (3) produces too much output and quickly fills the
`/var/log` volume on the domain controllers.
2023-03-08 11:26:57 -06:00
Dustin 748c432334 vaultwarden: Change Domain URL
The rule is "if it is accessible on the Internet, its name ends in .net"

Although Vaultwarden can be accessed by either name, the one specified
in the Domain URL setting is the only one that works for WebAuthn.
2023-03-03 11:17:07 -06:00
Dustin 632e1dd906 metricspi: Update LDAP configuration
All domain controllers now use the Let's Encrypt wildcard certificate
for the *pyrocufflink.blue* domain.  Further, *dc2.p.b* is
decommissioned.
2023-01-09 12:23:54 -06:00
Dustin 90f9e5eba5 samba-dc: Manage sudoers
Domain controllers only allow users in the *Domain Admins* AD group to
use `sudo` by default.  *dustin* and *jenkins* need to be able to apply
configuration policy to these machines, but they are not members of said
group.
2022-12-23 08:47:31 -06:00
Dustin 9408ee31c3 home-assistant: Back up Zigbee/ZWave/Mosquitto
Mosquitto, Zigbee2MQTT, and ZWaveJS2MQTT all have persistent state that
needs to be backed up in addition to Home Assistant's own data.
2022-12-23 06:56:52 -06:00
Dustin 77191c8b5a Fedora37: Set collectd SELinux domain permissive
*collectd* is broken by default on Fedora 36 and 36.  Several plugins
generate AVC denials.
2022-12-19 10:22:00 -06:00
Dustin 637289036a blackbox: Update pyrocufflink DNS check
I changed the naming convention for domain controller machines.  They
are no longer "numbered," since the plan is to rotate through them
quickly.  For each release of Fedora, we'll create two new domain
controllers, replacing the existing ones.  Their names are now randomly
generated and contain letters and numbers, so the Blackbox Exporter
check for DNS records needs to account for this.
2022-12-19 09:04:37 -06:00
Dustin caef7f342b vm-hosts: Update autostart list
* Remove DC0 (decommissioned)
* Remove Jenkins and its build VMs (Migrated to Kubernetes)
* Add pxe0 (Required for Basement HUD)
2022-12-18 19:55:48 -06:00
Dustin 77c6408187 metricspi: Remove sensors scrape job
Sensor data are retrieved via Home Assistant.
2022-12-18 19:16:10 -06:00
Dustin 244482ac52 websites: Add hatchlearningcenter.org
This is the website for Tabitha's new hybrid private school! 👩‍🎓
2022-11-30 22:04:29 -06:00
Dustin 772f669ab2 r/gitea: Handle encoded / characters in HTTP paths
Gitea package names (e.g. OCI images, etc.) can contain `/` charactres.
These are encoded as %2F in request paths.  Apache needs to forward
these sequences to the Gitea server without decoding them.
Unfortunately, the `AllowEncodedSlashes` setting, which controls this
behavior, is a per-virtualhost setting that is *not* inherited from the
main server configuration, and therefore must be explicitly set inside
the `VirtualHost` block.  This means Gitea needs its own virtual host
definition, and cannot rely on the default virtual host.
2022-11-27 17:21:03 -06:00
Dustin 4511d5447e vm-hosts: Add missing kube.network config
When I added the *systemd-networkd* configuration for the Kubernetes
network interface on the VM hosts, I only added the `.netdev`
configuration and forgot the `.network` part.  Without the latter,
*systemd-networkd* creates the interface, but does not configure or
activate it, so it is not able to handle traffic for the VMs attached to
the bridge.
2022-08-22 20:00:47 -05:00
Dustin b8b8ae5798 vm-hosts: Define machines to auto start 2022-08-20 21:19:01 -05:00
Dustin bc60451949 metricspi: Update DNS server address
DNS is now handled by the border firewall.
2022-08-20 18:19:13 -05:00
Dustin 4622240c6c r/netboot/jenkins-agent: Configure NBD exports
The *netboot/jenkins-agent* Ansible role configures three NBD exports:

* A single, shared, read-only export containing the Jenkins agent root
  filesystem, as a SquashFS filesystem
* For each defined agent host, a writable data volume for Jenkins
  workspaces
* For each defined agent host, a writable data volume for Docker

Agent hosts must have some kind of unique value to identify their
persistent data volumes.  Raspberry Pi devices, for example, can use the
SoC serial number.
2022-08-15 17:14:06 -05:00
Dustin dbc18022f2 metricspi: Increase scrape_timeout for speedtest
Running the Internet speed test can often take longer than a minute.
2022-08-12 14:54:49 -05:00
Dustin ce3e88932d vmalert: Allow configuring http.pathPrefix
*vmalert* requires explicit configuration when it is behind a reverse
proxy.
2022-08-12 13:10:36 -05:00
Dustin fe87edea21 r/vmalert: Allow configuring external source URLs
The `-external.url` and `-external.alert.source` command line arguments
and their corresponding environment variables can be used to configure
the "Source" links associated with alerts created by `vmalert`.
2022-08-12 12:58:53 -05:00
Dustin c57500a9f4 metricspi: Update speedtest scrape target
The firewall hardware is too slow to run the *prometheus_speedtest*
program.  It always showed *way* lower speeds than were actually
available.  I've moved the service to the Kubernetes cluster and it
works a lot better there.
2022-08-12 12:55:52 -05:00
Dustin 4ddbc9f256 hosts: Add mtrcs0.p.r
*mtrcs0.pyrocufflink.red* is a Raspberry Pi CM4 on a Waveshare
CM4-IO-BASE-B carrier board with a NVMe SSD.  It runs a custom OS built
using Buildroot, and is not a member of the *pyrocufflink.blue* AD
domain.

*mtrcs0.p.r* hosts Victoria Metrics/`vmagent`, `vmalert`, AlertManager,
and Grafana.  I've created a unique group and playbook for it,
*metricspi*, to manage all these applications together.
2022-08-11 21:40:19 -05:00
Dustin 4aedeef546 grafana: Redirect HTTP to HTTPS 2022-08-10 21:55:54 -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 c8e89a4b16 hosts: Add Kubernetes machines
There is no specific playbook or role for Kubernetes.  All OS
configuration is done at install time via kickstart scripts, and
deploying Kubernetes itself is done (manually) using `kubeadm init` and
`kubeadm join`.
2022-08-03 20:52:01 -05:00
Dustin 3b692a9de8 vm-hosts: Add Kubernetes VLAN configuration 2022-08-03 20:51:33 -05:00
Dustin 6f11a4cf3a grafana: Set Grafana domain
Necessary for Grafana CSRF protection.
2022-07-24 10:31:46 -05:00
Dustin 3e8da609e7 frigate: Keep front porch recordings for 2 days
Now that there is plenty of storage in the new video server, let's keep
24/7 recordings from the front porch camera, too.
2022-07-23 17:52:26 -05:00
Dustin c1c28a51b5 frigate: Use native MQTT/TLS support
Frigate has native support for MQTT over TLS now, so there is no more
any need to use stunnel.
2022-07-23 17:27:02 -05:00
Dustin d5ef18ccc3 frigate: Split camera config into separate file
This will make it easier to manage Frigate camera settings.
2022-07-23 17:26:19 -05:00
Dustin 41582beef9 group_vars/frigate: Add second back yard camera
Adding a second camera to the back yard, on the North side of the porch,
to try and figure out how the possums keep getting under the porch even
with the chicken wire around it!
2022-07-18 18:25:20 -05:00
Dustin 82f9ce0797 group_vars/frigate: Keep back yard recordings
We're trying to discover how the possums are getting into and out of the
house.  Let's enable continuous video recording from the back yard
camera so we can observe them and come up with a plan to get rid of
them.
2022-07-18 18:20:21 -05:00
Dustin a3608f187c home-assistant: Enable Mosquitto persistence
Configuring Mosquitto to persist its state to the filesystem will keep
retained messages from MQTT sensors, etc.
2022-05-29 11:26:39 -05:00
Dustin 3c8e576841 grafana: Enable anonymous access
Allow unauthenticated users to view dashboards.  Useful for Heads-Up
Displays.
2022-03-07 20:10:13 -06:00
Dustin 5485fc6f93 websites/d…and…t: Configure formsubmit
To handle the RSVP form on *dustinandtabitha.com*, we are going to use
*formsubmit*.  It runs on the same machine that hosts the website, so
there's no dealing with CORS.  The */submit/rsvp* path, which is proxied
to the backend, is the RSVP form's target.
2022-02-27 17:56:54 -06:00
Dustin 3632698f37 websites/dustinandtabitha.com: Add role
Wedding website 😍
2022-02-27 17:41:40 -06:00
Dustin c12da40228 home-assistant: Correct BURP exclude syntax
BURP does not support relative paths or globs in `exclude` values.
2022-01-16 10:08:27 -06:00
Dustin 5efbee725e home-assistant: Omit history DB from backups
The state history database is entirely too big.  It takes over an hour
to create a backup of it, which usually causes BURP to time out.  The
data it stores isn't particularly interesting anyway.  Instead of trying
to back it up and ultimately not getting any backup at all, we'll just
skip it altogether to ensure we have a consistent backup of everything
else that is actually important.
2022-01-02 12:07:12 -06:00
Dustin 2b27a31bee frigate: Update config syntax for 0.9.x
There were several backward-incompatible changes introduced in Frigate
[0.9.0](https://github.com/blakeblackshear/frigate/releases/tag/v0.9.0).
Notably, recordings and clips are now configured together.
2021-12-30 09:33:58 -06:00
Dustin 6acb25e309 nextcloud: Trust headers from public rev proxy
If Nextcloud does not have the Internet-facing reverse proxy listed in
its "trusted proxies" setting, it will mark all traffic as being from
the proxy itself.  This breaks brute force detection, etc.
2021-12-20 22:20:09 -06:00
Dustin 74deb895ae pyrocufflink-dns: Remove dc0 forwarder
Decommissioning *dc0.pyrocufflink.blue*.  Do not forward requests for
internal domain names to it.
2021-12-18 16:44:48 -06:00
Dustin 62ca80a5f0 pyrocufflink-dns: Remove FireMon zones
There is no longer any point to having forward zones in the main DNS
server for FireMon domains, since we don't have a network-wide VPN
anymore.
2021-12-18 10:51:17 -06:00
Dustin 739ffb2845 home-assistant: Configure BURP backups
Take a snapshot of the history database first, then back up everything
in `/var/lib/homeassistant`.
2021-12-17 20:57:38 -06:00