watchfor 0.7.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 610605570fb60a22c77f3ebb11c7a63fbf51c8ab712d11ed4faacb589964d8e0
4
- data.tar.gz: 8e7e57ffbf50cfaeeb3799764bde22e30091ed607a6e1857121821e7b17223f5
3
+ metadata.gz: f617a30b3f2891552e5aa9339787b8c90d3abd011a043b3e8fe881f2520773bb
4
+ data.tar.gz: 4ced33369e896afc49839b2ceecabd3200773908e39d56e3a5478d5f6ac5d179
5
5
  SHA512:
6
- metadata.gz: ae17cca0699ca2d25062bef9c2238595769397c0ec8ec37b0f4d70574dff4350471616befa55b8476ca2c7ad562f0ec4150b318ec05d4e251daebac114f1ca96
7
- data.tar.gz: a6e72946d6920a43e163bf24defe6765018ca7f03a17702a0f491dd3d836f3de4c5d51935e11a2c9d84990da51147e420c6915c3a92ce321a425f4ac7072cc8b
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 18 checks from WatchFor's probe fleet against **any public
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
@@ -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}")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchfor
4
- VERSION = "0.7.2"
4
+ VERSION = "0.8.0"
5
5
  end
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.7.2
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-10 00:00:00.000000000 Z
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.