Skip to main content
zerotal

Documentation


Documentation / @zerotal/monitor / ResolvedMonitorConfig

Interface: ResolvedMonitorConfig

Defined in: monitor/src/config.ts:103

Extends

Properties

alertThresholds?

optional alertThresholds?: AlertThresholds

Defined in: monitor/src/config.ts:73

Alert thresholds (error rate, queue backlog, p95, rollbacks).

Inherited from

MonitorConfigShape.alertThresholds


alertWebhook?

optional alertWebhook?: 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.

Inherited from

MonitorConfigShape.alertWebhook


zerotalVersion?

optional zerotalVersion?: string

Defined in: monitor/src/config.ts:90

Version string shown in the System footer.

Inherited from

MonitorConfigShape.zerotalVersion


region?

optional region?: string

Defined in: monitor/src/config.ts:92

Region label shown in the System footer.

Inherited from

MonitorConfigShape.region


deploy?

optional deploy?: string

Defined in: monitor/src/config.ts:94

Deploy SHA shown in the System footer.

Inherited from

MonitorConfigShape.deploy


sections?

optional sections?: 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.

Inherited from

MonitorConfigShape.sections


path

path: string

Defined in: monitor/src/config.ts:104

URL prefix the panel mounts at. Default: /monitor.

Overrides

MonitorConfigShape.path


title

title: string

Defined in: monitor/src/config.ts:105

Browser tab title / sidebar heading. Default: Super Panel.

Overrides

MonitorConfigShape.title


subtitle

subtitle: string

Defined in: monitor/src/config.ts:106

Sub-label under the title. Default: Zerotal Ops.

Overrides

MonitorConfigShape.subtitle


record

record: boolean

Defined in: monitor/src/config.ts:107

Install the recorder middleware to capture live request data. Default: true.

Overrides

MonitorConfigShape.record


refreshMs

refreshMs: number

Defined in: monitor/src/config.ts:108

Auto-refresh cadence in milliseconds while "Live" is on. Default: 3000.

Overrides

MonitorConfigShape.refreshMs


apdexTargetMs

apdexTargetMs: number

Defined in: monitor/src/config.ts:109

Apdex satisfaction threshold (T) in ms. Default: 100.

Overrides

MonitorConfigShape.apdexTargetMs


slowQueryMs

slowQueryMs: number

Defined in: monitor/src/config.ts:110

Queries at/above this many ms count as "slow". Default: 100.

Overrides

MonitorConfigShape.slowQueryMs


slowRequestMs

slowRequestMs: number

Defined in: monitor/src/config.ts:111

Requests at/above this many ms count as "slow" (Slow Requests widget). Default: 1000.

Overrides

MonitorConfigShape.slowRequestMs


snapshotCacheMs

snapshotCacheMs: number

Defined in: monitor/src/config.ts:112

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.

Overrides

MonitorConfigShape.snapshotCacheMs


storage

storage: string

Defined in: monitor/src/config.ts:113

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.

Overrides

MonitorConfigShape.storage


retentionDays

retentionDays: number

Defined in: monitor/src/config.ts:114

Days of history to keep before pruning. Default: 7.

Overrides

MonitorConfigShape.retentionDays


retentionMode

retentionMode: RetentionMode

Defined in: monitor/src/config.ts:115

What to do with data past retention: delete it or archive it. Default: delete.

Overrides

MonitorConfigShape.retentionMode


metrics

metrics: boolean

Defined in: monitor/src/config.ts:116

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.

Overrides

MonitorConfigShape.metrics


metricsPath

metricsPath: string

Defined in: monitor/src/config.ts:117

Path for the Prometheus endpoint. Default: /metrics. Protect it at the network layer.

Overrides

MonitorConfigShape.metricsPath


alerts

alerts: boolean

Defined in: monitor/src/config.ts:118

Evaluate threshold alerts on a short interval. Default: true.

Overrides

MonitorConfigShape.alerts


alertCooldownMs

alertCooldownMs: number

Defined in: monitor/src/config.ts:119

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.

Overrides

MonitorConfigShape.alertCooldownMs


capturePayloads

capturePayloads: boolean

Defined in: monitor/src/config.ts:120

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.

Overrides

MonitorConfigShape.capturePayloads


payloadMaxBytes

payloadMaxBytes: number

Defined in: monitor/src/config.ts:121

Truncate captured request/response bodies to this many bytes. Default: 65536.

Overrides

MonitorConfigShape.payloadMaxBytes


accent

accent: string

Defined in: monitor/src/config.ts:122

Accent colour (hex) for the panel chrome. Default: Zerotal orange.

Overrides

MonitorConfigShape.accent


auth

auth: (user) => boolean | Promise<boolean>

Defined in: monitor/src/config.ts:124

Always set after MonitorConfig() applies defaults.

Parameters

user

unknown

Returns

boolean | Promise<boolean>

Overrides

MonitorConfigShape.auth