watchfor 0.20.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client.d.ts +8 -3
- package/dist/client.js +8 -3
- package/dist/schema.d.ts +154 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ await wf.statusPages.updateAnnouncement("<page-id>", notice.id!, {
|
|
|
94
94
|
|
|
95
95
|
### Live diagnostics
|
|
96
96
|
|
|
97
|
-
Run any of
|
|
97
|
+
Run any of 27 checks from WatchFor's probe fleet against **any public
|
|
98
98
|
target**, monitored or not — this measures right now, rather than reading
|
|
99
99
|
what WatchFor recorded:
|
|
100
100
|
|
package/dist/client.d.ts
CHANGED
|
@@ -254,7 +254,10 @@ export declare class WatchFor {
|
|
|
254
254
|
enabled?: boolean;
|
|
255
255
|
recipients?: string[];
|
|
256
256
|
}): Promise<Record<string, unknown>>;
|
|
257
|
-
/** Probe locations for monitor creation.
|
|
257
|
+
/** Probe locations for monitor creation. Each lists `capabilities`
|
|
258
|
+
* (`ipv6`, `port25`, `chromium`, `playwright`) as its probers report
|
|
259
|
+
* them; a monitor whose `required_capabilities` it lacks can't use it
|
|
260
|
+
* (400 on save). */
|
|
258
261
|
locations(): Promise<List<Record<string, unknown>>>;
|
|
259
262
|
/** Every monitor type with its exact alert metrics + config fields. */
|
|
260
263
|
monitorTypes(): Promise<List<Record<string, unknown>>>;
|
|
@@ -297,13 +300,15 @@ export declare class WatchFor {
|
|
|
297
300
|
* used with (HTTP: the URL's host, port or scheme) needs it again in
|
|
298
301
|
* the same call (else 400). `check_queued: true` in the result means
|
|
299
302
|
* the change (target, port, credentials, TLS, request…) dispatched one
|
|
300
|
-
* immediate check, outside the Run-now budget
|
|
303
|
+
* immediate check, outside the Run-now budget; `check_blocked` says why
|
|
304
|
+
* it didn't run when no selected location can run the monitor now. */
|
|
301
305
|
update: (id: string, body: Record<string, unknown>) => Promise<Monitor>;
|
|
302
306
|
delete: (id: string) => Promise<Deleted>;
|
|
303
307
|
pause: (id: string) => Promise<Monitor>;
|
|
304
308
|
resume: (id: string) => Promise<Monitor>;
|
|
305
309
|
/** Dispatch one out-of-schedule check now (202); the result lands in
|
|
306
|
-
* `checks()` moments later.
|
|
310
|
+
* `checks()` moments later. 409 when no selected location can run the
|
|
311
|
+
* monitor right now (e.g. it needs IPv6 and none of them has it). */
|
|
307
312
|
checkNow: (id: string) => Promise<CheckNowAck>;
|
|
308
313
|
/** IRREVERSIBLE: delete every check, incident, note and post-mortem of
|
|
309
314
|
* the monitor and start uptime over ("since reset"). The monitor and
|
package/dist/client.js
CHANGED
|
@@ -197,7 +197,10 @@ export class WatchFor {
|
|
|
197
197
|
setReportSchedule(frequency, body) {
|
|
198
198
|
return this.request("PATCH", `/reports/schedules/${frequency}`, { body });
|
|
199
199
|
}
|
|
200
|
-
/** Probe locations for monitor creation.
|
|
200
|
+
/** Probe locations for monitor creation. Each lists `capabilities`
|
|
201
|
+
* (`ipv6`, `port25`, `chromium`, `playwright`) as its probers report
|
|
202
|
+
* them; a monitor whose `required_capabilities` it lacks can't use it
|
|
203
|
+
* (400 on save). */
|
|
201
204
|
locations() {
|
|
202
205
|
return this.request("GET", "/locations");
|
|
203
206
|
}
|
|
@@ -242,13 +245,15 @@ export class WatchFor {
|
|
|
242
245
|
* used with (HTTP: the URL's host, port or scheme) needs it again in
|
|
243
246
|
* the same call (else 400). `check_queued: true` in the result means
|
|
244
247
|
* the change (target, port, credentials, TLS, request…) dispatched one
|
|
245
|
-
* immediate check, outside the Run-now budget
|
|
248
|
+
* immediate check, outside the Run-now budget; `check_blocked` says why
|
|
249
|
+
* it didn't run when no selected location can run the monitor now. */
|
|
246
250
|
update: (id, body) => this.request("PATCH", `/monitors/${id}`, { body }),
|
|
247
251
|
delete: (id) => this.request("DELETE", `/monitors/${id}`),
|
|
248
252
|
pause: (id) => this.request("POST", `/monitors/${id}/pause`),
|
|
249
253
|
resume: (id) => this.request("POST", `/monitors/${id}/resume`),
|
|
250
254
|
/** Dispatch one out-of-schedule check now (202); the result lands in
|
|
251
|
-
* `checks()` moments later.
|
|
255
|
+
* `checks()` moments later. 409 when no selected location can run the
|
|
256
|
+
* monitor right now (e.g. it needs IPv6 and none of them has it). */
|
|
252
257
|
checkNow: (id) => this.request("POST", `/monitors/${id}/check-now`),
|
|
253
258
|
/** IRREVERSIBLE: delete every check, incident, note and post-mortem of
|
|
254
259
|
* the monitor and start uptime over ("since reset"). The monitor and
|
package/dist/schema.d.ts
CHANGED
|
@@ -328,7 +328,10 @@ export interface paths {
|
|
|
328
328
|
};
|
|
329
329
|
get?: never;
|
|
330
330
|
put?: never;
|
|
331
|
-
/**
|
|
331
|
+
/**
|
|
332
|
+
* Bulk pause/resume/delete (max 100 ids)
|
|
333
|
+
* @description Ids from other organizations or unknown ids are listed in `skipped`. A resume starts one immediate check per monitor for the first 20 per organization per minute (listed in `checks_queued`); the rest wait for their next scheduled check.
|
|
334
|
+
*/
|
|
332
335
|
post: operations["bulkMonitorAction"];
|
|
333
336
|
delete?: never;
|
|
334
337
|
options?: never;
|
|
@@ -381,7 +384,10 @@ export interface paths {
|
|
|
381
384
|
};
|
|
382
385
|
get?: never;
|
|
383
386
|
put?: never;
|
|
384
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* Resume checks (idempotent; starts one immediate check)
|
|
389
|
+
* @description Restarts checks and dispatches one immediate check, so the monitor reports within seconds instead of after up to a full interval (`check_queued: true`). Pause/resume is not a way around Run now: the resume check is capped at one per monitor per 10 minutes and 20 per organization per minute, it never spends or resets the plan's check-now budget, and every pause closes open incidents and resets the alerting counters. Past the cap the resume still succeeds: `check_queued` is false and `next_check_at` says by when the first scheduled check runs. Resuming a monitor that is already running is a no-op (`check_queued: false`, `next_check_at: null`). Heartbeat and host monitors get no immediate check; they wait for the next ping.
|
|
390
|
+
*/
|
|
385
391
|
post: operations["resumeMonitor"];
|
|
386
392
|
delete?: never;
|
|
387
393
|
options?: never;
|
|
@@ -400,7 +406,7 @@ export interface paths {
|
|
|
400
406
|
put?: never;
|
|
401
407
|
/**
|
|
402
408
|
* Dispatch one immediate check (plan-budgeted per hour)
|
|
403
|
-
* @description Asynchronous: 202, and the result lands in GET /monitors/{id}/checks within the probe timeout. Budgeted per monitor by the plan's check-now allowance (shared with the dashboard). Over that budget → 429 `rate_limited` whose `error.next_allowed_at` (and `Retry-After`) say when the next check-now is allowed — distinct from the API rate limit the X-RateLimit-* headers describe. Send an `Idempotency-Key` to retry safely: a retry with the same key replays the original 202 (with `Idempotency-Replay: true`) instead of spending, or being refused by, the hourly budget.
|
|
409
|
+
* @description Asynchronous: 202, and the result lands in GET /monitors/{id}/checks within the probe timeout. Budgeted per monitor by the plan's check-now allowance (shared with the dashboard). Over that budget → 429 `rate_limited` whose `error.next_allowed_at` (and `Retry-After`) say when the next check-now is allowed — distinct from the API rate limit the X-RateLimit-* headers describe. Send an `Idempotency-Key` to retry safely: a retry with the same key replays the original 202 (with `Idempotency-Replay: true`) instead of spending, or being refused by, the hourly budget. 409 `conflict` when no selected location can run the monitor right now — e.g. it needs IPv6 and none of its locations has it (`error.message` names what is missing; see GET /v1/locations → capabilities); nothing is spent.
|
|
404
410
|
*/
|
|
405
411
|
post: operations["runMonitorCheckNow"];
|
|
406
412
|
delete?: never;
|
|
@@ -1359,7 +1365,7 @@ export interface components {
|
|
|
1359
1365
|
/** @description Days until the certificate the latest check saw expires; null when it saw none (plain text, or failed before TLS). */
|
|
1360
1366
|
cert_days_left: number | null;
|
|
1361
1367
|
};
|
|
1362
|
-
/** @description udp monitors — the latest check. */
|
|
1368
|
+
/** @description udp monitors — the latest check, including its packet train (loss, round trips, jitter) when config.packetLoss is on. */
|
|
1363
1369
|
MonitorLatestUdp: {
|
|
1364
1370
|
/**
|
|
1365
1371
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -1374,6 +1380,22 @@ export interface components {
|
|
|
1374
1380
|
response_received: boolean | null;
|
|
1375
1381
|
bytes_received: number | null;
|
|
1376
1382
|
first_byte_ms: number | null;
|
|
1383
|
+
/** @description Request packets the check sent a short gap apart (config.packetCount, default 5). null when the check sent no train: config.packetLoss off, a check held to one packet by the per-destination limit, an older check, or a TCP/HTTP game protocol. */
|
|
1384
|
+
packets_sent: number | null;
|
|
1385
|
+
/** @description Packets answered within the loss window. */
|
|
1386
|
+
packets_received: number | null;
|
|
1387
|
+
/** @description Lost / sent × 100 for this check; 100 when nothing answered (the check is then down). */
|
|
1388
|
+
packet_loss_pct: number | null;
|
|
1389
|
+
/** @description Fastest round trip of the answered packets. */
|
|
1390
|
+
rtt_min_ms: number | null;
|
|
1391
|
+
/** @description Mean round trip of the answered packets. */
|
|
1392
|
+
rtt_avg_ms: number | null;
|
|
1393
|
+
/** @description Slowest round trip of the answered packets. */
|
|
1394
|
+
rtt_max_ms: number | null;
|
|
1395
|
+
/** @description Mean absolute difference between the round trips of consecutive answered packets; null with fewer than 2 answers. */
|
|
1396
|
+
jitter_ms: number | null;
|
|
1397
|
+
/** @description Replies stopped after the same first packets on consecutive checks: the server limits queries, so the check is left out of loss figures and alerts. */
|
|
1398
|
+
rate_limited: boolean | null;
|
|
1377
1399
|
};
|
|
1378
1400
|
/** @description icmp (ping) monitors — the latest check. RTTs are null when no reply came back. */
|
|
1379
1401
|
MonitorLatestIcmp: {
|
|
@@ -1830,7 +1852,7 @@ export interface components {
|
|
|
1830
1852
|
dmarc_pass: boolean | null;
|
|
1831
1853
|
spam_score: number | null;
|
|
1832
1854
|
};
|
|
1833
|
-
/** @description game monitors — the latest check: what the server's status query reported. Player counts are null when the server hides them. */
|
|
1855
|
+
/** @description game monitors — the latest check: what the server's status query reported, and, with config.packetLoss on, the packet train's loss, round trips and jitter on the UDP protocols (Steam/A2S, Minecraft Bedrock, SA-MP/open.mp, MTA). Player counts are null when the server hides them. */
|
|
1834
1856
|
MonitorLatestGame: {
|
|
1835
1857
|
/**
|
|
1836
1858
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -1860,6 +1882,22 @@ export interface components {
|
|
|
1860
1882
|
game: string | null;
|
|
1861
1883
|
/** @description The monitor's config.preset. */
|
|
1862
1884
|
preset: string | null;
|
|
1885
|
+
/** @description Request packets the check sent a short gap apart (config.packetCount, default 5). null when the check sent no train: config.packetLoss off, a check held to one packet by the per-destination limit, an older check, or a TCP/HTTP game protocol. */
|
|
1886
|
+
packets_sent: number | null;
|
|
1887
|
+
/** @description Packets answered within the loss window. */
|
|
1888
|
+
packets_received: number | null;
|
|
1889
|
+
/** @description Lost / sent × 100 for this check; 100 when nothing answered (the check is then down). */
|
|
1890
|
+
packet_loss_pct: number | null;
|
|
1891
|
+
/** @description Fastest round trip of the answered packets. */
|
|
1892
|
+
rtt_min_ms: number | null;
|
|
1893
|
+
/** @description Mean round trip of the answered packets. */
|
|
1894
|
+
rtt_avg_ms: number | null;
|
|
1895
|
+
/** @description Slowest round trip of the answered packets. */
|
|
1896
|
+
rtt_max_ms: number | null;
|
|
1897
|
+
/** @description Mean absolute difference between the round trips of consecutive answered packets; null with fewer than 2 answers. */
|
|
1898
|
+
jitter_ms: number | null;
|
|
1899
|
+
/** @description Replies stopped after the same first packets on consecutive checks: the server limits queries, so the check is left out of loss figures and alerts. */
|
|
1900
|
+
rate_limited: boolean | null;
|
|
1863
1901
|
};
|
|
1864
1902
|
/** @description Type-aware summary of the monitor page's top cards. `kind` is always the monitor's type; every field is present, null when unknown. */
|
|
1865
1903
|
MonitorLatest:
|
|
@@ -2162,6 +2200,7 @@ export interface components {
|
|
|
2162
2200
|
| "smtp-test"
|
|
2163
2201
|
| "mail-server-check"
|
|
2164
2202
|
| "ntp-test"
|
|
2203
|
+
| "game-server-check"
|
|
2165
2204
|
| "email-health";
|
|
2166
2205
|
label: string;
|
|
2167
2206
|
/** @description The question this check answers, in one line. */
|
|
@@ -2256,6 +2295,7 @@ export interface components {
|
|
|
2256
2295
|
| "smtp-test"
|
|
2257
2296
|
| "mail-server-check"
|
|
2258
2297
|
| "ntp-test"
|
|
2298
|
+
| "game-server-check"
|
|
2259
2299
|
| "email-health";
|
|
2260
2300
|
target: string;
|
|
2261
2301
|
/** @description Whether the check itself succeeded — the finding, not the transport. false is a normal, billable answer: a closed port, an NXDOMAIN, an expired or untrusted certificate, a host that doesn't resolve, a failed handshake, or a target the prober refuses (an internal address). Read `error` for what happened; `result` keeps the probe's raw answer. */
|
|
@@ -2307,6 +2347,7 @@ export interface components {
|
|
|
2307
2347
|
| "smtp-test"
|
|
2308
2348
|
| "mail-server-check"
|
|
2309
2349
|
| "ntp-test"
|
|
2350
|
+
| "game-server-check"
|
|
2310
2351
|
| "email-health";
|
|
2311
2352
|
label: string;
|
|
2312
2353
|
/**
|
|
@@ -2460,6 +2501,8 @@ export interface components {
|
|
|
2460
2501
|
*/
|
|
2461
2502
|
scheduling_strategy?: "roundrobin" | "random" | "parallel";
|
|
2462
2503
|
locations?: string[];
|
|
2504
|
+
/** @description Location capabilities this monitor needs, derived from its settings when it is saved: "ipv6" for ipVersion "ip6", an IPv6 address as target or a hostname with only IPv6 (AAAA) addresses; "port25" for an SMTP check on port 25 (the default) or a TCP check of port 25; "chromium" for Core Web Vitals and Page integrity in browser mode; "playwright" for browser checks. Every location in `locations` must list them in GET /v1/locations → capabilities; a save that picks one that does not is refused with 400. Checks never run from a location that lost one. */
|
|
2505
|
+
required_capabilities?: ("ipv6" | "port25" | "chromium" | "playwright")[];
|
|
2463
2506
|
/**
|
|
2464
2507
|
* @description Why `status` is what it is: critical_incident = a confirmed critical incident is open (the only way to be down); warning_incident = an open warning incident; failed_check = a check is failing (the latest check failed, or an alert rule such as status code or response time is failing) without a confirmed incident yet (degraded); paused; no_data = nothing reported yet (unknown); ok. Present on GET/POST/PATCH/pause/resume responses.
|
|
2465
2508
|
* @enum {string}
|
|
@@ -2486,13 +2529,37 @@ export interface components {
|
|
|
2486
2529
|
failing?: boolean;
|
|
2487
2530
|
/** Format: date-time */
|
|
2488
2531
|
failing_since?: string | null;
|
|
2532
|
+
/** @description The unconfirmed rule closest to confirming, as the dashboard's 'Confirming 2/3' chip shows it: which rule, what its latest failing check measured and where, and where the streak has failed so far. rule / last_value / last_location are null and confirmed_from is [] when the engine doesn't report them. */
|
|
2489
2533
|
confirming?: {
|
|
2490
2534
|
count?: number;
|
|
2491
2535
|
threshold?: number;
|
|
2536
|
+
rule?: {
|
|
2537
|
+
name?: string;
|
|
2538
|
+
/** @enum {string} */
|
|
2539
|
+
severity?: "critical" | "warning";
|
|
2540
|
+
/** @description The rule's region slugs; [] = all regions. */
|
|
2541
|
+
regions?: string[];
|
|
2542
|
+
} | null;
|
|
2543
|
+
/** @description The latest failing check's value with its unit, e.g. "164 ms"; null for a non-numeric rule (e.g. the server not answering). */
|
|
2544
|
+
last_value?: string | null;
|
|
2545
|
+
last_location?: {
|
|
2546
|
+
/** @description City (or location name), e.g. Oregon. */
|
|
2547
|
+
name?: string;
|
|
2548
|
+
region?: string | null;
|
|
2549
|
+
} | null;
|
|
2550
|
+
/** @description Locations whose checks have failed in this streak so far, first first. */
|
|
2551
|
+
confirmed_from?: string[];
|
|
2492
2552
|
} | null;
|
|
2493
2553
|
} | null;
|
|
2494
|
-
/** @description PATCH /monitors/{id} responses only: true when the update changed how the check connects (target, port, credentials, TLS, request, record type, script…) and one immediate check was dispatched, so the result reflects the new settings within seconds instead of after a full interval
|
|
2554
|
+
/** @description PATCH /monitors/{id} and POST /monitors/{id}/resume responses only. PATCH: true when the update changed how the check connects (target, port, credentials, TLS, request, record type, script…) and one immediate check was dispatched, so the result reflects the new settings within seconds instead of after a full interval; saves are capped at 10 such checks per monitor per hour; false for alert-rule-only or cosmetic changes and for paused, heartbeat and host monitors. Resume: true when the resume dispatched one immediate check; at most one per monitor per 10 minutes and 20 per organization per minute, false past those (the monitor waits for its schedule, see next_check_at), for heartbeat and host monitors, and when the monitor was already running. Neither uses or resets the plan's Run-now budget. */
|
|
2495
2555
|
check_queued?: boolean;
|
|
2556
|
+
/**
|
|
2557
|
+
* Format: date-time
|
|
2558
|
+
* @description POST /monitors/{id}/resume responses only: the latest time the first scheduled check is due. It can come one interval slot earlier when the scheduler picks the resume up quickly. null for heartbeat and host monitors (they wait for the next ping) and when the monitor was already running.
|
|
2559
|
+
*/
|
|
2560
|
+
next_check_at?: string | null;
|
|
2561
|
+
/** @description PATCH /monitors/{id} responses only: why the save's immediate check did not run — no selected location can run the monitor right now, e.g. "No selected location can run this check right now (needs IPv6)." (see GET /v1/locations → capabilities). null otherwise. */
|
|
2562
|
+
check_blocked?: string | null;
|
|
2496
2563
|
/** @description POST /monitors and PATCH /monitors/{id} responses only: the `config` keys you sent that this monitor type doesn't use — dropped, not stored ([] when everything was kept). Check it after every write: a misspelt key otherwise leaves the setting unset. Obvious aliases are renamed instead of dropped: `login` / `user` → `username` and `pass` → `password` on imap, pop3, smtp, ftp and sftp; `username` / `login` / `user` → `authUsername` and `password` / `pass` → `authPassword` on http and api; a snake_case spelling of a camelCase key (`timeout_seconds` → `timeoutSeconds`) on every type. Config keys per type: GET /meta/monitor-types. */
|
|
2497
2564
|
ignored_config_keys?: string[];
|
|
2498
2565
|
/** @description The open (firing or acknowledged) incident, or null. When several are open: the critical one, then the earliest started. */
|
|
@@ -2501,7 +2568,7 @@ export interface components {
|
|
|
2501
2568
|
alerts_muted?: boolean;
|
|
2502
2569
|
/** Format: date-time */
|
|
2503
2570
|
alerts_muted_until?: string | null;
|
|
2504
|
-
/** @description true when an
|
|
2571
|
+
/** @description true when an incident here would notify someone: at least one contact group from an alert rule or the monitor's own notification groups is served by an enabled notification channel whose severity filter takes critical incidents (an email channel also needs a member with an email address in one of its groups), or has an escalation policy that pages a person or an enabled channel. Members without a channel, turned-off or warnings-only channels and empty groups don't count. false = the dashboard's silent-monitor warning: an incident here would reach nobody. */
|
|
2505
2572
|
has_notification_route?: boolean;
|
|
2506
2573
|
tags?: string[];
|
|
2507
2574
|
/** @description Type-specific config (keys per type under config_fields in GET /meta/monitor-types). Credentials (catalog fields marked secret) are write-only and read back as "[redacted]" */
|
|
@@ -2537,6 +2604,7 @@ export interface components {
|
|
|
2537
2604
|
last_check?: {
|
|
2538
2605
|
/** Format: date-time */
|
|
2539
2606
|
at: string;
|
|
2607
|
+
/** @description Reachability, not health: true when the probe reached the target and got an answer. A response that then fails a rule (an HTTP 500, a failed assertion) is still true here and surfaces as an incident instead — read the monitor's status and current_incident for health. */
|
|
2540
2608
|
success: boolean;
|
|
2541
2609
|
duration_ms: number;
|
|
2542
2610
|
/** @description Location name; the prober's name when it is not a listed location. */
|
|
@@ -2678,6 +2746,7 @@ export interface components {
|
|
|
2678
2746
|
check_success_percent?: number | null;
|
|
2679
2747
|
total_checks?: number;
|
|
2680
2748
|
successful_checks?: number;
|
|
2749
|
+
/** @description Checks where the probe did not reach the target or got no answer (same meaning as check_success_percent). A response that fails a rule is not counted here — it opens an incident. */
|
|
2681
2750
|
failed_checks?: number;
|
|
2682
2751
|
/** @description Latency over successful checks only (a failed check has no response time); null when no check succeeded */
|
|
2683
2752
|
avg_response_time_ms?: number | null;
|
|
@@ -2687,7 +2756,7 @@ export interface components {
|
|
|
2687
2756
|
max_response_time_ms?: number | null;
|
|
2688
2757
|
/**
|
|
2689
2758
|
* Format: date-time
|
|
2690
|
-
* @description The newest failed check in the window (RFC 3339 / ISO 8601 UTC); null when none failed
|
|
2759
|
+
* @description The newest failed check in the window (RFC 3339 / ISO 8601 UTC), failed as in failed_checks; null when none failed — even when a rule failure opened an incident (see incidents)
|
|
2691
2760
|
*/
|
|
2692
2761
|
last_failure_at?: string | null;
|
|
2693
2762
|
/** @description Incident-based headline uptime for the last 24 hours */
|
|
@@ -2730,6 +2799,7 @@ export interface components {
|
|
|
2730
2799
|
* @description When the check ran — RFC 3339 / ISO 8601 UTC, e.g. 2026-10-17T14:31:29.000Z
|
|
2731
2800
|
*/
|
|
2732
2801
|
timestamp?: string;
|
|
2802
|
+
/** @description Reachability, not health: true when the probe reached the target and got an answer. A response that then fails a rule (an HTTP 500, a failed assertion) is still true here and surfaces as an incident instead — read the monitor's status and current_incident for health. */
|
|
2733
2803
|
success?: boolean;
|
|
2734
2804
|
duration_ms?: number;
|
|
2735
2805
|
/** @description The probe location's system name */
|
|
@@ -2774,6 +2844,7 @@ export interface components {
|
|
|
2774
2844
|
timestamp?: string;
|
|
2775
2845
|
location?: string;
|
|
2776
2846
|
target?: string;
|
|
2847
|
+
/** @description Reachability, not health: true when the probe reached the target and got an answer. A response that then fails a rule (an HTTP 500, a failed assertion) is still true here and surfaces as an incident instead — read the monitor's status and current_incident for health. */
|
|
2777
2848
|
success?: boolean;
|
|
2778
2849
|
duration_ms?: number;
|
|
2779
2850
|
error?: string | null;
|
|
@@ -2814,6 +2885,8 @@ export interface components {
|
|
|
2814
2885
|
action?: "pause" | "resume" | "delete";
|
|
2815
2886
|
succeeded?: string[];
|
|
2816
2887
|
skipped?: string[];
|
|
2888
|
+
/** @description resume only: the ids that got an immediate check. At most 20 per organization per minute (and one per monitor per 10 minutes); the rest of the resumed monitors wait for their next scheduled check. */
|
|
2889
|
+
checks_queued?: string[];
|
|
2817
2890
|
};
|
|
2818
2891
|
AlertRule: {
|
|
2819
2892
|
/** Format: uuid */
|
|
@@ -2831,6 +2904,16 @@ export interface components {
|
|
|
2831
2904
|
failure_threshold?: number;
|
|
2832
2905
|
min_failed_probes?: number;
|
|
2833
2906
|
duration_window_seconds?: number;
|
|
2907
|
+
/** @description Regions the rule is judged from. Empty = all regions. Checks from probers in other regions are skipped by this rule: they neither count towards confirming nor reset the streak. A region-scoped rule takes precedence over an all-regions rule of the same metric and severity for checks from its regions. */
|
|
2908
|
+
regions?: (
|
|
2909
|
+
| "europe"
|
|
2910
|
+
| "north-america"
|
|
2911
|
+
| "south-america"
|
|
2912
|
+
| "asia"
|
|
2913
|
+
| "middle-east"
|
|
2914
|
+
| "africa"
|
|
2915
|
+
| "oceania"
|
|
2916
|
+
)[];
|
|
2834
2917
|
enabled?: boolean;
|
|
2835
2918
|
is_system?: boolean;
|
|
2836
2919
|
contact_group?: {
|
|
@@ -2861,8 +2944,21 @@ export interface components {
|
|
|
2861
2944
|
* @default 0
|
|
2862
2945
|
*/
|
|
2863
2946
|
durationWindow: number;
|
|
2864
|
-
/**
|
|
2947
|
+
/**
|
|
2948
|
+
* Format: uuid
|
|
2949
|
+
* @description Contact group this rule notifies. Omit to inherit the monitor's notification group (the first of config.notificationGroupIds that still exists — the organization's default group unless the monitor names others); null for no rule-level group.
|
|
2950
|
+
*/
|
|
2865
2951
|
contactGroupId?: string | null;
|
|
2952
|
+
/** @description Game server monitors only: judge this rule only from checks made in these regions (e.g. a latency threshold for Europe only). Omit or [] for all regions. Rules of the same metric and severity may coexist when their regions don't overlap; a region-scoped rule takes precedence over an all-regions one for its regions. */
|
|
2953
|
+
regions?: (
|
|
2954
|
+
| "europe"
|
|
2955
|
+
| "north-america"
|
|
2956
|
+
| "south-america"
|
|
2957
|
+
| "asia"
|
|
2958
|
+
| "middle-east"
|
|
2959
|
+
| "africa"
|
|
2960
|
+
| "oceania"
|
|
2961
|
+
)[];
|
|
2866
2962
|
};
|
|
2867
2963
|
Location: {
|
|
2868
2964
|
/** Format: uuid */
|
|
@@ -2876,6 +2972,8 @@ export interface components {
|
|
|
2876
2972
|
country_code?: string;
|
|
2877
2973
|
/** @description The location can run real-browser checks (Core Web Vitals, Page integrity in browser mode). */
|
|
2878
2974
|
browser?: boolean;
|
|
2975
|
+
/** @description What the location's network can do, as its probers report it: "ipv6" = reaches IPv6 targets, "port25" = outbound SMTP port 25 is not blocked, "chromium" = the real browser for Core Web Vitals / browser-mode Page integrity works, "playwright" = the browser-check runner works (both on browser locations only). A monitor that needs one (ipVersion "ip6", an IPv6 address or IPv6-only hostname as target, an SMTP check on port 25, a TCP check of port 25, a Core Web Vitals or browser-mode integrity check, a browser check) can only be saved with locations that list it — see the monitor's required_capabilities. */
|
|
2976
|
+
capabilities?: ("ipv6" | "port25" | "chromium" | "playwright")[];
|
|
2879
2977
|
};
|
|
2880
2978
|
Incident: {
|
|
2881
2979
|
id?: number;
|
|
@@ -3439,6 +3537,18 @@ export interface components {
|
|
|
3439
3537
|
minFailedProbes?: number;
|
|
3440
3538
|
/** @description Seconds */
|
|
3441
3539
|
durationWindow?: number;
|
|
3540
|
+
/** @description Game server monitors only. Omit to keep the rule's regions; null or [] = all regions; otherwise the regions the rule is judged from. */
|
|
3541
|
+
regions?:
|
|
3542
|
+
| (
|
|
3543
|
+
| "europe"
|
|
3544
|
+
| "north-america"
|
|
3545
|
+
| "south-america"
|
|
3546
|
+
| "asia"
|
|
3547
|
+
| "middle-east"
|
|
3548
|
+
| "africa"
|
|
3549
|
+
| "oceania"
|
|
3550
|
+
)[]
|
|
3551
|
+
| null;
|
|
3442
3552
|
enabled?: boolean;
|
|
3443
3553
|
};
|
|
3444
3554
|
ContactUpdate: {
|
|
@@ -3920,7 +4030,7 @@ export interface components {
|
|
|
3920
4030
|
};
|
|
3921
4031
|
/** @description The dashboard's setup callout */
|
|
3922
4032
|
attention?: {
|
|
3923
|
-
/** @description Active monitors whose alerts would reach nobody
|
|
4033
|
+
/** @description Active monitors whose alerts would reach nobody: no contact group at all, or only groups that no enabled channel taking critical incidents or paging escalation policy delivers through (members without a channel don't count) */
|
|
3924
4034
|
silent_monitors?: number;
|
|
3925
4035
|
};
|
|
3926
4036
|
/** @description Certificate (SSL monitors) and domain (RDAP monitors) expiry in one bulk lookup; null when it can't be read right now */
|
|
@@ -4451,6 +4561,39 @@ export interface components {
|
|
|
4451
4561
|
/** @default 3 */
|
|
4452
4562
|
count: number;
|
|
4453
4563
|
};
|
|
4564
|
+
/** @description Options for the `game-server-check` diagnostic. Is this game server online, and what does it report — name, players and slots, map, version, password and VAC, the player list, and the latency (status query round trip) from three regions? Finds the query port when the given one is silent. */
|
|
4565
|
+
DiagnosticOptionsGameServerCheck: {
|
|
4566
|
+
/** @enum {string} */
|
|
4567
|
+
game?:
|
|
4568
|
+
| "cs2"
|
|
4569
|
+
| "csgo"
|
|
4570
|
+
| "tf2"
|
|
4571
|
+
| "gmod"
|
|
4572
|
+
| "l4d2"
|
|
4573
|
+
| "rust"
|
|
4574
|
+
| "ark_se"
|
|
4575
|
+
| "dayz"
|
|
4576
|
+
| "arma3"
|
|
4577
|
+
| "valheim"
|
|
4578
|
+
| "7dtd"
|
|
4579
|
+
| "project_zomboid"
|
|
4580
|
+
| "v_rising"
|
|
4581
|
+
| "enshrouded"
|
|
4582
|
+
| "conan_exiles"
|
|
4583
|
+
| "unturned"
|
|
4584
|
+
| "space_engineers"
|
|
4585
|
+
| "kf2"
|
|
4586
|
+
| "mordhau"
|
|
4587
|
+
| "insurgency_sandstorm"
|
|
4588
|
+
| "soulmask"
|
|
4589
|
+
| "minecraft_java"
|
|
4590
|
+
| "minecraft_bedrock"
|
|
4591
|
+
| "fivem"
|
|
4592
|
+
| "redm"
|
|
4593
|
+
| "samp"
|
|
4594
|
+
| "mta"
|
|
4595
|
+
| "a2s_generic";
|
|
4596
|
+
};
|
|
4454
4597
|
/** @description Options for the `email-health` diagnostic. Is this domain protected against email spoofing — are SPF, DKIM and DMARC present and correctly configured? */
|
|
4455
4598
|
DiagnosticOptionsEmailHealth: {
|
|
4456
4599
|
/**
|
|
@@ -4844,6 +4987,7 @@ export interface operations {
|
|
|
4844
4987
|
| "smtp-test"
|
|
4845
4988
|
| "mail-server-check"
|
|
4846
4989
|
| "ntp-test"
|
|
4990
|
+
| "game-server-check"
|
|
4847
4991
|
| "email-health";
|
|
4848
4992
|
};
|
|
4849
4993
|
cookie?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watchfor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"description": "Official TypeScript SDK + CLI for WatchFor — uptime & infrastructure monitoring (monitors, alert rules, incidents, maintenance windows) over the REST API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"watchfor",
|