Blip Docs
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Monitors

Monitor endpoints return information about monitors and provide some monitor controls through POST methods.

An endpoint might reference all monitors or a single monitor as documented. Single-monitor endpoints require query key id to identify the monitor, which is a config.monitor.id value. Use GET /monitors to discover monitor IDs if you don’t set them explicitly in the Blip config file.

GET /monitors

Returns a list of all loaded monitors keyed on config.monitor.id. The value for each is its redacted DSN (no password).

Response

{
  "localhost": "blip:...@unix(/tmp/mysql.sock)/?parseTime=true"
}

POST /monitors/reload

Reloads all monitors. See Monitors / Loading / Reloading.

Reloading only affects new and removed monitors. Monitors that did not change are not affected, even on error.

A 200 status code means the monitors were reloaded. Removed or changed monitors that haven’t stopped within config.monitor-loader.stop-timeout keep stopping in the background, and a new monitor with the same ID starts when the old one has stopped.

Response

None on success (200 status code).

Error message on 4xx or 5xx status code.

Status Codes

409: Error reloading monitors

412: Stop-loss prevented reloading

POST /monitors/start?id=ID

Starts one monitor. id query key is required.

If the monitor is still stopping, the request returns 202, and the monitor starts when it has stopped. If the StartMonitor plugin then declines to start it, or the start fails, the monitor status says so, and a failed start sends event monitor-error (or monitor-panic). Stopping the monitor before then cancels the pending start.

Query

KeyValueRequiredPurpose
idconfig.monitor.idYesMonitor to start

Response

None on success (200 status code).

Error message on 4xx or 5xx status code.

Status Codes

202: A monitor with the same ID is still stopping; the monitor starts when it has stopped. Starting it again while it waits also returns 202.

404: Monitor not loaded

409: Error starting monitor, monitor already running, or the StartMonitor plugin declined to start it

POST /monitors/stop?id=ID

Stops one monitor. id query key is required.

The monitor is stopped but not unloaded, which means it reported by status endpoints.

The monitor stays stopped across POST /monitors/reload until POST /monitors/start, unless its config changes, it’s removed and loaded again, or Blip restarts.

The request waits for the monitor to stop, but no longer than config.monitor-loader.stop-timeout.

Query

KeyValueRequiredPurpose
idconfig.monitor.idYesMonitor to stop

Response

None on success (200 status code).

Error message on 4xx or 5xx status code.

Status Codes

202: Monitor is still stopping after the stop timeout; it keeps stopping in the background