Documentation / @zerotal/monitor / MonitorConfigShape
Interface: MonitorConfigShape
Defined in: monitor/src/config.ts:14
Extended by
Properties
path?
optionalpath?:string
Defined in: monitor/src/config.ts:16
URL prefix the panel mounts at. Default: /monitor.
title?
optionaltitle?:string
Defined in: monitor/src/config.ts:18
Browser tab title / sidebar heading. Default: Super Panel.
subtitle?
optionalsubtitle?:string
Defined in: monitor/src/config.ts:20
Sub-label under the title. Default: Zerotal Ops.
auth?
optionalauth?: (user) =>boolean|Promise<boolean>
Defined in: monitor/src/config.ts:25
Authorization gate. Receives the authenticated user (or undefined) and must return true to allow access. Default: allow only outside production.
Parameters
user
unknown
Returns
boolean | Promise<boolean>
record?
optionalrecord?:boolean
Defined in: monitor/src/config.ts:27
Install the recorder middleware to capture live request data. Default: true.
refreshMs?
optionalrefreshMs?:number
Defined in: monitor/src/config.ts:29
Auto-refresh cadence in milliseconds while "Live" is on. Default: 3000.
apdexTargetMs?
optionalapdexTargetMs?:number
Defined in: monitor/src/config.ts:31
Apdex satisfaction threshold (T) in ms. Default: 100.
slowQueryMs?
optionalslowQueryMs?:number
Defined in: monitor/src/config.ts:33
Queries at/above this many ms count as "slow". Default: 100.
slowRequestMs?
optionalslowRequestMs?:number
Defined in: monitor/src/config.ts:35
Requests at/above this many ms count as "slow" (Slow Requests widget). Default: 1000.
capturePayloads?
optionalcapturePayloads?:boolean
Defined in: monitor/src/config.ts:42
Capture request/response headers and bodies on each request (Telescope-style), shown in the request trace. Off by default — it buffers bodies and is privacy-sensitive. Sensitive headers (authorization/cookie) and body keys (password/token/secret/…) are redacted automatically.
payloadMaxBytes?
optionalpayloadMaxBytes?:number
Defined in: monitor/src/config.ts:44
Truncate captured request/response bodies to this many bytes. Default: 65536.
snapshotCacheMs?
optionalsnapshotCacheMs?:number
Defined in: monitor/src/config.ts:50
Cache built snapshots for this many ms, keyed by range, so overlapping reads
(panel poll + Prometheus scrape + alert loop) share one build. Mutating actions
invalidate it. Default: 1000. Set 0 to always build fresh.
storage?
optionalstorage?:string
Defined in: monitor/src/config.ts:56
SQLite file the panel persists to, so history survives restarts and the
1h/24h/7d ranges trace real data. Default: storage/monitor.sqlite. Use
:memory: for an ephemeral, in-process store.
retentionDays?
optionalretentionDays?:number
Defined in: monitor/src/config.ts:58
Days of history to keep before pruning. Default: 7.
retentionMode?
optionalretentionMode?:RetentionMode
Defined in: monitor/src/config.ts:60
What to do with data past retention: delete it or archive it. Default: delete.
metrics?
optionalmetrics?:boolean
Defined in: monitor/src/config.ts:67
Expose a Prometheus text-exposition endpoint. Default: false (opt-in).
The endpoint is unauthenticated (a scraper can't satisfy user-auth), so it
ships off; enable it only when you protect metricsPath at the network
layer (firewall/ingress) or scope it to a private interface.
metricsPath?
optionalmetricsPath?:string
Defined in: monitor/src/config.ts:69
Path for the Prometheus endpoint. Default: /metrics. Protect it at the network layer.
alerts?
optionalalerts?:boolean
Defined in: monitor/src/config.ts:71
Evaluate threshold alerts on a short interval. Default: true.
alertThresholds?
optionalalertThresholds?:AlertThresholds
Defined in: monitor/src/config.ts:73
Alert thresholds (error rate, queue backlog, p95, rollbacks).
alertCooldownMs?
optionalalertCooldownMs?:number
Defined in: monitor/src/config.ts:79
Minimum gap (ms) before the same alert can fire again after it recovers and
re-breaches. Stops an oscillating metric from re-paging / re-flooding the feed
for one ongoing issue. Default: 30 min. Set 0 to fire on every fresh breach.
alertWebhook?
optionalalertWebhook?:string
Defined in: monitor/src/config.ts:86
Slack-compatible webhook URL. When set, every newly-firing alert is POSTed to
it as JSON ({ text, level, title, detail }) so alerts page someone instead of
only lighting up the panel. Dependency-free (uses fetch); delivery is
best-effort. For richer routing, register a handler with onAlert() instead.
accent?
optionalaccent?:string
Defined in: monitor/src/config.ts:88
Accent colour (hex) for the panel chrome. Default: Zerotal orange.
zerotalVersion?
optionalzerotalVersion?:string
Defined in: monitor/src/config.ts:90
Version string shown in the System footer.
region?
optionalregion?:string
Defined in: monitor/src/config.ts:92
Region label shown in the System footer.
deploy?
optionaldeploy?:string
Defined in: monitor/src/config.ts:94
Deploy SHA shown in the System footer.
sections?
optionalsections?:Record<string,boolean>
Defined in: monitor/src/config.ts:100
Switch contributed sections off by id — { scheduler: false } keeps the
scheduler installed but drops its section from the panel. Anything absent
here is on.