Class: DatadogAPIClient::V1::MonitorOptions

Inherits:
Object
  • Object
show all
Includes:
BaseGenericModel
Defined in:
lib/datadog_api_client/v1/models/monitor_options.rb

Overview

List of options associated with your monitor.

Instance Attribute Summary collapse

Method Summary

Methods included from BaseGenericModel

included

Instance Attribute Details

#aggregationObject

Type of aggregation performed in the monitor query.



29
30
31
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 29

def aggregation
  @aggregation
end

#device_idsObject

IDs of the device the Synthetics monitor is running on.



32
33
34
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 32

def device_ids
  @device_ids
end

#enable_logs_sampleObject

Whether or not to send a log sample when the log monitor triggers.



35
36
37
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 35

def enable_logs_sample
  @enable_logs_sample
end

#enable_samplesObject

Whether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors.



38
39
40
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 38

def enable_samples
  @enable_samples
end

#escalation_messageObject

We recommend using the [is_renotify](docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify), block in the original message instead. A message to include with a re-notification. Supports the ‘@username` notification we allow elsewhere. Not applicable if renotify_interval is None.



44
45
46
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 44

def escalation_message
  @escalation_message
end

#evaluation_delayObject

Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor evaluates data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.



49
50
51
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 49

def evaluation_delay
  @evaluation_delay
end

#group_retention_durationObject

The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: “60m”, “1h”, and “2d”. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.



55
56
57
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 55

def group_retention_duration
  @group_retention_duration
end

#groupby_simple_monitorObject

Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold.



58
59
60
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 58

def groupby_simple_monitor
  @groupby_simple_monitor
end

#include_tagsObject

A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title.

Examples

  • If True, ‘[Triggered on host:h1] Monitor Title`

  • If False, ‘[Triggered] Monitor Title`



65
66
67
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 65

def include_tags
  @include_tags
end

#lockedObject

Whether or not the monitor is locked (only editable by creator and admins). Use restricted_roles instead.



68
69
70
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 68

def locked
  @locked
end

#min_failure_durationObject

How long the test should be in failure before alerting (integer, number of seconds, max 7200).



71
72
73
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 71

def min_failure_duration
  @min_failure_duration
end

#min_location_failedObject

The minimum number of locations in failure at the same time during at least one moment in the min_failure_duration period (min_location_failed and min_failure_duration are part of the advanced alerting rules - integer, >= 1).



76
77
78
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 76

def min_location_failed
  @min_location_failed
end

#new_group_delayObject

Time (in seconds) to skip evaluations for new groups.

For example, this option can be used to skip evaluations for new hosts while they initialize.

Must be a non negative integer.



83
84
85
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 83

def new_group_delay
  @new_group_delay
end

#new_host_delayObject

Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non negative integer.

Use new_group_delay instead.



90
91
92
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 90

def new_host_delay
  @new_host_delay
end

#no_data_timeframeObject

The number of minutes before a monitor notifies after data stops reporting. Datadog recommends at least 2x the monitor timeframe for query alerts or 2 minutes for service checks. If omitted, 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks.



95
96
97
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 95

def no_data_timeframe
  @no_data_timeframe
end

#notification_preset_nameObject

Toggles the display of additional content sent in the monitor notification.



98
99
100
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 98

def notification_preset_name
  @notification_preset_name
end

#notify_auditObject

A Boolean indicating whether tagged users is notified on changes to this monitor.



101
102
103
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 101

def notify_audit
  @notify_audit
end

#notify_byObject

Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ‘[“cluster”]`. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to `[*]` configures the monitor to notify as a simple-alert.



109
110
111
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 109

def notify_by
  @notify_by
end

#notify_no_dataObject

A Boolean indicating whether this monitor notifies when data stops reporting.



112
113
114
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 112

def notify_no_data
  @notify_no_data
end

#on_missing_dataObject

Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.



119
120
121
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 119

def on_missing_data
  @on_missing_data
end

#renotify_intervalObject

The number of minutes after the last notification before a monitor re-notifies on the current status. It only re-notifies if it’s not resolved.



123
124
125
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 123

def renotify_interval
  @renotify_interval
end

#renotify_occurrencesObject

The number of times re-notification messages should be sent on the current status at the provided re-notification interval.



126
127
128
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 126

def renotify_occurrences
  @renotify_occurrences
end

#renotify_statusesObject

The types of monitor statuses for which re-notification messages are sent.



129
130
131
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 129

def renotify_statuses
  @renotify_statuses
end

#require_full_windowObject

A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations are skipped. Default is false.



134
135
136
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 134

def require_full_window
  @require_full_window
end

#scheduling_optionsObject

Configuration options for scheduling.



137
138
139
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 137

def scheduling_options
  @scheduling_options
end

#silencedObject

Information about the downtime applied to the monitor.



140
141
142
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 140

def silenced
  @silenced
end

#synthetics_check_idObject

ID of the corresponding Synthetic check.



143
144
145
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 143

def synthetics_check_id
  @synthetics_check_id
end

#threshold_windowsObject

Alerting time window options.



146
147
148
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 146

def threshold_windows
  @threshold_windows
end

#thresholdsObject

List of the different monitor threshold available.



149
150
151
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 149

def thresholds
  @thresholds
end

#timeout_hObject

The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.



152
153
154
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 152

def timeout_h
  @timeout_h
end

#variablesObject

List of requests that can be used in the monitor query. **This feature is currently in beta.**



155
156
157
# File 'lib/datadog_api_client/v1/models/monitor_options.rb', line 155

def variables
  @variables
end