Chief Tools Logo
Server Chief

Server Chief webhooks

Server Chief sends a webhook when a server goes offline or comes back, a metric alert fires or resolves, metrics stop arriving, storage degrades, a batch of updates or reboots starts, pauses, or finishes, an agent update starts, succeeds, or fails, or a server is added, changed, or removed. Use them to page your on-call engineer, open a ticket, or keep an inventory in another system current without polling the API.

Deliveries are signed, retried, and logged the same way in every Chief Tools product. Read Receive webhooks first for verification, responses, retries, and duplicates. This page covers what is specific to Server Chief.

Set up an endpoint

Add endpoints under Settings › Webhooks in Server Chief, then send a test event from the endpoint's page. Deliveries come with the User-Agent ServerChief-Webhooks/1.0.

To set up endpoints from code, use the webhooks API with a token that has the serverchief:webhooks:write scope:

Code
POST /api/v1/webhooks/endpoints HTTP/1.1 Host: server.chief.app Authorization: Bearer $TOKEN Content-Type: application/json {"url": "https://example.com/webhooks/chief", "description": "Paging", "events": ["server.offline", "server.online"]}

The response includes the endpoint's secret. Store it right away: it is only returned when the endpoint is created and when you rotate its secret. Then send a test event to check your receiver. The same API lists event types, events, and deliveries with each attempt's request and response, and resends them.

Events go to the endpoints of the team that owns the server. Teams that see a server because it was shared with them get no events for it.

Events

Each event's data.object is a Server, an Alert, a Batch, or an AgentRelease, as the API returns it when the event happens. Some events add fields next to object in data.

Each event type below links to its page in the API reference, with the request headers and every field of the payload. The OpenAPI document also lists the events under webhooks, so you can generate types for your receiver from it.

Servers

TypeSent when
server.createdA server is added. It waits for its agent, with status set to pending. A server added by an install command that creates servers gets this event and server.enrolled together.
server.enrolledA server's agent enrolls for the first time. Reinstalling the agent on the same server does not send it again.
server.updatedA server's name, hostname, metadata, location, settings, or tags change.
server.deletedA server is removed. object is the server as it was right before.

Availability

TypeSent whenExtra data fields
server.offlineAn active server has not checked in for 15 minutes.
server.onlineAn offline server checks in again.offline_since: when it went offline
server.reboot_stalledA server has not checked in for 6 minutes after it started a reboot. The server counts as offline, and server.online follows once it is back.command_id: the reboot command

A server whose reboot stalls gets server.reboot_stalled instead of server.offline.

Metric alerts

TypeSent whenExtra data fields
alert.firedA metric alert rule fires for a server.
alert.resolvedA firing alert closes.reason: why it closed
metrics.stalledAn online server that collects metrics has delivered none for about 25 minutes.stalled_at: when the stall was first noticed
metrics.resumedMetrics from that server arrive again.stalled_at

reason on alert.resolved is one of:

  • recovered: the metric stayed within the rule for two checks in a row.
  • out_of_scope: the rule no longer covers the server, or the server stopped collecting metrics.
  • rule_changed, rule_disabled, or rule_deleted: someone changed, turned off, or deleted the rule.

Only recovered means the problem went away. Handle unknown reasons like a closed alert.

When many servers stop delivering metrics at the same moment, the cause is on our side, and Server Chief sends no metrics.stalled events for them.

Storage health

TypeSent whenExtra data fields
server.storage_unhealthyA RAID array or ZFS pool degrades, or a disk fails, or storage that was unhealthy gets worse.health, problems, unhealthy_since
server.storage_healthyThe server's storage is healthy again.unhealthy_since

health is degraded or failed. problems lists what is wrong, each with its own health, a subject such as an array or disk name, and a description you can show to a person. Storage that improves but stays unhealthy sends no event.

Updates and reboots

TypeSent whenExtra data fields
batch.startedA batch starts installing updates on or rebooting several servers, from Server Chief or a maintenance schedule.
batch.pausedA batch paused because too many of its servers failed. Running servers finish, the others wait until someone resumes it.failed: the servers that failed
batch.completedEvery server of a batch finished, failed, or did not start in time.failed
batch.cancelledSomeone cancelled a batch. Servers that did not start yet are left alone, running ones finish.

