Skip to content
Open
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
23 changes: 18 additions & 5 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7973,6 +7973,7 @@ components:
- spans
- database_queries
- network
- network_path
example: rum
type: string
x-enum-varnames:
Expand All @@ -7985,6 +7986,7 @@ components:
- SPANS
- DATABASE_QUERIES
- NETWORK
- NETWORK_PATH
MonitorFormulaAndFunctionQueryDefinition:
description: A formula and function query.
oneOf:
Expand Down Expand Up @@ -8830,6 +8832,7 @@ components:
- network-performance alert
- cost alert
- data-quality alert
- network-path alert
example: query alert
type: string
x-enum-varnames:
Expand All @@ -8853,6 +8856,7 @@ components:
- NETWORK_PERFORMANCE_ALERT
- COST_ALERT
- DATA_QUALITY_ALERT
- NETWORK_PATH_ALERT
MonitorUpdateRequest:
description: Object describing a monitor update request.
properties:
Expand Down Expand Up @@ -31643,10 +31647,11 @@ paths:
alert`\n- watchdog: `event-v2 alert`\n- event-v2: `event-v2 alert`\n- audit:
`audit alert`\n- error-tracking: `error-tracking alert`\n- database-monitoring:
`database-monitoring alert`\n- network-performance: `network-performance alert`\n-
cloud cost: `cost alert`\n\n**Notes**:\n- Synthetic monitors are created through
the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/)
documentation for more information.\n- Log monitors require an unscoped App
Key.\n\n#### Query Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags}
cloud cost: `cost alert`\n- network-path: `network-path alert`\n\n**Notes**:\n-
Synthetic monitors are created through the Synthetics API. See the [Synthetics
API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for
more information.\n- Log monitors require an unscoped App Key.\n\n#### Query
Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags}
[by {key}] operator #`\n\n- `time_aggr`: avg, sum, max, min, change, or pct_change\n-
`time_window`: `last_#m` (with `#` between 1 and 10080 depending on the monitor
type) or `last_#h`(with `#` between 1 and 168 depending on the monitor type)
Expand Down Expand Up @@ -31776,7 +31781,15 @@ paths:
\ - for `threshold` supports `<`, `<=`, `>`, `>=`, `==`, or `!=`\n -
for `change` supports `>`, `<`\n - for `anomaly` supports `>=`\n - for
`forecast` supports `>`\n- `#` an integer or decimal number used to set the
threshold."
threshold.\n\n**Network Path Alert Query**\n\nExample: `network-path(query).index(index_name).rollup(rollup_method[,
measure]).last(time_window) operator #`\n\n- `query` The search query - following
the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n-
`index_name` The data type to monitor on - supports `netpath-path` and `netpath-hop`.\n-
`rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n-
`measure` For `avg` and cardinality `rollup_method` - specify the measure
or the facet name you want to use.\n- `time_window` #m (between 1 and 2880),
#h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n-
`#` an integer or decimal number used to set the threshold."
operationId: CreateMonitor
requestBody:
content:
Expand Down
13 changes: 13 additions & 0 deletions lib/datadog_api_client/v1/api/monitors_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def create_monitor(body, opts = {})
# - database-monitoring: `database-monitoring alert`
# - network-performance: `network-performance alert`
# - cloud cost: `cost alert`
# - network-path: `network-path alert`
#
# **Notes**:
# - Synthetic monitors are created through the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information.
Expand Down Expand Up @@ -318,6 +319,18 @@ def create_monitor(body, opts = {})
# - for `forecast` supports `>`
# - `#` an integer or decimal number used to set the threshold.
#
# **Network Path Alert Query**
#
# Example: `network-path(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #`
#
# - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
# - `index_name` The data type to monitor on - supports `netpath-path` and `netpath-hop`.
# - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.
# - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
# - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
# - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
# - `#` an integer or decimal number used to set the threshold.
#
# @param body [Monitor] Create a monitor request body.
# @param opts [Hash] the optional parameters
# @return [Array<(Monitor, Integer, Hash)>] Monitor data, response status code and response headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ class MonitorFormulaAndFunctionEventsDataSource
SPANS = "spans".freeze
DATABASE_QUERIES = "database_queries".freeze
NETWORK = "network".freeze
NETWORK_PATH = "network_path".freeze
end
end
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/monitor_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ class MonitorType
NETWORK_PERFORMANCE_ALERT = "network-performance alert".freeze
COST_ALERT = "cost alert".freeze
DATA_QUALITY_ALERT = "data-quality alert".freeze
NETWORK_PATH_ALERT = "network-path alert".freeze
end
end
Loading