watchfor 0.16.0 → 0.17.0
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.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/watchfor/client.rb +7 -0
- data/lib/watchfor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 440bd3cc9c46afea4d4952984e93294db18a02ded76d8a5d5bbaded7d8a927a5
|
|
4
|
+
data.tar.gz: d0798e7395d9471d562ccbe0f299c330603e20cae7141cf68c0e13db4e9acf94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b1a026e89c31b6c2bf93f405655f360bffd2a91692d15f4df0da6dda625b25f54acf3d5d5fe54dfa5f25d53bef9476233b0d222852dcc7901baa2983177f988
|
|
7
|
+
data.tar.gz: '0288f489a53a6029f352dad623296943e3e917bfa0cf93fec0dec6f5262ca122bc62b6b5e8869e359a4994e8639ae9b885d13a944bcfc43abac7cc156e5f9676'
|
data/README.md
CHANGED
|
@@ -37,6 +37,12 @@ wf.incidents.list(status: "firing")["data"].each { |i| puts i["message"] }
|
|
|
37
37
|
# uptime, SLA, reports and the status page (include undoes it)
|
|
38
38
|
wf.incidents.exclude(19351, reason: "Probe-side DNS hiccup")
|
|
39
39
|
|
|
40
|
+
# Post-mortem: creates the draft on first use; only the sections you name change
|
|
41
|
+
wf.incidents.update_postmortem(19351, {
|
|
42
|
+
sections: { summary: "Checkout returned 502 for 14 minutes." },
|
|
43
|
+
add_action_items: [{ title: "Validate upstreams in CI" }]
|
|
44
|
+
})
|
|
45
|
+
|
|
40
46
|
# Irreversible: wipe a monitor's checks and incidents; uptime restarts "since reset"
|
|
41
47
|
wf.monitors.reset(mon["id"])
|
|
42
48
|
|
data/lib/watchfor/client.rb
CHANGED
|
@@ -305,6 +305,13 @@ module Watchfor
|
|
|
305
305
|
def mark_maintenance(id, idempotency_key: nil)
|
|
306
306
|
@c.request("POST", "/incidents/#{id}/mark-maintenance", idempotency_key: idempotency_key)
|
|
307
307
|
end
|
|
308
|
+
# The incident's post-mortem (404 when it has none yet - #update_postmortem creates it).
|
|
309
|
+
def get_postmortem(id) = @c.request("GET", "/incidents/#{id}/postmortem")
|
|
310
|
+
# Create the post-mortem draft on first use, then apply only what is given:
|
|
311
|
+
# "sections" replaces just the sections named; "add_timeline" and
|
|
312
|
+
# "add_action_items" append (repeats skipped). Publishing and deleting stay
|
|
313
|
+
# in the dashboard.
|
|
314
|
+
def update_postmortem(id, body) = @c.request("PATCH", "/incidents/#{id}/postmortem", body: body)
|
|
308
315
|
end
|
|
309
316
|
|
|
310
317
|
class StatusPages < Namespace
|
data/lib/watchfor/version.rb
CHANGED