# Keep a Local AI Server Running: Uptime Kuma and Prometheus

> Our real monitoring on a DGX Spark: 25 active Uptime Kuma checks, 6 Prometheus alerts and what a month of history showed. Measured 2026-10-08.

- Published: 2026-11-17
- Author: Jacobo González Jaspe
- Language: en
- Tags: Monitoring, Uptime Kuma, Prometheus, Self-hosting, Local AI
- Canonical URL: https://vorluxai.com/en/blog/keep-a-local-ai-server-running-monitoring-with-uptime-kuma-and-prometheus-en/
- Source: VORLUX AI (J4SGON S.L.), https://vorluxai.com/

---

By the end of this post you will have Uptime Kuma checking every AI service on your machine and Prometheus alerting on memory, with the commands we use. It runs on anything that runs Docker; a used mini PC is enough for the monitoring itself.

We are also going to show you our own month of history, including the part that is embarrassing. That part is the most useful one.

> **TL;DR**
> * Uptime Kuma answers "is it up?"; Prometheus answers "is it healthy?". Both are free and run in Docker. Uptime Kuma, Prometheus and three exporters used 565 MiB together on our Spark (`docker stats --no-stream`, 2026-11-05).
> * A month of our own data: real outages were caught, but **nothing notified a person**, and three monitors were red all month because they checked the wrong URL.
> * Verdict: **Do it**, and do the boring step: link every monitor to a notification and test it.

## What you need

* A machine running your models (Ollama, vLLM or similar) and Docker
* 30 minutes
* A phone app or chat you already read (Telegram, ntfy, email) for notifications

## What we run, and what a month of it showed

Our reference box is a DGX Spark (GB10, 128 GB unified memory) with a second Spark on a direct cable. On it run Uptime Kuma 1.23.17 (`louislam/uptime-kuma:1`, on port 3003) and Prometheus 3.5.4 (port 9092) with node-exporter, cAdvisor and `utkuozdemir/nvidia_gpu_exporter`.

We pulled 30 days of history on 2026-10-08 with `scripts/bench/monitoring_history.py`, which reads Prometheus' `ALERTS` series through `/api/v1/query_range` and a copy of the Uptime Kuma database. Raw output is in [monitoring-history-2026-10-08.json](https://vorluxai.com/data/measurements/monitoring-history-2026-10-08.json).

| Alert (Prometheus, DGX Spark, 8 Sep to 8 Oct 2026) | Episodes | Hours firing |
|---|---|---|
| Second Spark unreachable | 17 | 100.0 |
| Second Spark GPU exporter down | 12 | 102.6 |
| Second Spark under 15 GB free | 3 | 1.8 |
| Main Spark under 8 GB free | 4 | 0.3 |
| LiteLLM gateway down | 0 | 0 |

The memory alerts were short: the longest lasted 1.5 hours. We did not note the cause of each "unreachable" episode while it happened, and a month later we cannot say which were planned reboots. Write one line per alert when it fires; it is the cheapest habit in this post.

Uptime Kuma, same window, showed the less flattering half:

* **Zero monitors linked to a notification.** A notification channel existed. No monitor used it. Every outage above was visible only to whoever opened the dashboard.
* **Three monitors red for the whole month.** Two checked a path that answered 404 on every beat. The third, Uptime Kuma checking itself, timed out on every beat.
* **The public-site checks failed mostly on DNS inside the container** (`getaddrinfo ENOTFOUND`), not because the sites were down.
* **A moved service broke its monitor.** When our vLLM moved to the second Spark on 5 October, the local forwarder listened on 127.0.0.1 only, so the container saw "connection refused" and then timeouts. The check was red for the last three days of the window.

Prometheus has the same gap: `/api/v1/alertmanagers` returns an empty list, so its alerts fire into its own web page and nowhere else. A monitor nobody hears is a log file.

## Step 1: run Uptime Kuma

```bash
docker run -d --name uptime-kuma --restart=unless-stopped \
  -p 3003:3001 -v uptime_kuma_data:/app/data \
  --add-host host.docker.internal:host-gateway \
  louislam/uptime-kuma:1
```

Open `http://localhost:3003` and create the admin account. The `--add-host` line lets the container reach services on the host as `host.docker.internal`. We map 3003 because 3001 was taken; use any free port.

## Step 2: add monitors that check the right thing