object is the Batch. Its action is upgrade_packages or reboot, and schedule names the maintenance schedule that started it. failed lists each server that failed or did not start within the batch's window, with server_id, server_name, and a detail you can show to a person. Servers the batch left out from the start are in the batch's skipped.

A run of a maintenance schedule that no server could take sends batch.started and batch.completed together. Resuming a paused batch sends no event.

Agent updates

TypeSent whenExtra data fields
server.agent_update_startedSomeone updates a server's agent in Server Chief or through the API, or the automatic rollout does.command_id: the update command
server.agent_update_succeededThe agent reports the version it was updated to.command_id
server.agent_update_failedThe agent reports that the update failed, does not pick up the update within 3 hours, or reports no result within 3 hours after it picked it up. Also sent when the server is deleted during an update, before server.deleted.command_id, result: why it failed
agent_rollout.pausedThe automatic rollout of a release paused for your team because too many updates to it failed.failures: the failed updates since the rollout was last resumed

The update events carry the server. Asking for an update while one to the same release is already queued or running sends no second server.agent_update_started.

result on server.agent_update_failed is one of:

  • install_failed: the package could not be installed, the previous version still runs. An update that reported no result in time counts as this too.
  • readiness_failed_rolled_back: the new version did not start, and the previous version was restored.
  • rollback_failed: the new version did not start, and restoring the previous version failed too. The agent may not be running.
  • target_unavailable or rollback_unavailable: the package repository does not offer the new version, or the installed version that a rollback needs.
  • package_manager_busy: another process held the package manager for an hour.
  • unsupported_install: the agent was not installed from the Server Chief package repository, so it cannot update itself.
  • expired: the agent did not pick up the update within 3 hours, for example because the server went offline.
  • cancelled: the server was deleted before the update finished.

result is null when the agent reported no reason. Handle unknown results like a failed update.

An agent that reports the new version after its update failed, because its result was lost, sends server.agent_update_succeeded too, so a failure is not always final. Every server.agent_update_started is followed by server.agent_update_failed or server.agent_update_succeeded.

Only install_failed, readiness_failed_rolled_back, and rollback_failed count towards pausing a rollout, so an offline server whose update expired, or a server deleted during its update, cannot pause it for your team. The automatic rollout tries a server again 6 hours after target_unavailable, rollback_unavailable, or package_manager_busy. After unsupported_install, the server cannot be updated until its agent reports that it can update itself.

For agent_rollout.paused, object is the AgentRelease whose rollout paused. Servers that already updated keep the new version. The rollout stays paused until someone resumes it in the team settings, which sends no event.

Examples

A server went offline

JSONCode
{ "id": "event_01m6v4k2p8c3xq7d9fz1w5g6ht", "type": "server.offline", "timestamp": "2026-11-07T13:45:02.117Z", "api_version": "v1", "data": { "object": { "id": "server_01jb9a2c3d4e5f6g7h8j9k0m1n", "name": "web-1", "hostname": "web-1.example.com", "owner_team": {"slug": "acme1234", "name": "Acme"}, "access": "owner", "status": "offline", "last_contact_at": "2026-11-07T13:29:58+00:00", "tags": [...] } } }

The full object has every field of the Server schema. enrollment is always null in webhooks, so enrollment tokens never leave Server Chief this way.

An alert resolved

JSONCode
{ "id": "event_01m6v5q7d2r8hk3c6zj9t1x4wb", "type": "alert.resolved", "timestamp": "2026-11-07T14:02:41.530Z", "api_version": "v1", "data": { "object": { "id": "alert_01m6v3w9b1n5e8r2t6y4u7i0oa", "status": "resolved", "server": {"id": "server_01jb9a2c3d4e5f6g7h8j9k0m1n", "name": "web-1"}, "description": "Disk space used on /var is 93.2%", "fired_at": "2026-11-07T13:31:00+00:00", "resolved_at": "2026-11-07T14:02:41+00:00" }, "reason": "recovered" } }

The alert's own closed_reason field is a sentence for people. Branch on data.reason instead.

Common integrations

  • Paging. Subscribe to server.offline, server.reboot_stalled, alert.fired, and server.storage_unhealthy. Close the page on server.online, alert.resolved with reason set to recovered, and server.storage_healthy.
  • Inventory sync. Subscribe to server.created, server.updated, and server.deleted, and store the server from data.object. Use List servers once to load existing servers, and again to catch up after your receiver was down for longer than the retries last.

Events are kept for 30 days. For anything older, read the current state from the API.