# Bare metal without the cloud: monitoring and alerting that does not depend on a SaaS

> Part 5 of the bare-metal series. How to build monitoring and alerting on your own hardware with free software: Prometheus and exporters at every site, an Alertmanager cluster across sites, sites that watch each other, a dead man's switch that runs outside the primary site, alert delivery that does not need a SaaS, and the alerts worth having on day one.

- URL: https://ngnext.tech/knowledge/monitoring-alerting-without-saas
- Published: 2026-11-28
- Updated: 2026-11-29
- Author: Nishant Gauraw, [NG-NeXT](https://ngnext.tech)
- Tags: monitoring, alerting, prometheus, alertmanager, grafana, bare-metal, self-hosted

This is part 5 of the open series on running distributed bare metal with zero cloud dependence on mostly free software. [Part 1](https://ngnext.tech/knowledge/proxmox-vs-opennebula-vs-rancher) chose the platform, [part 2](https://ngnext.tech/knowledge/own-validating-dns-resolver-unbound) and [part 3](https://ngnext.tech/knowledge/own-authoritative-dns-off-cloud) took DNS back in house, and [part 4](https://ngnext.tech/knowledge/offsite-backups-without-hyperscaler) designed offsite backups without a hyperscaler. Parts 3 and 4 both told you, in some form, to monitor something and alert when it stops. This part is about where those alerts come from, and how they reach a human when things are going badly.

Some firms that move workloads off the cloud keep their monitoring on a SaaS: a hosted metrics product, a hosted status checker, a hosted paging service. That is a reasonable choice for some, and it is not wrong. But it keeps a dependency on an outside company in the one system you need most on your worst day, and if the pricing is per host or per metric, the bill grows with the estate. The free-software path is mature, and the design questions are the same either way: what watches the watcher, and how does the alert get out when the site that produces it is the thing that failed?

## What the monitoring has to survive

Write this list down first, as in part 4, because each item rules out a design:

- **Loss of a whole site.** Power, uplink or fire. The site cannot report its own death, so something at another site has to notice the silence.
- **Loss of the monitoring itself.** A full disk on the Prometheus host, a bad configuration push, a crashed Alertmanager. Silence must not be read as "all is well".
- **Loss of the alert path.** The mail relay is down, the internet uplink is down, the chat server is a VM on the cluster that just failed. At least one route to a human has to avoid the failure you are alerting about.
- **Alert fatigue.** A system that pages for everything trains people to ignore it. This is a failure mode too.

The [Prometheus FAQ](https://prometheus.io/docs/introduction/faq/) states the priority well: "Prometheus values reliably getting alerts out to humans above all else." Everything below follows from that.

## The building blocks

Latest releases as of 29 November 2026: Prometheus 3.16.0, Alertmanager 0.35.1, blackbox_exporter 0.29.1, Healthchecks 5.0.3. The configuration below is shown for the documented syntax and was not tied to one of these versions by a test of ours.

All of these are free software, and all of them run on ordinary Linux hosts or VMs:

- **[Prometheus](https://prometheus.io/)** scrapes metrics over HTTP, stores them in a local time-series database and evaluates alerting rules. If neither retention flag is set, it keeps 15 days of data ([storage docs](https://prometheus.io/docs/prometheus/latest/storage/)). `--storage.tsdb.retention.time` sets how long to keep data and `--storage.tsdb.retention.size` sets a size-based retention limit (leave disk headroom beyond it for the write-ahead log and compaction); if both are set, whichever limit is reached first applies.
- **Exporters** expose metrics for Prometheus to scrape: [node_exporter](https://github.com/prometheus/node_exporter) for host metrics, [smartctl_exporter](https://github.com/prometheus-community/smartctl_exporter) for disk health, and the [blackbox_exporter](https://github.com/prometheus/blackbox_exporter), which probes endpoints "over HTTP, HTTPS, DNS, TCP, ICMP and gRPC". Many applications expose Prometheus metrics directly, such as Ceph through its mgr `prometheus` module; others, such as Proxmox Backup Server, rely on a community exporter.
- **[Alertmanager](https://github.com/prometheus/alertmanager)** receives alerts from Prometheus, groups and deduplicates them, applies silences and inhibitions, and sends notifications.
- **[Grafana](https://github.com/grafana/grafana)** for dashboards. Note that it is licensed under the AGPL v3, which matters to some legal teams; it is still free to run.
- **[Healthchecks](https://github.com/healthchecks/healthchecks)**, a cron-job monitor under the BSD 3-clause licence. In its own words, it "listens for HTTP requests and email messages ("pings")" from your jobs, and "When a ping does not arrive on time, Healthchecks sends out alerts." That makes it a good dead man's switch, as described below.

You do not need all of it on day one. Prometheus, node_exporter, blackbox_exporter and Alertmanager are enough to start.

## Layout: monitor locally, watch across sites

The pattern that survives site loss is simple:

1. **Each site runs its own Prometheus**, scraping that site's hosts (plus the few cross-site checks in step 4). A WAN outage then does not create a flood of false "host down" alerts from the other side, and each site keeps evaluating its own rules when the sites are cut off from each other. Delivering those alerts still needs a reachable Alertmanager and a working notification route, which is what the next steps are for.
2. **For important sites, run two identical Prometheus servers.** The FAQ's answer to high availability is exactly that: "run identical Prometheus servers on two or more separate machines," and "Identical alerts will be deduplicated by the Alertmanager."
3. **Run one Alertmanager cluster across sites**, for example one or two instances per site, joined with the `--cluster.peer` flag. The cluster port (9094 by default) must be open between sites for both TCP and UDP; the README notes that "Both UDP and TCP are needed". Configure every Prometheus with the full list of Alertmanagers. The Alertmanager README is explicit: "Do not load balance traffic between Prometheus and its Alertmanagers, but instead point Prometheus to a list of all Alertmanagers."
4. **Each site's Prometheus also scrapes the other sites' Prometheus and Alertmanager** (both expose their own metrics), and runs blackbox probes against the other site's public services, such as DNS, web and the reachability of VPN endpoints. (A TCP or ICMP probe shows that a VPN endpoint answers, not that a tunnel can be established.) This is how the loss of a site, or of the path to it, gets noticed: the other site sees `up == 0` for its peer's monitoring and its probes failing. These signals cannot tell a dead site from a broken route or firewall, so the alert should say "site unreachable" and the runbook should cover both.

A few rules turn that layout into alerts:

```
groups:
- name: meta
  rules:
  - alert: PeerMonitoringDown
    expr: up{job="peer-prometheus"} == 0
    for: 5m
    labels:
      severity: critical
  - alert: PeerServiceProbeFailing
    expr: probe_success{job="blackbox-peer"} == 0
    for: 5m
    labels:
      severity: critical
```

The job names are examples; use whatever your scrape configuration calls them. Keep the cross-site probes on the same paths your users take where you can. A probe over the private inter-site link can stay green while the public service is unreachable.

## The dead man's switch

All of the above still has a hole. If every Alertmanager is down, or the only notification route is broken, nothing alerts and nothing tells you it did not.

The standard answer is an alert that is always firing. The [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) project ships one called `Watchdog`, with the expression `vector(1)`, described as "an alert meant to ensure that the entire alerting pipeline is functional." You route that alert to a receiver outside your estate, which raises the alarm when the notifications stop. Keep it out of broad silences and inhibition rules; a maintenance silence that matches it will stop the pings and trigger the switch. It proves that rules are being evaluated and that this one notification path works; it does not prove that metrics are still being collected or that your email or SMS routes work, so keep the other checks in this post as well. If you do not run kube-prometheus, add the rule yourself:

```
groups:
- name: watchdog
  rules:
  - alert: Watchdog
    expr: vector(1)
    labels:
      severity: none
```

Outside your estate does not have to mean a SaaS. Run a small Healthchecks instance on a small machine at a different location from your sites, with its own power and uplink: a branch office, a colocation slot or a partner's rack. (A rented VPS also works and is a small, deliberate outside dependency, chosen because it is independent of your sites.) Route the Watchdog alert to it with Alertmanager's generic webhook receiver; Healthchecks accepts HEAD, GET and POST pings ([pinging API](https://healthchecks.io/docs/http_api/)):

This is a fragment to merge into your existing configuration; `default` stands for your normal receiver:

```
route:
  receiver: default
  routes:
  - matchers: ['alertname="Watchdog"']
    receiver: deadmans-switch
    group_wait: 0s
    group_interval: 1m
    repeat_interval: 5m

receivers:
- name: deadmans-switch
  webhook_configs:
  - url: https://<your-healthchecks-host>/ping/<check-uuid>
    send_resolved: false
```

In Healthchecks, set the check's period to the repeat interval (5 minutes here) and its grace time to a few times that, so a single missed ping does not page anyone but a dead pipeline is still noticed within minutes. On a self-hosted instance, ping URLs are built from `SITE_ROOT` plus `/ping/` by default ([`PING_ENDPOINT`](https://healthchecks.io/docs/self_hosted_configuration/)). Alertmanager's defaults are a 30-second `group_wait`, a 5-minute `group_interval` and a 4-hour `repeat_interval` ([configuration docs](https://prometheus.io/docs/alerting/latest/configuration/)), which is why the route above overrides them. The docs also note that `repeat_interval` "should be a multiple of the group_interval."

That external box should alert through a route that does not pass through your sites, and the same box can watch your backup sync jobs from part 4: have each job ping its own Healthchecks check when it succeeds, and send a failure signal (the `/fail` endpoint, or the job's exit status) when it does not, so a reported failure marks the check down at once and a job that never reports is caught when its timeout passes. A successful exit still does not prove the backup restores; that is what the restore drills in part 4 are for.

## Getting the alert to a human without a SaaS

Alertmanager ships integrations for many hosted services, but the ones that keep you independent are the plain ones:

- **Email** through your own mail relay, ideally one at each site, with the external box using a different route. Unless someone actively watches the mailbox out of hours, treat email as the record, not the pager.
- **A webhook** to a service you run: a self-hosted chat server, a push notification server, or a small script that does something specific to your environment.
- **SMS without the internet.** A USB or serial GSM modem with free software such as [Gammu](https://wammu.eu/gammu/) can send text messages through the mobile network, behind a small webhook that you write. That route can keep working when your internet uplinks do not, provided the modem host, its power and the local path from Alertmanager to it survive; place it accordingly and test it with the uplink disconnected. It depends on a mobile operator, so it is not independent of every outside company.

Decide on at least two routes for critical alerts, one of which avoids both your internet uplink and your own clusters. Then test both every quarter, the same way part 4 asks you to test restores.

## Alerts worth having on day one

Start small. Each alert should mean "a human needs to act", and should link to a short runbook. A reasonable first set:

- **Scrape target down:** `up == 0` for a few minutes. This means Prometheus cannot scrape the target, which may be the host, the exporter or the network path.
- **Disk will fill:** `predict_linear()` on `node_filesystem_avail_bytes` over the last few hours, projected a few hours ahead, which warns if the recent trend continues. Keep a plain low-space alert as well, because sudden writes and non-linear growth can beat any prediction.
- **Disk health:** SMART failures or growing reallocated and pending sectors from smartctl_exporter, and pool or array degradation from your storage layer.
- **Certificates:** `probe_ssl_earliest_cert_expiry` from blackbox_exporter is a Unix timestamp, so alert when `probe_ssl_earliest_cert_expiry - time()` falls below about 14 days.
- **DNS:** probes against your resolvers and authoritative servers from parts 2 and 3, from the other site.
- **Backups:** the Healthchecks checks above, plus "last successful backup older than N hours" if your backup system exports such a metric.
- **The pipeline itself:** Prometheus and Alertmanager publish metrics about their own failures, for example `prometheus_notifications_dropped_total` and `alertmanager_notifications_failed_total`. These are counters, so alert on `increase(...[10m]) > 0` rather than on the raw value.

Use `for:` durations to avoid paging on a single failed scrape, use Alertmanager inhibition so that "site down" suppresses the hundred "host down" alerts behind it (this needs a shared label, such as `site`, on both alerts), and review every page after the fact. An alert nobody acted on is a candidate for deletion.

## What to test before you trust it

- Stop the Alertmanager instances at one site and confirm alerts still arrive through the other site.
- Stop all Alertmanager instances, briefly, in a planned window, and confirm the dead man's switch fires through its own route.
- Cut a site's internet uplink in a planned window and confirm the other site raises the alarm and that the out-of-band route works.
- Grow usage on a test filesystem steadily over the prediction window and confirm the prediction alert fires before it is full; fill another one quickly and confirm the plain low-space alert fires.

If any of these fail silently, you have found the gap on a quiet day instead of a bad one.

## Evidence

As of 29 November 2026. We did not build or run this monitoring stack for this post, and we did not test the failure scenarios in the last section; they are what you should test. The facts below are from the projects' documentation and repositories.

| Claim | Status | Basis |
|---|---|---|
| Prometheus keeps 15 days if no retention flag is set; `--storage.tsdb.retention.time` and `.size` set retention | Verified against a primary source | [Prometheus storage documentation](https://prometheus.io/docs/prometheus/latest/storage/) |
| Prometheus "values reliably getting alerts out to humans above all else"; HA is identical servers on two or more separate machines with Alertmanager deduplication | Verified against a primary source | [Prometheus FAQ](https://prometheus.io/docs/introduction/faq/) |
| Alertmanager clustering with `--cluster.peer`, port 9094 TCP and UDP, and "Do not load balance" Prometheus traffic to Alertmanagers | Verified against a primary source | [Alertmanager README](https://github.com/prometheus/alertmanager) |
| The `Watchdog` alert with `vector(1)` from kube-prometheus exists to prove the alerting pipeline works | Verified against a primary source | [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) |
| blackbox_exporter probes over HTTP, HTTPS, DNS, TCP, ICMP and gRPC; Grafana is AGPL v3; Healthchecks is BSD 3-clause | Verified against a primary source | [blackbox_exporter README](https://github.com/prometheus/blackbox_exporter), [Grafana repository](https://github.com/grafana/grafana) and [Healthchecks repository](https://github.com/healthchecks/healthchecks), licences read 29 Nov 2026 |
| Healthchecks accepts pings and has a `/fail` endpoint; self-hosted ping URLs come from `SITE_ROOT` and `PING_ENDPOINT` | Verified against a primary source | [Healthchecks HTTP API](https://healthchecks.io/docs/http_api/) and [self-hosted configuration](https://healthchecks.io/docs/self_hosted_configuration/) |
| Alertmanager route and receiver syntax, default timings, and the repeat-interval advice | Verified against a primary source | [Alertmanager configuration documentation](https://prometheus.io/docs/alerting/latest/configuration/) |
| Gammu can send SMS through a GSM modem | Verified against a primary source | [Gammu](https://wammu.eu/gammu/) |
| The example alert rules and the Alertmanager fragment work as written | Reported, not reproduced | Syntax read from documentation; not run by us |
| This layout survives the loss of a site and of the alert path | Reported, not reproduced | Design reasoning; the test list at the end is how you prove it, and we have not published our own results |

## FAQ

### How do I monitor a site that can lose power or its uplink?

Run a Prometheus per site, and have each site scrape and probe the other sites, so the loss of a site or the path to it is noticed by a site that is still up. A site cannot report its own death.

### What is a dead man's switch in alerting?

An alert that always fires, such as kube-prometheus's `Watchdog` (`vector(1)`), routed to a receiver outside your estate. When the pings stop, that receiver raises the alarm, so a dead Alertmanager or a broken notification route is not mistaken for "all is well".

### Can I run Alertmanager across sites?

Yes: join instances with `--cluster.peer`, open the cluster port (9094 by default) for both TCP and UDP between sites, and configure every Prometheus with the full list of Alertmanagers. Do not load balance traffic between Prometheus and Alertmanager.

### How long does Prometheus keep data by default?

15 days if neither retention flag is set. `--storage.tsdb.retention.time` and `--storage.tsdb.retention.size` change that.

### How can I send alerts without a SaaS?

Use email through your own relay, a webhook to a service you run, or SMS through a GSM modem with Gammu behind a small webhook. Use at least two routes for critical alerts, one of which avoids both your uplink and your own clusters, and test both each quarter.

### Which alerts should I start with?

Target down, disk will fill (with a plain low-space alert as well), disk health, certificate expiry, DNS probes from the other site, backup checks, and the pipeline's own failure counters.

### Is Grafana free to use?

It is free to run and licensed under AGPL v3, which matters to some legal teams.

Next in the series: private networking between sites without a cloud backbone.

The know-how in this series stays open. If you want monitoring and alerting designed for your estate, across sites, with the dead man's switch and alert routes planned or built with you, [NG-NeXT](https://ngnext.tech) does consulting and turnkey builds. Tell us what you run today through the [contact page](https://ngnext.tech/contact).

— Nishant Gauraw, Founder and CEO, [NG-NeXT Tech](https://ngnext.tech)

## Updated and author

Last updated 2026-11-29 by Nishant Gauraw, [NG-NeXT](https://ngnext.tech).
