# Host monitoring

Host monitoring shows what happens inside your servers: CPU, memory, disk, network, failed services and pending updates. You install the Spectate agent on each server. The agent sends metrics to Spectate, and Spectate alerts your team when a server stops reporting or a metric crosses a threshold.

## How it works

1. You [install the agent](/hosts/install-the-agent) with an install token from the dashboard.
2. The agent registers the server as a **host** in your team. The host gets the server's hostname as its label and joins the team's default [project](/account/projects).
3. The agent collects metrics every 15 seconds and sends them to Spectate once a minute, compressed.
4. Spectate stores the metrics, updates the host's [health checks](/hosts/health-checks) and evaluates its [metric conditions](/hosts/metric-conditions).
5. If a check or a condition fails, or the host stops reporting, Spectate fires an [alert](/alerting/alerts). The alert goes to the host's [escalation paths](/alerting/escalation-paths).

If the network is down, the agent keeps the batches on disk, up to 50 MB or 24 hours. It sends them when the connection comes back. Spectate removes duplicate batches.

The agent receives its settings from Spectate with every response: the collection interval, the collectors and the disk and network filters. You change them in the dashboard, not in a file on the server.

## What Spectate collects

The Spectate agent collects these data on every host:

| Area | Data |
|---|---|
| CPU | Usage, split into user, system, I/O wait, steal, idle, guest and interrupt time. |
| Memory | RAM total, used and available, and swap use. |
| Load | Load average over 1, 5 and 15 minutes. |
| Disk | Space and inodes per mountpoint. |
| Network | Traffic, packets, errors and drops per network interface. |
| System | Uptime, hostname, operating system, kernel, architecture, virtualization and CPU model. |

Agent 2.1 and later also collect these data. You can turn off each collector per host:

| Collector | Data |
|---|---|
| Disk I/O | Throughput, operations, busy time and latency per disk. |
| Pressure & out of memory | Time that tasks wait for CPU, memory and I/O, and processes that the kernel killed for lack of memory. Linux only. |
| Services | Failed systemd services, checked every minute. Linux only. |
| Updates & reboot | Pending updates, security updates, and whether the server needs a reboot. Linux only. |
| Connections & file handles | TCP connections by state, and open file handles. |
| Clock | Whether the clock is synchronised with NTP. Linux only. |

[Metrics](/hosts/metrics) lists every metric and its unit.

## Supported systems

| System | Support |
|---|---|
| Linux with systemd, on amd64 (x86_64) or arm64 (aarch64) | Supported. The agent runs as a systemd service. The dashboard lists Ubuntu, Debian, CentOS / RHEL, Rocky Linux, AlmaLinux and Fedora. |
| macOS on Apple silicon or Intel | Best effort. The agent runs as a launchd agent of the user who installs it. |

The installer stops with an error on other systems and architectures, and on Linux without systemd.

## Agent versions

There are two versions of the Spectate host agent:

| | Agent v2 (`spectate-agent`) | Agent v1 (`spectated`) |
|---|---|---|
| Status | Current version. The dashboard installs it. | Legacy. It is no longer supported, but Spectate still accepts its data. |
| Resolution | 15 seconds | 60 seconds |
| When the network is down | Keeps up to 50 MB or 24 hours of data on disk | Keeps data in memory only |
| Settings | From Spectate, changed in the dashboard | Local YAML file |
| Health checks | From version 2.1 | Not available |

Spectate stores the data of both versions in the same way. If you still run the v1 agent, [move the host to v2](/hosts/install-the-agent#move-a-host-from-the-v1-agent). The host keeps its history.

## Host states

The hosts list shows one of these states for each host:

| State | Label in the dashboard | Meaning |
|---|---|---|
| `up` | **Online** | The agent reported in the last 15 minutes. |
| `stale` | **Stale** | The agent reported before, but not in the last 15 minutes. |
| `pending` | **Pending** | The agent never reported. |

The **Needs attention** filter shows the hosts with a health check in the warning or critical status.

A host can be stale without an alert. The "Host stops reporting" alert has its own time, 5 minutes by default. See [no-data alerts](/hosts/metric-conditions#alert-when-a-host-stops-reporting).

## Plan limits

Each host counts as one resource, the same as an uptime monitor. Your plan sets how many monitors and hosts your team can run together:

| Plan | Monitors and hosts |
|---|---|
| Trial | 80 |
| Starter, Team, Business | The number that you pay for |

If the team is at its limit, the agent cannot register a new host. Registration fails with the error `PLAN_LIMIT_REACHED`. Add monitors and hosts on the **Billing** page, or delete a host or monitor that you do not need. See [plans and billing](/account/plans-and-billing) for the minimum of each plan and what happens over a limit.

## Who can manage hosts

All roles except Billing can see hosts. Owners, managers and admins can add hosts, change their settings and add metric conditions. Owners, managers and admins can also delete hosts. Spectate permanently deletes the metrics and alerts of a deleted host after 7 days. See [remove the agent](/hosts/install-the-agent#remove-the-agent) and [teams and roles](/account/teams-and-roles).

## Related

<CardGroup cols={2}>
  <Card title="Install the agent" icon="server" href="/hosts/install-the-agent">
    Install, update and remove the Spectate agent on Linux and macOS.
  </Card>
  <Card title="Metrics" icon="activity" href="/hosts/metrics">
    The charts on the host page, every metric and how long Spectate keeps it.
  </Card>
  <Card title="Health checks" icon="shield" href="/hosts/health-checks">
    Failed services, out of memory kills, updates, reboots and clock sync.
  </Card>
  <Card title="Metric conditions" icon="bell" href="/hosts/metric-conditions">
    Alert when a metric crosses a threshold, or when a host stops reporting.
  </Card>
</CardGroup>
