Class: OpenObserve::Alert
Overview
An alert definition. OpenObserve serves alert CRUD from its v2 API; the wrapper hides that split.
Instance Attribute Summary
Attributes inherited from Record
Instance Method Summary collapse
-
#id ⇒ String?
The identifier the member routes take.
Methods inherited from Record
#==, #[], from, #hash, #initialize, #to_h
Constructor Details
This class inherits a constructor from OpenObserve::Record
Instance Method Details
#id ⇒ String?
The identifier the member routes take.
Spelled alert_id by the listing and id by a fetched alert, so inheriting Record#id
returned nil for every listed alert: OpenObserve::Alerts#get and OpenObserve::Alerts#update were then handed
no id and reached the collection route instead, answering 404 — which reads as a missing
alert rather than a missing key.
14 15 16 |
# File 'lib/openobserve/alert.rb', line 14 def id self['id'] || self['alert_id'] end |