watchfor 0.7.1 → 0.8.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 +2 -2
- data/lib/watchfor/client.rb +8 -1
- data/lib/watchfor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f617a30b3f2891552e5aa9339787b8c90d3abd011a043b3e8fe881f2520773bb
|
|
4
|
+
data.tar.gz: 4ced33369e896afc49839b2ceecabd3200773908e39d56e3a5478d5f6ac5d179
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d2ac815e653d49c5a64d8ffca42182943c3c57972e100be91e258707245a87201482f3cb85d35fffbb013a960ad5e7d969b4c44f21d9a3cf8d7fbc2a10a25d7
|
|
7
|
+
data.tar.gz: ffce38e6606dfb939c3fe65388dff4871d40cebeb44564f526a65c98ffefb3c606f758c7cb0ca448ffe669f6ff23a4167ece608f8f87562e4ab18a0b19c80f34
|
data/README.md
CHANGED
|
@@ -50,7 +50,7 @@ wf.contact_groups.delete("<group-id>", force: true)
|
|
|
50
50
|
|
|
51
51
|
### Live diagnostics
|
|
52
52
|
|
|
53
|
-
Run any of
|
|
53
|
+
Run any of 22 checks from WatchFor's probe fleet against **any public
|
|
54
54
|
target**, monitored or not — this measures right now, rather than reading
|
|
55
55
|
what WatchFor recorded:
|
|
56
56
|
|
|
@@ -76,7 +76,7 @@ and spend the same per-plan hourly allowance as the dashboard Toolbox.
|
|
|
76
76
|
Details: <https://watchfor.io/docs/api/diagnostics>
|
|
77
77
|
|
|
78
78
|
Namespaces: `wf.monitors`, `wf.alert_rules`, `wf.incidents`,
|
|
79
|
-
`wf.maintenance_windows`, `wf.contacts`, `wf.contact_groups`,
|
|
79
|
+
`wf.hosts`, `wf.maintenance_windows`, `wf.contacts`, `wf.contact_groups`,
|
|
80
80
|
`wf.diagnostics`. Top-level:
|
|
81
81
|
`wf.summary`, `wf.plan`, `wf.me`, `wf.locations`, `wf.monitor_types`,
|
|
82
82
|
`wf.incident_stats(period)`, `wf.notifications`, `wf.activity`. Errors raise
|
data/lib/watchfor/client.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Watchfor
|
|
|
25
25
|
# wf.summary
|
|
26
26
|
# wf.monitors.list["data"].each { |m| puts "#{m['name']} #{m['status']}" }
|
|
27
27
|
class Client
|
|
28
|
-
attr_reader :monitors, :alert_rules, :incidents,
|
|
28
|
+
attr_reader :monitors, :alert_rules, :incidents, :hosts,
|
|
29
29
|
:maintenance_windows, :contacts, :contact_groups,
|
|
30
30
|
:diagnostics
|
|
31
31
|
|
|
@@ -38,6 +38,7 @@ module Watchfor
|
|
|
38
38
|
@monitors = Monitors.new(self)
|
|
39
39
|
@alert_rules = AlertRules.new(self)
|
|
40
40
|
@incidents = Incidents.new(self)
|
|
41
|
+
@hosts = Hosts.new(self)
|
|
41
42
|
@maintenance_windows = MaintenanceWindows.new(self)
|
|
42
43
|
@contacts = Contacts.new(self)
|
|
43
44
|
@contact_groups = ContactGroups.new(self)
|
|
@@ -158,6 +159,12 @@ module Watchfor
|
|
|
158
159
|
def include(id) = @c.request("POST", "/incidents/#{id}/include")
|
|
159
160
|
end
|
|
160
161
|
|
|
162
|
+
class Hosts < Namespace
|
|
163
|
+
def list(**query) = @c.request("GET", "/hosts", query: query)
|
|
164
|
+
def get(id) = @c.request("GET", "/hosts/#{id}")
|
|
165
|
+
def metrics(id, metrics, range: "24h") = @c.request("GET", "/hosts/#{id}/metrics", query: { metrics: Array(metrics).join(","), range: range })
|
|
166
|
+
end
|
|
167
|
+
|
|
161
168
|
class MaintenanceWindows < Namespace
|
|
162
169
|
def list(**query) = @c.request("GET", "/maintenance-windows", query: query)
|
|
163
170
|
def get(id) = @c.request("GET", "/maintenance-windows/#{id}")
|
data/lib/watchfor/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchfor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WatchFor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Zero-dependency Ruby client for the WatchFor REST API (monitors, alert
|
|
14
14
|
rules, incidents, maintenance windows) plus a `watchfor` CLI.
|