Class MonitorOptions

java.lang.Object
com.datadog.api.client.v1.model.MonitorOptions

@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MonitorOptions extends Object
List of options associated with your monitor.
  • Field Details

  • Constructor Details

    • MonitorOptions

      public MonitorOptions()
  • Method Details

    • getAggregation

      @Nullable public MonitorOptionsAggregation getAggregation()
      Type of aggregation performed in the monitor query.
      Returns:
      aggregation
    • getDeviceIds

      @Deprecated @Nullable public List<MonitorDeviceID> getDeviceIds()
      Deprecated.
      IDs of the device the Synthetics monitor is running on.
      Returns:
      deviceIds
    • enableLogsSample

      @Deprecated public MonitorOptions enableLogsSample(Boolean enableLogsSample)
      Deprecated.
    • getEnableLogsSample

      @Nullable public Boolean getEnableLogsSample()
      Whether or not to send a log sample when the log monitor triggers.
      Returns:
      enableLogsSample
    • setEnableLogsSample

      public void setEnableLogsSample(Boolean enableLogsSample)
    • enableSamples

      public MonitorOptions enableSamples(Boolean enableSamples)
    • getEnableSamples

      @Nullable public Boolean getEnableSamples()
      Whether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors.
      Returns:
      enableSamples
    • setEnableSamples

      public void setEnableSamples(Boolean enableSamples)
    • escalationMessage

      public MonitorOptions escalationMessage(String escalationMessage)
    • getEscalationMessage

      @Nullable public String getEscalationMessage()
      We recommend using the is_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.
      Returns:
      escalationMessage
    • setEscalationMessage

      public void setEscalationMessage(String escalationMessage)
    • evaluationDelay

      public MonitorOptions evaluationDelay(Long evaluationDelay)
    • getEvaluationDelay

      @Nullable public Long getEvaluationDelay()
      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.
      Returns:
      evaluationDelay
    • getEvaluationDelay_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getEvaluationDelay_JsonNullable()
    • setEvaluationDelay_JsonNullable

      public void setEvaluationDelay_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> evaluationDelay)
    • setEvaluationDelay

      public void setEvaluationDelay(Long evaluationDelay)
    • groupRetentionDuration

      public MonitorOptions groupRetentionDuration(String groupRetentionDuration)
    • getGroupRetentionDuration

      @Nullable public String getGroupRetentionDuration()
      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.
      Returns:
      groupRetentionDuration
    • setGroupRetentionDuration

      public void setGroupRetentionDuration(String groupRetentionDuration)
    • groupbySimpleMonitor

      public MonitorOptions groupbySimpleMonitor(Boolean groupbySimpleMonitor)
    • getGroupbySimpleMonitor

      @Deprecated @Nullable public Boolean getGroupbySimpleMonitor()
      Deprecated.
      Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold. Use notify_by instead.
      Returns:
      groupbySimpleMonitor
    • setGroupbySimpleMonitor

      @Deprecated public void setGroupbySimpleMonitor(Boolean groupbySimpleMonitor)
      Deprecated.
    • includeTags

      public MonitorOptions includeTags(Boolean includeTags)
    • getIncludeTags

      @Nullable public Boolean getIncludeTags()
      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

      Returns:
      includeTags
    • setIncludeTags

      public void setIncludeTags(Boolean includeTags)
    • locked

      public MonitorOptions locked(Boolean locked)
    • getLocked

      @Deprecated @Nullable public Boolean getLocked()
      Deprecated.
      Whether or not the monitor is locked (only editable by creator and admins). Use restricted_roles instead.
      Returns:
      locked
    • setLocked

      @Deprecated public void setLocked(Boolean locked)
      Deprecated.
    • minFailureDuration

      public MonitorOptions minFailureDuration(Long minFailureDuration)
    • getMinFailureDuration

      @Nullable public Long getMinFailureDuration()
      How long the test should be in failure before alerting (integer, number of seconds, max 7200). minimum: 0 maximum: 7200
      Returns:
      minFailureDuration
    • getMinFailureDuration_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getMinFailureDuration_JsonNullable()
    • setMinFailureDuration_JsonNullable

      public void setMinFailureDuration_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> minFailureDuration)
    • setMinFailureDuration

      public void setMinFailureDuration(Long minFailureDuration)
    • minLocationFailed

      public MonitorOptions minLocationFailed(Long minLocationFailed)
    • getMinLocationFailed

      @Nullable public Long getMinLocationFailed()
      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).
      Returns:
      minLocationFailed
    • getMinLocationFailed_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getMinLocationFailed_JsonNullable()
    • setMinLocationFailed_JsonNullable

      public void setMinLocationFailed_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> minLocationFailed)
    • setMinLocationFailed

      public void setMinLocationFailed(Long minLocationFailed)
    • newGroupDelay

      public MonitorOptions newGroupDelay(Long newGroupDelay)
    • getNewGroupDelay

      @Nullable public Long getNewGroupDelay()
      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.

      Returns:
      newGroupDelay
    • getNewGroupDelay_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getNewGroupDelay_JsonNullable()
    • setNewGroupDelay_JsonNullable

      public void setNewGroupDelay_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> newGroupDelay)
    • setNewGroupDelay

      public void setNewGroupDelay(Long newGroupDelay)
    • newHostDelay

      public MonitorOptions newHostDelay(Long newHostDelay)
    • getNewHostDelay

      @Deprecated @Nullable public Long getNewHostDelay()
      Deprecated.
      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.

      Returns:
      newHostDelay
    • getNewHostDelay_JsonNullable

      @Deprecated public org.openapitools.jackson.nullable.JsonNullable<Long> getNewHostDelay_JsonNullable()
      Deprecated.
    • setNewHostDelay_JsonNullable

      public void setNewHostDelay_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> newHostDelay)
    • setNewHostDelay

      public void setNewHostDelay(Long newHostDelay)
    • noDataTimeframe

      public MonitorOptions noDataTimeframe(Long noDataTimeframe)
    • getNoDataTimeframe

      @Nullable public Long getNoDataTimeframe()
      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.
      Returns:
      noDataTimeframe
    • getNoDataTimeframe_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getNoDataTimeframe_JsonNullable()
    • setNoDataTimeframe_JsonNullable

      public void setNoDataTimeframe_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> noDataTimeframe)
    • setNoDataTimeframe

      public void setNoDataTimeframe(Long noDataTimeframe)
    • notificationPresetName

      public MonitorOptions notificationPresetName(MonitorOptionsNotificationPresets notificationPresetName)
    • getNotificationPresetName

      @Nullable public MonitorOptionsNotificationPresets getNotificationPresetName()
      Toggles the display of additional content sent in the monitor notification.
      Returns:
      notificationPresetName
    • setNotificationPresetName

      public void setNotificationPresetName(MonitorOptionsNotificationPresets notificationPresetName)
    • notifyAudit

      public MonitorOptions notifyAudit(Boolean notifyAudit)
    • getNotifyAudit

      @Nullable public Boolean getNotifyAudit()
      A Boolean indicating whether tagged users is notified on changes to this monitor.
      Returns:
      notifyAudit
    • setNotifyAudit

      public void setNotifyAudit(Boolean notifyAudit)
    • notifyBy

      public MonitorOptions notifyBy(List<String> notifyBy)
    • addNotifyByItem

      public MonitorOptions addNotifyByItem(String notifyByItem)
    • getNotifyBy

      @Nullable public List<String> getNotifyBy()
      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.
      Returns:
      notifyBy
    • setNotifyBy

      public void setNotifyBy(List<String> notifyBy)
    • notifyNoData

      public MonitorOptions notifyNoData(Boolean notifyNoData)
    • getNotifyNoData

      @Nullable public Boolean getNotifyNoData()
      A Boolean indicating whether this monitor notifies when data stops reporting. Defaults to false.
      Returns:
      notifyNoData
    • setNotifyNoData

      public void setNotifyNoData(Boolean notifyNoData)
    • onMissingData

      public MonitorOptions onMissingData(OnMissingDataOption onMissingData)
    • getOnMissingData

      @Nullable public OnMissingDataOption getOnMissingData()
      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 available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. It is also required for metric monitors that use scheduling_options.custom_schedule.
      Returns:
      onMissingData
    • setOnMissingData

      public void setOnMissingData(OnMissingDataOption onMissingData)
    • renotifyInterval

      public MonitorOptions renotifyInterval(Long renotifyInterval)
    • getRenotifyInterval

      @Nullable public Long getRenotifyInterval()
      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.
      Returns:
      renotifyInterval
    • getRenotifyInterval_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getRenotifyInterval_JsonNullable()
    • setRenotifyInterval_JsonNullable

      public void setRenotifyInterval_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> renotifyInterval)
    • setRenotifyInterval

      public void setRenotifyInterval(Long renotifyInterval)
    • renotifyOccurrences

      public MonitorOptions renotifyOccurrences(Long renotifyOccurrences)
    • getRenotifyOccurrences

      @Nullable public Long getRenotifyOccurrences()
      The number of times re-notification messages should be sent on the current status at the provided re-notification interval.
      Returns:
      renotifyOccurrences
    • getRenotifyOccurrences_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getRenotifyOccurrences_JsonNullable()
    • setRenotifyOccurrences_JsonNullable

      public void setRenotifyOccurrences_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> renotifyOccurrences)
    • setRenotifyOccurrences

      public void setRenotifyOccurrences(Long renotifyOccurrences)
    • renotifyStatuses

      public MonitorOptions renotifyStatuses(List<MonitorRenotifyStatusType> renotifyStatuses)
    • addRenotifyStatusesItem

      public MonitorOptions addRenotifyStatusesItem(MonitorRenotifyStatusType renotifyStatusesItem)
    • getRenotifyStatuses

      @Nullable public List<MonitorRenotifyStatusType> getRenotifyStatuses()
      The types of monitor statuses for which re-notification messages are sent. Default: null if renotify_interval is null. If renotify_interval is set, defaults to renotify on Alert and No Data .
      Returns:
      renotifyStatuses
    • getRenotifyStatuses_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<List<MonitorRenotifyStatusType>> getRenotifyStatuses_JsonNullable()
    • setRenotifyStatuses_JsonNullable

      public void setRenotifyStatuses_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<List<MonitorRenotifyStatusType>> renotifyStatuses)
    • setRenotifyStatuses

      public void setRenotifyStatuses(List<MonitorRenotifyStatusType> renotifyStatuses)
    • requireFullWindow

      public MonitorOptions requireFullWindow(Boolean requireFullWindow)
    • getRequireFullWindow

      @Nullable public Boolean getRequireFullWindow()
      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. This setting only applies to metric monitors.
      Returns:
      requireFullWindow
    • setRequireFullWindow

      public void setRequireFullWindow(Boolean requireFullWindow)
    • schedulingOptions

      public MonitorOptions schedulingOptions(MonitorOptionsSchedulingOptions schedulingOptions)
    • getSchedulingOptions

      @Nullable public MonitorOptionsSchedulingOptions getSchedulingOptions()
      Configuration options for scheduling.
      Returns:
      schedulingOptions
    • setSchedulingOptions

      public void setSchedulingOptions(MonitorOptionsSchedulingOptions schedulingOptions)
    • silenced

      public MonitorOptions silenced(Map<String,Long> silenced)
    • putSilencedItem

      public MonitorOptions putSilencedItem(String key, Long silencedItem)
    • getSilenced

      @Deprecated @Nullable public Map<String,Long> getSilenced()
      Deprecated.
      Information about the downtime applied to the monitor. Only shows v1 downtimes.
      Returns:
      silenced
    • setSilenced

      @Deprecated public void setSilenced(Map<String,Long> silenced)
      Deprecated.
    • syntheticsCheckId

      public MonitorOptions syntheticsCheckId(String syntheticsCheckId)
    • getSyntheticsCheckId

      @Deprecated @Nullable public String getSyntheticsCheckId()
      Deprecated.
      ID of the corresponding Synthetic check.
      Returns:
      syntheticsCheckId
    • getSyntheticsCheckId_JsonNullable

      @Deprecated public org.openapitools.jackson.nullable.JsonNullable<String> getSyntheticsCheckId_JsonNullable()
      Deprecated.
    • setSyntheticsCheckId_JsonNullable

      public void setSyntheticsCheckId_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<String> syntheticsCheckId)
    • setSyntheticsCheckId

      public void setSyntheticsCheckId(String syntheticsCheckId)
    • thresholdWindows

      public MonitorOptions thresholdWindows(MonitorThresholdWindowOptions thresholdWindows)
    • getThresholdWindows

      @Nullable public MonitorThresholdWindowOptions getThresholdWindows()
      Alerting time window options.
      Returns:
      thresholdWindows
    • setThresholdWindows

      public void setThresholdWindows(MonitorThresholdWindowOptions thresholdWindows)
    • thresholds

      public MonitorOptions thresholds(MonitorThresholds thresholds)
    • getThresholds

      @Nullable public MonitorThresholds getThresholds()
      List of the different monitor threshold available.
      Returns:
      thresholds
    • setThresholds

      public void setThresholds(MonitorThresholds thresholds)
    • timeoutH

      public MonitorOptions timeoutH(Long timeoutH)
    • getTimeoutH

      @Nullable public Long getTimeoutH()
      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.
      Returns:
      timeoutH
    • getTimeoutH_JsonNullable

      public org.openapitools.jackson.nullable.JsonNullable<Long> getTimeoutH_JsonNullable()
    • setTimeoutH_JsonNullable

      public void setTimeoutH_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> timeoutH)
    • setTimeoutH

      public void setTimeoutH(Long timeoutH)
    • variables

    • addVariablesItem

      public MonitorOptions addVariablesItem(MonitorFormulaAndFunctionQueryDefinition variablesItem)
    • getVariables

      @Nullable public List<MonitorFormulaAndFunctionQueryDefinition> getVariables()
      List of requests that can be used in the monitor query. This feature is currently in beta.
      Returns:
      variables
    • setVariables

      public void setVariables(List<MonitorFormulaAndFunctionQueryDefinition> variables)
    • putAdditionalProperty

      public MonitorOptions putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - The arbitrary key to set
      value - The associated value
      Returns:
      MonitorOptions
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      The additional properties
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - The arbitrary key to get
      Returns:
      The specific additional property for the given key
    • equals

      public boolean equals(Object o)
      Return true if this MonitorOptions object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object