From 2c74aa16fe2460ee75251c930db7c9bedae2b7ad Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 4 Aug 2021 17:11:22 +0000 Subject: [PATCH] Regenerate client from commit dafdffa of spec repo --- .apigentools-info | 8 +- api/v1/datadog/api/openapi.yaml | 126 ++++++++++-------- api/v1/datadog/docs/MonitorOptions.md | 38 +++++- api/v1/datadog/model_monitor_options.go | 52 +++++++- .../api/v1/datadog/features/monitors.feature | 14 +- 5 files changed, 170 insertions(+), 68 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 1afc062a4d4..35ccd887965 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev11", - "regenerated": "2021-08-04 16:37:23.957844", - "spec_repo_commit": "c6e36ca" + "regenerated": "2021-08-04 17:10:49.076379", + "spec_repo_commit": "dafdffa" }, "v2": { "apigentools_version": "1.4.1.dev11", - "regenerated": "2021-08-04 16:37:54.999270", - "spec_repo_commit": "c6e36ca" + "regenerated": "2021-08-04 17:11:20.821526", + "spec_repo_commit": "dafdffa" } } } \ No newline at end of file diff --git a/api/v1/datadog/api/openapi.yaml b/api/v1/datadog/api/openapi.yaml index c5b6c2f47fe..d9b17006a83 100644 --- a/api/v1/datadog/api/openapi.yaml +++ b/api/v1/datadog/api/openapi.yaml @@ -15543,9 +15543,9 @@ components: deleted: 2000-01-23T04:56:07.000+00:00 name: name options: - no_data_timeframe: 2 + no_data_timeframe: 7 silenced: - key: 9 + key: 3 synthetics_check_id: synthetics_check_id notify_no_data: false enable_logs_sample: true @@ -15557,15 +15557,16 @@ components: groupby_simple_monitor: true notify_audit: false min_location_failed: 5 - new_host_delay: 5 - renotify_interval: 7 + new_host_delay: 2 + renotify_interval: 9 thresholds: - critical: 3.616076749251911 - warning: 1.2315135367772556 - warning_recovery: 1.0246457001441578 - ok: 4.145608029883936 - critical_recovery: 2.027123023002322 - unknown: 7.386281948385884 + critical: 2.027123023002322 + warning: 1.0246457001441578 + warning_recovery: 1.4894159098541704 + ok: 7.386281948385884 + critical_recovery: 4.145608029883936 + unknown: 1.2315135367772556 + new_group_delay: 5 min_failure_duration: 1055 threshold_windows: trigger_window: trigger_window @@ -15576,18 +15577,18 @@ components: - null - null escalation_message: none - timeout_h: 1 + timeout_h: 6 locked: true modified: 2000-01-23T04:56:07.000+00:00 id: 0 state: groups: key: - last_triggered_ts: 5 - last_notified_ts: 1 + last_triggered_ts: 9 + last_notified_ts: 4 name: name - last_resolved_ts: 4 - last_nodata_ts: 7 + last_resolved_ts: 5 + last_nodata_ts: 1 properties: created: description: Timestamp of the monitor creation. @@ -15766,9 +15767,9 @@ components: MonitorOptions: description: List of options associated with your monitor. example: - no_data_timeframe: 2 + no_data_timeframe: 7 silenced: - key: 9 + key: 3 synthetics_check_id: synthetics_check_id notify_no_data: false enable_logs_sample: true @@ -15780,15 +15781,16 @@ components: groupby_simple_monitor: true notify_audit: false min_location_failed: 5 - new_host_delay: 5 - renotify_interval: 7 + new_host_delay: 2 + renotify_interval: 9 thresholds: - critical: 3.616076749251911 - warning: 1.2315135367772556 - warning_recovery: 1.0246457001441578 - ok: 4.145608029883936 - critical_recovery: 2.027123023002322 - unknown: 7.386281948385884 + critical: 2.027123023002322 + warning: 1.0246457001441578 + warning_recovery: 1.4894159098541704 + ok: 7.386281948385884 + critical_recovery: 4.145608029883936 + unknown: 1.2315135367772556 + new_group_delay: 5 min_failure_duration: 1055 threshold_windows: trigger_window: trigger_window @@ -15799,7 +15801,7 @@ components: - null - null escalation_message: none - timeout_h: 1 + timeout_h: 6 locked: true properties: aggregation: @@ -15865,12 +15867,25 @@ components: format: int64 nullable: true type: integer + new_group_delay: + description: |- + 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. + format: int64 + nullable: true + type: integer new_host_delay: default: 300 + deprecated: true description: |- 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. format: int64 nullable: true type: integer @@ -16135,11 +16150,11 @@ components: example: groups: key: - last_triggered_ts: 5 - last_notified_ts: 1 + last_triggered_ts: 9 + last_notified_ts: 4 name: name - last_resolved_ts: 4 - last_nodata_ts: 7 + last_resolved_ts: 5 + last_nodata_ts: 1 properties: groups: additionalProperties: @@ -16153,11 +16168,11 @@ components: MonitorStateGroup: description: Monitor state for a single group. example: - last_triggered_ts: 5 - last_notified_ts: 1 + last_triggered_ts: 9 + last_notified_ts: 4 name: name - last_resolved_ts: 4 - last_nodata_ts: 7 + last_resolved_ts: 5 + last_nodata_ts: 1 properties: last_nodata_ts: description: Latest timestamp the monitor was in NO_DATA state. @@ -16259,12 +16274,12 @@ components: MonitorThresholds: description: List of the different monitor threshold available. example: - critical: 3.616076749251911 - warning: 1.2315135367772556 - warning_recovery: 1.0246457001441578 - ok: 4.145608029883936 - critical_recovery: 2.027123023002322 - unknown: 7.386281948385884 + critical: 2.027123023002322 + warning: 1.0246457001441578 + warning_recovery: 1.4894159098541704 + ok: 7.386281948385884 + critical_recovery: 4.145608029883936 + unknown: 1.2315135367772556 properties: critical: description: The monitor `CRITICAL` threshold. @@ -16350,9 +16365,9 @@ components: deleted: 2000-01-23T04:56:07.000+00:00 name: name options: - no_data_timeframe: 2 + no_data_timeframe: 7 silenced: - key: 9 + key: 3 synthetics_check_id: synthetics_check_id notify_no_data: false enable_logs_sample: true @@ -16364,15 +16379,16 @@ components: groupby_simple_monitor: true notify_audit: false min_location_failed: 5 - new_host_delay: 5 - renotify_interval: 7 + new_host_delay: 2 + renotify_interval: 9 thresholds: - critical: 3.616076749251911 - warning: 1.2315135367772556 - warning_recovery: 1.0246457001441578 - ok: 4.145608029883936 - critical_recovery: 2.027123023002322 - unknown: 7.386281948385884 + critical: 2.027123023002322 + warning: 1.0246457001441578 + warning_recovery: 1.4894159098541704 + ok: 7.386281948385884 + critical_recovery: 4.145608029883936 + unknown: 1.2315135367772556 + new_group_delay: 5 min_failure_duration: 1055 threshold_windows: trigger_window: trigger_window @@ -16383,18 +16399,18 @@ components: - null - null escalation_message: none - timeout_h: 1 + timeout_h: 6 locked: true modified: 2000-01-23T04:56:07.000+00:00 id: 0 state: groups: key: - last_triggered_ts: 5 - last_notified_ts: 1 + last_triggered_ts: 9 + last_notified_ts: 4 name: name - last_resolved_ts: 4 - last_nodata_ts: 7 + last_resolved_ts: 5 + last_nodata_ts: 1 properties: created: description: Timestamp of the monitor creation. diff --git a/api/v1/datadog/docs/MonitorOptions.md b/api/v1/datadog/docs/MonitorOptions.md index 36dc7b7bdc8..3b567ad7ac6 100644 --- a/api/v1/datadog/docs/MonitorOptions.md +++ b/api/v1/datadog/docs/MonitorOptions.md @@ -14,7 +14,8 @@ Name | Type | Description | Notes **Locked** | Pointer to **bool** | Whether or not the monitor is locked (only editable by creator and admins). | [optional] **MinFailureDuration** | Pointer to **NullableInt64** | How long the test should be in failure before alerting (integer, number of seconds, max 7200). | [optional] [default to 0] **MinLocationFailed** | Pointer to **NullableInt64** | 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). | [optional] [default to 1] -**NewHostDelay** | Pointer to **NullableInt64** | 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. | [optional] [default to 300] +**NewGroupDelay** | Pointer to **NullableInt64** | 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. | [optional] +**NewHostDelay** | Pointer to **NullableInt64** | 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. | [optional] [default to 300] **NoDataTimeframe** | Pointer to **NullableInt64** | The number of minutes before a monitor notifies after data stops reporting. Datadog recommends at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks. If omitted, 2x the evaluation timeframe is used for metric alerts, and 24 hours is used for service checks. | [optional] **NotifyAudit** | Pointer to **bool** | A Boolean indicating whether tagged users is notified on changes to this monitor. | [optional] [default to false] **NotifyNoData** | Pointer to **bool** | A Boolean indicating whether this monitor notifies when data stops reporting. | [optional] [default to false] @@ -325,6 +326,41 @@ HasMinLocationFailed returns a boolean if a field has been set. `func (o *MonitorOptions) UnsetMinLocationFailed()` UnsetMinLocationFailed ensures that no value is present for MinLocationFailed, not even an explicit nil +### GetNewGroupDelay + +`func (o *MonitorOptions) GetNewGroupDelay() int64` + +GetNewGroupDelay returns the NewGroupDelay field if non-nil, zero value otherwise. + +### GetNewGroupDelayOk + +`func (o *MonitorOptions) GetNewGroupDelayOk() (*int64, bool)` + +GetNewGroupDelayOk returns a tuple with the NewGroupDelay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewGroupDelay + +`func (o *MonitorOptions) SetNewGroupDelay(v int64)` + +SetNewGroupDelay sets NewGroupDelay field to given value. + +### HasNewGroupDelay + +`func (o *MonitorOptions) HasNewGroupDelay() bool` + +HasNewGroupDelay returns a boolean if a field has been set. + +### SetNewGroupDelayNil + +`func (o *MonitorOptions) SetNewGroupDelayNil(b bool)` + + SetNewGroupDelayNil sets the value for NewGroupDelay to be an explicit nil + +### UnsetNewGroupDelay +`func (o *MonitorOptions) UnsetNewGroupDelay()` + +UnsetNewGroupDelay ensures that no value is present for NewGroupDelay, not even an explicit nil ### GetNewHostDelay `func (o *MonitorOptions) GetNewHostDelay() int64` diff --git a/api/v1/datadog/model_monitor_options.go b/api/v1/datadog/model_monitor_options.go index 470fd949638..c12a0b65e6c 100644 --- a/api/v1/datadog/model_monitor_options.go +++ b/api/v1/datadog/model_monitor_options.go @@ -33,7 +33,9 @@ type MonitorOptions struct { MinFailureDuration NullableInt64 `json:"min_failure_duration,omitempty"` // 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). MinLocationFailed NullableInt64 `json:"min_location_failed,omitempty"` - // 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. + // 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. + NewGroupDelay NullableInt64 `json:"new_group_delay,omitempty"` + // 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. NewHostDelay NullableInt64 `json:"new_host_delay,omitempty"` // The number of minutes before a monitor notifies after data stops reporting. Datadog recommends at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks. If omitted, 2x the evaluation timeframe is used for metric alerts, and 24 hours is used for service checks. NoDataTimeframe NullableInt64 `json:"no_data_timeframe,omitempty"` @@ -455,6 +457,49 @@ func (o *MonitorOptions) UnsetMinLocationFailed() { o.MinLocationFailed.Unset() } +// GetNewGroupDelay returns the NewGroupDelay field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MonitorOptions) GetNewGroupDelay() int64 { + if o == nil || o.NewGroupDelay.Get() == nil { + var ret int64 + return ret + } + return *o.NewGroupDelay.Get() +} + +// GetNewGroupDelayOk returns a tuple with the NewGroupDelay field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MonitorOptions) GetNewGroupDelayOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.NewGroupDelay.Get(), o.NewGroupDelay.IsSet() +} + +// HasNewGroupDelay returns a boolean if a field has been set. +func (o *MonitorOptions) HasNewGroupDelay() bool { + if o != nil && o.NewGroupDelay.IsSet() { + return true + } + + return false +} + +// SetNewGroupDelay gets a reference to the given NullableInt64 and assigns it to the NewGroupDelay field. +func (o *MonitorOptions) SetNewGroupDelay(v int64) { + o.NewGroupDelay.Set(&v) +} + +// SetNewGroupDelayNil sets the value for NewGroupDelay to be an explicit nil +func (o *MonitorOptions) SetNewGroupDelayNil() { + o.NewGroupDelay.Set(nil) +} + +// UnsetNewGroupDelay ensures that no value is present for NewGroupDelay, not even an explicit nil +func (o *MonitorOptions) UnsetNewGroupDelay() { + o.NewGroupDelay.Unset() +} + // GetNewHostDelay returns the NewHostDelay field value if set, zero value otherwise (both if not set or set to explicit null). func (o *MonitorOptions) GetNewHostDelay() int64 { if o == nil || o.NewHostDelay.Get() == nil { @@ -897,6 +942,9 @@ func (o MonitorOptions) MarshalJSON() ([]byte, error) { if o.MinLocationFailed.IsSet() { toSerialize["min_location_failed"] = o.MinLocationFailed.Get() } + if o.NewGroupDelay.IsSet() { + toSerialize["new_group_delay"] = o.NewGroupDelay.Get() + } if o.NewHostDelay.IsSet() { toSerialize["new_host_delay"] = o.NewHostDelay.Get() } @@ -946,6 +994,7 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) { Locked *bool `json:"locked,omitempty"` MinFailureDuration NullableInt64 `json:"min_failure_duration,omitempty"` MinLocationFailed NullableInt64 `json:"min_location_failed,omitempty"` + NewGroupDelay NullableInt64 `json:"new_group_delay,omitempty"` NewHostDelay NullableInt64 `json:"new_host_delay,omitempty"` NoDataTimeframe NullableInt64 `json:"no_data_timeframe,omitempty"` NotifyAudit *bool `json:"notify_audit,omitempty"` @@ -977,6 +1026,7 @@ func (o *MonitorOptions) UnmarshalJSON(bytes []byte) (err error) { o.Locked = all.Locked o.MinFailureDuration = all.MinFailureDuration o.MinLocationFailed = all.MinLocationFailed + o.NewGroupDelay = all.NewGroupDelay o.NewHostDelay = all.NewHostDelay o.NoDataTimeframe = all.NoDataTimeframe o.NotifyAudit = all.NotifyAudit diff --git a/tests/api/v1/datadog/features/monitors.feature b/tests/api/v1/datadog/features/monitors.feature index 7fcc0d40480..c79c143b170 100644 --- a/tests/api/v1/datadog/features/monitors.feature +++ b/tests/api/v1/datadog/features/monitors.feature @@ -31,14 +31,14 @@ Feature: Monitors @generated @skip Scenario: Create a monitor returns "Bad Request" response Given new "CreateMonitor" request - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 400 Bad Request @generated @skip Scenario: Create a monitor returns "OK" response Given new "CreateMonitor" request - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 200 OK @@ -67,7 +67,7 @@ Feature: Monitors Scenario: Edit a monitor returns "Bad Request" response Given new "UpdateMonitor" request And request contains "monitor_id" parameter from "" - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 400 Bad Request @@ -75,7 +75,7 @@ Feature: Monitors Scenario: Edit a monitor returns "Monitor Not Found error" response Given new "UpdateMonitor" request And request contains "monitor_id" parameter from "" - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 404 Monitor Not Found error @@ -83,7 +83,7 @@ Feature: Monitors Scenario: Edit a monitor returns "OK" response Given new "UpdateMonitor" request And request contains "monitor_id" parameter from "" - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 200 OK @@ -144,13 +144,13 @@ Feature: Monitors @generated @skip Scenario: Validate a monitor returns "Invalid JSON" response Given new "ValidateMonitor" request - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 400 Invalid JSON @generated @skip Scenario: Validate a monitor returns "OK" response Given new "ValidateMonitor" request - And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} + And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"} When the request is sent Then the response status is 200 OK