Hosts
Servers with the Spectate agent, which reports CPU, memory, disk and network metrics every minute. Hosts register themselves when the agent is installed with an install token; the API reads, renames, assigns and deletes them. Hosts and monitors together count against the plan's resource limit.
List hosts
Returns the team's hosts, newest first unless you sort.
query Parameters
pagePage number, from 1.
per_pageHosts per page, 1 to 100.
filter[state]Only hosts in this state.
Whether a host's agent reports.
up Reported in the last 15 minutes. |
stale Reported before, but not in the last 15 minutes. |
pending The agent never reported. |
filter[project_id]Only hosts of this project.
filter[search]Case-insensitive text in the label, host info (hostname, platform, architecture) or agent version.
sortSort by label, last_seen_at or created_at. Prefix - for descending. Default -created_at.
List hosts › Responses
Paginated set of Host
current_pagefirst_page_urlfromlast_page_urllast_pageGenerated paginator links.
next_page_urlpathBase path for paginator generated URLs.
per_pageNumber of items shown per page.
prev_page_urltoNumber of the last item in the slice.
totalTotal number of items being paginated.
Get a host
Returns the host with what its agent reports about the system. Metrics themselves are in the dashboard.
path Parameters
hostHost ID.
Get a host › Responses
The host.
idHost ID
labelName shown in the dashboard and alerts; the agent sets the hostname until you change it
stateWhether the agent reports
up Reported in the last 15 minutes. |
stale Reported before, but not in the last 15 minutes. |
pending The agent never reported. |
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_infoThe CPUs, each as key-value pairs (for example model_name, cores, mhz)
agent_versionVersion of the agent
agent_update_versionA newer agent release, when the host runs an older one (sudo spectate-agent update)
clock_offset_msServer time minus the host's clock, in milliseconds, as last measured by a v2 agent; null when unknown
last_seen_atWhen the agent last reported
no_data_alert_minutesMinutes without data before the "no data received" alert fires; null when that alert is off
project_idThe project the host belongs to; null for none
Escalation paths the host's alerts follow. Empty: the project's paths, else the team's default path
created_atWhen the host registered
Health checks (agent 2.1 or later): failed services, out of memory, reboot, updates, clock, file handles and pressure. Checks of collectors that are switched off, and Linux-only checks on other systems, are left out
health_issuesNumber of health checks that need attention (warning or critical)
Update a host
Changes only the fields you send. The agent stops renaming a host once you set its label.
path Parameters
hostHost ID.
Update a host › Request Body
labelName shown in the dashboard and alerts
no_data_alert_minutesMinutes without data, 2 to 1440, before the "no data received" alert fires; null turns it off. A firing alert ends at once when the host is within the new window
project_idProject of the host; null for none
escalation_path_idsEscalation paths for the host's alerts; replaces the current ones. [] follows the project's paths, else the team's default path
Update a host › Responses
The updated host.
idHost ID
labelName shown in the dashboard and alerts; the agent sets the hostname until you change it
stateWhether the agent reports
up Reported in the last 15 minutes. |
stale Reported before, but not in the last 15 minutes. |
pending The agent never reported. |
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_infoThe CPUs, each as key-value pairs (for example model_name, cores, mhz)
agent_versionVersion of the agent
agent_update_versionA newer agent release, when the host runs an older one (sudo spectate-agent update)
clock_offset_msServer time minus the host's clock, in milliseconds, as last measured by a v2 agent; null when unknown
last_seen_atWhen the agent last reported
no_data_alert_minutesMinutes without data before the "no data received" alert fires; null when that alert is off
project_idThe project the host belongs to; null for none
Escalation paths the host's alerts follow. Empty: the project's paths, else the team's default path
created_atWhen the host registered
Health checks (agent 2.1 or later): failed services, out of memory, reboot, updates, clock, file handles and pressure. Checks of collectors that are switched off, and Linux-only checks on other systems, are left out
health_issuesNumber of health checks that need attention (warning or critical)
Delete a host
The host disappears from the API and the dashboard, and data its agent still sends is
refused (the agent stops itself). Uninstall the agent on the server too. Seven days later
the host is deleted permanently with all its data: metrics, alerts and metric condition
links. Until then support can restore it on request. Deleting the same host again returns
404.
path Parameters
hostHost ID.
Delete a host › Responses
No content