Appearance
staff.monitor
1 method on staff.monitor. Each returns the answer's data and throws NoviqaError on a failed answer.
retrieve
GET
/admin/v1/monitorSystem 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
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
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>