Before you add a monitor, test the exact URL from inside the container. This one command would have saved us the three red monitors:

```bash
docker exec uptime-kuma curl -s -o /dev/null -w "%{http_code}\n" \
  http://host.docker.internal:11434/api/tags
```

Expect `200`. A `404` means the path is wrong; "connection refused" means the service listens on 127.0.0.1 only and the container cannot reach it.

Health paths that answer 200 on our stack:

| Service | URL to check | Interval |
|---|---|---|
| Ollama | `http://host.docker.internal:11434/api/tags` | 30 s |
| LiteLLM | `http://host.docker.internal:4000/health/readiness` | 30 s |
| vLLM | `http://<vllm-host>:8200/health` | 30 s |
| Open WebUI | `http://host.docker.internal:3000` | 60 s |
| Qdrant | `http://host.docker.internal:6333/healthz` | 60 s |
| Uptime Kuma itself | `http://localhost:3001/` (inside the container) | 60 s |

Set "Retries" to 2 or 3 for model servers. A large model load can block a health check for a few seconds, and one missed beat is not an outage.

## Step 3: link a notification to every monitor

This is the step we skipped. In Settings, Notifications, add a channel you actually read. Then open each monitor, tick that notification, and save. Tick "Default enabled" on the channel so new monitors get it automatically.

Test it: stop a service on purpose and wait for the message. Wait longer than the interval times (retries + 1): with 60 s and 3 retries, that is four minutes.

```bash
docker stop open-webui && sleep 300 && docker start open-webui
```

If your phone stays silent, your monitoring is not finished.

## Step 4: let Prometheus watch memory and the gateway

Uptime Kuma sees HTTP. Prometheus sees the machine. Our `prometheus.yml` scrapes node-exporter, cAdvisor and the GPU exporter every 15 seconds and loads one rules file. These are three of our six rules, shortened (we dropped the labels and annotations):

```yaml
groups:
  - name: gateway
    rules:
      - alert: LiteLLMGatewayDown
        expr: up{job="litellm"} == 0
        for: 3m
  - name: machines
    rules:
      - alert: PrimeMemoryCritical
        expr: node_memory_MemAvailable_bytes{job="node"} < 8e9
        for: 10m
      - alert: AssistantSparkDown
        expr: up{job="spark2-node"} == 0
        for: 5m
```

Why memory from the node exporter and not the GPU exporter? On the GB10 the GPU exporter reports temperature, power and utilisation, but no "memory used": the memory is shared with the CPU. On a card with its own VRAM you would alert on the GPU memory metric instead.

Check that every target is up:

```bash
curl -s localhost:9092/api/v1/targets | python3 -c \
 "import sys,json;[print(t['labels']['job'],t['health']) for t in json.load(sys.stdin)['data']['activeTargets']]"
```

## Step 5: wire Alertmanager (our next step, not done yet)

Prometheus only evaluates rules; [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) delivers them. We have not deployed it yet, so we will not pretend to show you a tested config. The [Prometheus configuration docs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config) show the `alerting:` block you add to `prometheus.yml`. Until then, Uptime Kuma with notifications covers "it is down", which is the alert that matters most.

## A 10-minute weekly routine

```bash
curl -s localhost:9092/api/v1/alerts            # anything firing right now?
docker ps --filter health=unhealthy             # containers failing their own checks
ollama ps                                       # what is loaded, and how big
```

Then open Uptime Kuma and look for any monitor that has been red for more than a day. Fix it or delete it. A monitor that is always red teaches you to ignore red.

## When not to bother

* **One model on a laptop, used by you alone.** You will notice when it stops. Skip all of this.
* **A team relies on it.** Then you need Step 3 at least, today.

## Next steps

* Read [Local AI: what it is and when it pays off](https://vorluxai.com/en/blog/local-ai-what-it-is-when-it-pays-off-en/) to size the machine you are monitoring.
* Keep the server patched with our [Ollama security checklist](https://vorluxai.com/en/blog/keep-your-local-ai-patched-ollama-security-checklist-en/).
* Plan the shared setup in [Open WebUI for a 10-person office](https://vorluxai.com/en/blog/open-webui-office-accounts-models-logs-en/).

If you would rather have someone else watch the server for your company, that is the kind of work we do: [book a 15-minute call](https://vorluxai.com/en/contact/) or see [how we work in consulting](https://vorluxai.com/en/consulting/).
