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: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-06-08 18:39:09.160723",
"spec_repo_commit": "0df91379"
"regenerated": "2023-06-08 19:45:41.069668",
"spec_repo_commit": "f3dd285f"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-06-08 18:39:09.175916",
"spec_repo_commit": "0df91379"
"regenerated": "2023-06-08 19:45:41.082441",
"spec_repo_commit": "f3dd285f"
}
}
}
31 changes: 30 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7168,6 +7168,7 @@ components:
- ci-pipelines alert
- ci-tests alert
- error-tracking alert
- database-monitoring alert
example: query alert
type: string
x-enum-varnames:
Expand All @@ -7187,6 +7188,7 @@ components:
- CI_PIPELINES_ALERT
- CI_TESTS_ALERT
- ERROR_TRACKING_ALERT
- DATABASE_MONITORING_ALERT
MonitorUpdateRequest:
description: Object describing a monitor update request.
properties:
Expand Down Expand Up @@ -24698,6 +24700,8 @@ paths:

- error-tracking: `error-tracking alert`

- database-monitoring: `database-monitoring alert`


**Note**: Synthetic monitors are created through the Synthetics API. See the
[Synthetics API] (https://docs.datadoghq.com/api/latest/synthetics/) documentation
Expand Down Expand Up @@ -25023,7 +25027,32 @@ paths:

- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.

- `#` an integer or decimal number used to set the threshold.'
- `#` an integer or decimal number used to set the threshold.


**Database Monitoring Alert Query**


Example: `database-monitoring(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** Database Monitoring monitors are in alpha on US1.'
operationId: CreateMonitor
requestBody:
content:
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/datadog/api/client/v1/api/MonitorsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public CompletableFuture<Monitor> createMonitorAsync(Monitor body) {
* <li>event-v2: <code>event-v2 alert</code>
* <li>audit: <code>audit alert</code>
* <li>error-tracking: <code>error-tracking alert</code>
* <li>database-monitoring: <code>database-monitoring alert</code>
* </ul>
*
* <p><strong>Note</strong>: Synthetic monitors are created through the Synthetics API. See the
Expand Down Expand Up @@ -508,6 +509,26 @@ public CompletableFuture<Monitor> createMonitorAsync(Monitor body) {
* <li><code>#</code> an integer or decimal number used to set the threshold.
* </ul>
*
* <p><strong>Database Monitoring Alert Query</strong>
*
* <p>Example: <code>
* database-monitoring(query).rollup(rollup_method[, measure]).last(time_window) operator #</code>
*
* <ul>
* <li><code>query</code> The search query - following the <a
* href="https://docs.datadoghq.com/logs/search_syntax/">Log search syntax</a>.
* <li><code>rollup_method</code> The stats roll-up method - supports <code>count</code>, <code>
* avg</code>, and <code>cardinality</code>.
* <li><code>measure</code> For <code>avg</code> and cardinality <code>rollup_method</code> -
* specify the measure or the facet name you want to use.
* <li><code>time_window</code> #m (between 1 and 2880), #h (between 1 and 48).
* <li><code>operator</code> <code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, <code>
* &gt;=</code>, <code>==</code>, or <code>!=</code>.
* <li><code>#</code> an integer or decimal number used to set the threshold.
* </ul>
*
* <p><strong>NOTE</strong> Database Monitoring monitors are in alpha on US1.
*
* @param body Create a monitor request body. (required)
* @return ApiResponse&lt;Monitor&gt;
* @throws ApiException if fails to make API call
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public class MonitorType {
public static final MonitorType CI_PIPELINES_ALERT = new MonitorType("ci-pipelines alert");
public static final MonitorType CI_TESTS_ALERT = new MonitorType("ci-tests alert");
public static final MonitorType ERROR_TRACKING_ALERT = new MonitorType("error-tracking alert");
public static final MonitorType DATABASE_MONITORING_ALERT =
new MonitorType("database-monitoring alert");

private static final Set<String> allowedValues =
new HashSet<String>(
Expand All @@ -61,7 +63,8 @@ public class MonitorType {
"audit alert",
"ci-pipelines alert",
"ci-tests alert",
"error-tracking alert"));
"error-tracking alert",
"database-monitoring alert"));

private String value;

Expand Down