# Uptime Kuma Monitoring

## Overview

Uptime Kuma monitors the availability of Project Oyster services and provides a central location to check whether important endpoints are responding.

* **Host VM:** `infra01`
* **Backend URL:** `http://192.168.90.4:3001`
* **Internal URL:** `http://kuma.oyster.lab`
* **Stack directory:** `/opt/stacks/uptime-kuma`

## Monitoring Strategy

Monitors should test the service that users actually depend on, not merely whether the physical host is online.

Recommended monitoring targets include:

| Target              | Suggested Monitor | What It Tests                       |
| ------------------- | ----------------- | ----------------------------------- |
| `pve01`             | HTTPS / TCP       | Proxmox web interface availability  |
| Portainer           | HTTPS             | Docker management interface         |
| NetBox              | HTTP(S)           | Infrastructure inventory interface  |
| BookStack           | HTTP(S)           | Documentation portal                |
| FreePBX             | HTTP(S) or TCP    | Web interface availability          |
| Technitium DNS      | DNS               | Name resolution                     |
| Nginx Proxy Manager | HTTP(S) or TCP    | Reverse-proxy listener availability |

Configure each monitor with the correct protocol, port, and expected response. A successful web request does not necessarily prove that all application functions are healthy.

## Incident Response

When a monitor reports a failure:

1. Check whether the Proxmox host is online.
2. Confirm the affected VM is running.
3. Check the service or container status.
4. Review relevant logs.
5. Test direct backend access.
6. Check DNS and reverse-proxy routing.
7. Restore the service and confirm the monitor returns to an operational state.

For Docker services:

```bash
sudo docker ps
sudo docker logs --tail 100 <container_name>
```

For virtual machines:

```bash
qm list
```

Run `qm` commands on the Proxmox host.

## Limitations

Monitoring is not the same as alerting. Configure and test notification channels if failures need to be reported while nobody is watching the dashboard.

Uptime Kuma itself runs on `infra01`; it may become unavailable during a failure affecting that VM or the Proxmox host. Monitoring hosted on the same infrastructure cannot independently report every infrastructure-wide outage.

## Maintenance

Review monitors whenever service addresses, ports, URLs, or dependencies change. Periodically test notification delivery and confirm that the status page reflects actual service health.