Class: Infrawrench::ProbesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::ProbesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.probes
Instance Method Summary collapse
-
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Create a probe.
-
#delete(probe_id:, org_id: nil, request_options: nil) ⇒ nil
Delete a probe.
-
#get(org_id: nil, request_options: nil) ⇒ Hash
List synthetic probes.
-
#initialize(transport) ⇒ ProbesNamespace
constructor
private
A new instance of ProbesNamespace.
-
#metrics(probe_id:, org_id: nil, start_ms: nil, end_ms: nil, request_options: nil) ⇒ Hash
Read a probe's recorded series.
-
#suggestions(org_id: nil, request_options: nil) ⇒ Hash
Suggest endpoints from synced resources.
-
#update(probe_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update or disable a probe.
Constructor Details
#initialize(transport) ⇒ ProbesNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ProbesNamespace.
11203 11204 11205 |
# File 'lib/infrawrench/client.rb', line 11203 def initialize(transport) @transport = transport end |
Instance Method Details
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Create a probe
Point an uptime/latency check at an endpoint. Numeric inputs are clamped into their allowed ranges rather than rejected; the first check runs within one poller tick. Audit-logged.
Requires permission: resources:write.
POST /api/org/orgId/probes
Raises on 400: Bad request
Raises on 404: Not found
11227 11228 11229 11230 11231 11232 11233 11234 11235 |
# File 'lib/infrawrench/client.rb', line 11227 def create(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/probes", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(probe_id:, org_id: nil, request_options: nil) ⇒ nil
Delete a probe
Remove the probe. Recorded series age out of the metric store. Audit-logged.
Requires permission: resources:write.
DELETE /api/org/orgId/probes/probeId
Raises on 404: Not found
11254 11255 11256 11257 11258 11259 11260 11261 11262 |
# File 'lib/infrawrench/client.rb', line 11254 def delete(probe_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/probes/{probeId}", path_params: { "orgId" => org_id, "probeId" => probe_id }, accept: :empty, request_options: ) end |
#get(org_id: nil, request_options: nil) ⇒ Hash
List synthetic probes
Every probe in the organization with its live status, consecutive-failure count, last latency and trailing-24h uptime. Probes run on an interval from an edge proxy outside the cluster, so results reflect what an internet client would see.
Requires permission: resources:read.
GET /api/org/orgId/probes
11281 11282 11283 11284 11285 11286 11287 11288 |
# File 'lib/infrawrench/client.rb', line 11281 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/probes", path_params: { "orgId" => org_id }, request_options: ) end |
#metrics(probe_id:, org_id: nil, start_ms: nil, end_ms: nil, request_options: nil) ⇒ Hash
Read a probe's recorded series
The "Latency" (ms) and "Up" (1/0) series over a time range, from the shared metric store. Resolution auto-selects raw/1-minute/1-hour rollups by span. Defaults to the trailing 24 hours.
Requires permission: resources:read.
GET /api/org/orgId/probes/probeId/metrics
Raises on 400: Bad request
Raises on 404: Not found
Raises on 503: A backing service this endpoint depends on is not available
11314 11315 11316 11317 11318 11319 11320 11321 11322 |
# File 'lib/infrawrench/client.rb', line 11314 def metrics(probe_id:, org_id: nil, start_ms: nil, end_ms: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/probes/{probeId}/metrics", path_params: { "orgId" => org_id, "probeId" => probe_id }, query: { "startMs" => start_ms, "endMs" => end_ms }, request_options: ) end |
#suggestions(org_id: nil, request_options: nil) ⇒ Hash
Suggest endpoints from synced resources
Endpoint candidates mined from the organization's synced resource outputs and fields (keys like url, endpoint, host, domain, publicIp). A cheap read over stored state — no provider API calls. Deduplicated by URL.
Requires permission: resources:read.
GET /api/org/orgId/probes/suggestions
11339 11340 11341 11342 11343 11344 11345 11346 |
# File 'lib/infrawrench/client.rb', line 11339 def suggestions(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/probes/suggestions", path_params: { "orgId" => org_id }, request_options: ) end |
#update(probe_id:, org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update or disable a probe
Edit settings and/or toggle enabled. Changing the URL or method resets
the probe's state to unknown — the history belongs to the old endpoint.
Audit-logged.
Requires permission: resources:write.
PUT /api/org/orgId/probes/probeId
Raises on 400: Bad request
Raises on 404: Not found
11369 11370 11371 11372 11373 11374 11375 11376 11377 |
# File 'lib/infrawrench/client.rb', line 11369 def update(probe_id:, org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/probes/{probeId}", path_params: { "orgId" => org_id, "probeId" => probe_id }, body: body, request_options: ) end |