Skip to content

staff.monitor ​

1 method on staff.monitor. Each returns the answer's data and throws NoviqaError on a failed answer.

retrieve ​

GET/admin/v1/monitor

System monitor

The state of the gateway copy that answers: uptime, goroutines, heap, its open live sockets; the shared cache (keys, memory, clients, version, uptime; zero when no cache is wired); and how many symbols, datafeeds, gateways, routing rules and holidays the configuration it holds in memory has. Behind a load balancer each call may reach a different copy.

More details

Rights: the staff member needs every one of: config.servers.

Returns
Promise<monitorView>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.monitor.retrieve()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/monitor" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "cache": {
      "clients": 1,
      "keys": 1,
      "memory_bytes": 1,
      "uptime_sec": 1,
      "version": "string"
    },
    "config": {
      "datafeeds": 1,
      "gateways": 1,
      "holidays": 1,
      "routes": 1,
      "symbols": 1
    },
    "goroutines": 1,
    "heap_bytes": 1,
    "sockets": {
      "logins": 1,
      "staff": 1,
      "traders": 1,
      "watched": 1
    },
    "uptime_sec": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.monitor.retrieve(options?: RequestOptions): Promise<http.monitorView>