Class: DatadogAPIClient::V1::SLOHistoryMonitor

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/slo_history_monitor.rb

Overview

An object that holds an SLI value and its associated data. It can represent an SLO’s overall SLI value. This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SLOHistoryMonitor

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    attributes Model attributes in the form of hash



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 115

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOHistoryMonitor` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOHistoryMonitor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'error_budget_remaining')
    if (value = attributes[:'error_budget_remaining']).is_a?(Hash)
      self.error_budget_remaining = value
    end
  end

  if attributes.key?(:'errors')
    if (value = attributes[:'errors']).is_a?(Array)
      self.errors = value
    end
  end

  if attributes.key?(:'group')
    self.group = attributes[:'group']
  end

  if attributes.key?(:'history')
    if (value = attributes[:'history']).is_a?(Array)
      self.history = value
    end
  end

  if attributes.key?(:'monitor_modified')
    self.monitor_modified = attributes[:'monitor_modified']
  end

  if attributes.key?(:'monitor_type')
    self.monitor_type = attributes[:'monitor_type']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'precision')
    self.precision = attributes[:'precision']
  end

  if attributes.key?(:'preview')
    self.preview = attributes[:'preview']
  end

  if attributes.key?(:'sli_value')
    self.sli_value = attributes[:'sli_value']
  end

  if attributes.key?(:'span_precision')
    self.span_precision = attributes[:'span_precision']
  end

  if attributes.key?(:'uptime')
    self.uptime = attributes[:'uptime']
  end
end

Instance Attribute Details

#error_budget_remainingObject

A mapping of threshold ‘timeframe` to the remaining error budget.



27
28
29
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 27

def error_budget_remaining
  @error_budget_remaining
end

#errorsObject

An array of error objects returned while querying the history data for the service level objective.



30
31
32
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 30

def errors
  @errors
end

#groupObject

For groups in a grouped SLO, this is the group name.



33
34
35
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 33

def group
  @group
end

#historyObject

For ‘monitor` based SLOs, this includes the aggregated history as arrays that include time series and uptime data where `0=monitor` is in `OK` state and `1=monitor` is in `alert` state.



36
37
38
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 36

def history
  @history
end

#monitor_modifiedObject

For ‘monitor` based SLOs, this is the last modified timestamp in epoch seconds of the monitor.



39
40
41
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 39

def monitor_modified
  @monitor_modified
end

#monitor_typeObject

For ‘monitor` based SLOs, this describes the type of monitor.



42
43
44
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 42

def monitor_type
  @monitor_type
end

#nameObject

For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this is the monitor name.



45
46
47
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 45

def name
  @name
end

#precisionObject

The amount of decimal places the SLI value is accurate to for the given from ‘&&` to timestamp. Use `span_precision` instead.



48
49
50
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 48

def precision
  @precision
end

#previewObject

For ‘monitor` based SLOs, when `true` this indicates that a replay is in progress to give an accurate uptime calculation.



51
52
53
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 51

def preview
  @preview
end

#sli_valueObject

The current SLI value of the SLO over the history window.



54
55
56
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 54

def sli_value
  @sli_value
end

#span_precisionObject

The amount of decimal places the SLI value is accurate to for the given from ‘&&` to timestamp.



57
58
59
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 57

def span_precision
  @span_precision
end

#uptimeObject

Use ‘sli_value` instead.



60
61
62
# File 'lib/datadog_api_client/v1/models/slo_history_monitor.rb', line 60

def uptime
  @uptime
end