Hosts

Get a host

Returns the host with what its agent reports about the system. Metrics themselves are in the dashboard.

get/hosts/{host}

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Path parameters

hoststring uuid required

Host ID.

Response

The host.

idstring uuid required

Host ID

labelstring nullable required

Name shown in the dashboard and alerts; the agent sets the hostname until you change it

state'up' | 'stale' | 'pending' required

Whether a host's agent reports.

up <br/> Reported in the last 15 minutes.
stale <br/> Reported before, but not in the last 15 minutes.
pending <br/> The agent never reported.
host_infoobject nullable required

What the agent reports about the system, as key-value pairs (for example hostname, os, platform, kernel_version); the keys depend on the agent version and platform

cpu_infoobject[] nullable required

The CPUs, each as key-value pairs (for example model_name, cores, mhz)

agent_versionstring nullable required

Version of the agent

agent_update_versionstring nullable required

A newer agent release, when the host runs an older one (sudo spectate-agent update)

clock_offset_msinteger nullable required

Server time minus the host's clock, in milliseconds, as last measured by a v2 agent; null when unknown

last_seen_atstring date-time nullable required

When the agent last reported

no_data_alert_minutesinteger nullable required

Minutes without data before the "no data received" alert fires; null when that alert is off

paused_reason'plan_limit' | 'team_paused' required

Why the system (not the user) paused a monitor, host, domain or status page.

plan_limit <br/> Over the plan limit (trial expired, downgrade); the oldest resources stay active.
team_paused <br/> The whole team's monitoring is paused (no paid plan, staff action or scheduled deletion).
project_idstring uuid nullable required

The project the host belongs to; null for none

created_atstring date-time required

When the host registered

health_issuesinteger required

Number of health checks that need attention (warning or critical)

Example response

{
  "label": "web-1",
  "agent_version": "2.0.3",
  "no_data_alert_minutes": 10,
  "escalation_paths": [
    {
      "name": "On-call engineers"
    }
  ],
  "health": [
    {
      "detail": "nginx.service failed"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.