Skip to content

Commit 8e6877c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit d18c63f of spec repo (#495)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 227ccfc commit 8e6877c

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.1.dev8",
7-
"regenerated": "2021-06-25 16:37:15.458476",
8-
"spec_repo_commit": "30e3ae0"
7+
"regenerated": "2021-06-26 08:38:25.181926",
8+
"spec_repo_commit": "d18c63f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-06-25 16:37:42.642039",
13-
"spec_repo_commit": "30e3ae0"
12+
"regenerated": "2021-06-26 08:38:47.452453",
13+
"spec_repo_commit": "d18c63f"
1414
}
1515
}
1616
}

docs/v1/MonitorsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Example: `events(query).rollup(rollup_method[, measure]).last(time_window) opera
170170
- **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
171171
- **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`.
172172
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
173-
- **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24).
173+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
174174
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
175175
- **`#`** an integer or decimal number used to set the threshold.
176176

@@ -195,7 +195,7 @@ Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(ti
195195
- **`index_name`** For multi-index organizations, the log index in which the request is performed.
196196
- **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`.
197197
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
198-
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48)
198+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
199199
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
200200
- **`#`** an integer or decimal number used to set the threshold.
201201

src/datadog_api_client/v1/api/monitors_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def check_can_delete_monitor(self, monitor_ids, **kwargs):
505505
def create_monitor(self, body, **kwargs):
506506
"""Create a monitor # noqa: E501
507507
508-
Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - SLO: `slo alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).by(group).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")`; **`over`** cannot be blank. - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be at least 3. - **`group`** must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. For example, Postgres integration monitors are tagged by `db`, `host`, and `port`, and Network monitors by `host`, `instance`, and `url`. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation for more information. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`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 (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(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`** For multi-index organizations, the log index in which the request is performed. - **`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. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI. **SLO Alert Query** Example: `error_budget(\"slo_id\").over(\"time_window\") operator #` - **`slo_id`**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **`time_window`**: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. - **`operator`**: `>=` or `>` # noqa: E501
508+
Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - SLO: `slo alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).by(group).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")`; **`over`** cannot be blank. - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be at least 3. - **`group`** must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. For example, Postgres integration monitors are tagged by `db`, `host`, and `port`, and Network monitors by `host`, `instance`, and `url`. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation for more information. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`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. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(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`** For multi-index organizations, the log index in which the request is performed. - **`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. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI. **SLO Alert Query** Example: `error_budget(\"slo_id\").over(\"time_window\") operator #` - **`slo_id`**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **`time_window`**: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. - **`operator`**: `>=` or `>` # noqa: E501
509509
This method makes a synchronous HTTP request by default. To make an
510510
asynchronous HTTP request, please pass async_req=True
511511

src/datadog_api_client/v1/openapi.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17420,7 +17420,7 @@ paths:
1742017420
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure
1742117421
or the facet name you want to use.
1742217422

17423-
- **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24).
17423+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
1742417424

1742517425
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
1742617426

@@ -17470,7 +17470,7 @@ paths:
1747017470
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure
1747117471
or the facet name you want to use.
1747217472

17473-
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48)
17473+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
1747417474

1747517475
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
1747617476

@@ -22752,11 +22752,12 @@ tags:
2275222752
\ permission."
2275322753
name: Metrics
2275422754
- description: '[Monitors](https://docs.datadoghq.com/monitors) allow you to watch
22755-
a metric or check that you care about,
22755+
a metric or check that you care about and
2275622756

22757-
notifying your team when some defined threshold is exceeded.
22757+
notifies your team when a defined threshold has exceeded.
2275822758

22759-
Refer to the Creating Monitors page for more information on creating monitors.'
22759+
22760+
For more information, see [Creating Monitors](https://docs.datadoghq.com/monitors/monitor_types/).'
2276022761
externalDocs:
2276122762
description: Find out more at
2276222763
url: https://docs.datadoghq.com/monitors/monitor_types/

tests/v1/features/monitors.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@endpoint(monitors) @endpoint(monitors-v1)
22
Feature: Monitors
33
[Monitors](https://docs.datadoghq.com/monitors) allow you to watch a
4-
metric or check that you care about, notifying your team when some defined
5-
threshold is exceeded. Refer to the Creating Monitors page for more
6-
information on creating monitors.
4+
metric or check that you care about and notifies your team when a defined
5+
threshold has exceeded. For more information, see [Creating
6+
Monitors](https://docs.datadoghq.com/monitors/monitor_types/).
77

88
Background:
99
Given a valid "apiKeyAuth" key in the system

0 commit comments

Comments
 (0)