Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8303,6 +8303,10 @@ components:
description: The name assigned to this aggregation, when multiple aggregations are defined for a query.
example: "compute_result"
type: string
source:
description: Source reference for composite query payloads.
example: "filter_query"
type: string
required:
- aggregation
type: object
Expand Down Expand Up @@ -8330,6 +8334,10 @@ components:
type: integer
sort:
$ref: "#/components/schemas/MonitorFormulaAndFunctionEventQueryGroupBySort"
source:
description: Source reference for composite query payloads.
example: "filter_query"
type: string
required:
- facet
type: object
Expand Down
2 changes: 1 addition & 1 deletion features/v1/monitors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Feature: Monitors
Scenario: Edit a monitor returns "Bad Request" response
Given new "UpdateMonitor" request
And request contains "monitor_id" parameter from "REPLACE.ME"
And body with value {"assets": [{"category": "runbook", "name": "Monitor Runbook", "resource_key": "12345", "resource_type": "notebook", "url": "/notebooks/12345"}], "draft_status": "published", "options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1, "timezone": "Europe/Paris"}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration", "name": "compute_result"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "priority": null, "restricted_roles": [], "tags": [], "type": "query alert"}
And body with value {"assets": [{"category": "runbook", "name": "Monitor Runbook", "resource_key": "12345", "resource_type": "notebook", "url": "/notebooks/12345"}], "draft_status": "published", "options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1, "timezone": "Europe/Paris"}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration", "name": "compute_result", "source": "filter_query"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}, "source": "filter_query"}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "priority": null, "restricted_roles": [], "tags": [], "type": "query alert"}
When the request is sent
Then the response status is 400 Bad Request

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class MonitorFormulaAndFunctionEventQueryDefinitionCompute
# The name assigned to this aggregation, when multiple aggregations are defined for a query.
attr_accessor :name

# Source reference for composite query payloads.
attr_accessor :source

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
Expand All @@ -42,7 +45,8 @@ def self.attribute_map
:'aggregation' => :'aggregation',
:'interval' => :'interval',
:'metric' => :'metric',
:'name' => :'name'
:'name' => :'name',
:'source' => :'source'
}
end

Expand All @@ -53,7 +57,8 @@ def self.openapi_types
:'aggregation' => :'MonitorFormulaAndFunctionEventAggregation',
:'interval' => :'Integer',
:'metric' => :'String',
:'name' => :'String'
:'name' => :'String',
:'source' => :'String'
}
end

Expand Down Expand Up @@ -90,6 +95,10 @@ def initialize(attributes = {})
if attributes.key?(:'name')
self.name = attributes[:'name']
end

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

# Check to see if the all the properties in the model are valid
Expand Down Expand Up @@ -140,14 +149,15 @@ def ==(o)
interval == o.interval &&
metric == o.metric &&
name == o.name &&
source == o.source &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[aggregation, interval, metric, name, additional_properties].hash
[aggregation, interval, metric, name, source, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class MonitorFormulaAndFunctionEventQueryGroupBy
# Options for sorting group by results.
attr_accessor :sort

# Source reference for composite query payloads.
attr_accessor :source

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
Expand All @@ -38,7 +41,8 @@ def self.attribute_map
{
:'facet' => :'facet',
:'limit' => :'limit',
:'sort' => :'sort'
:'sort' => :'sort',
:'source' => :'source'
}
end

Expand All @@ -48,7 +52,8 @@ def self.openapi_types
{
:'facet' => :'String',
:'limit' => :'Integer',
:'sort' => :'MonitorFormulaAndFunctionEventQueryGroupBySort'
:'sort' => :'MonitorFormulaAndFunctionEventQueryGroupBySort',
:'source' => :'String'
}
end

Expand Down Expand Up @@ -81,6 +86,10 @@ def initialize(attributes = {})
if attributes.key?(:'sort')
self.sort = attributes[:'sort']
end

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

# Check to see if the all the properties in the model are valid
Expand Down Expand Up @@ -130,14 +139,15 @@ def ==(o)
facet == o.facet &&
limit == o.limit &&
sort == o.sort &&
source == o.source &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[facet, limit, sort, additional_properties].hash
[facet, limit, sort, source, additional_properties].hash
end
end
end
Loading