diff --git a/.apigentools-info b/.apigentools-info index 477e3fdb133..fbe713873fd 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-08 18:39:07.897421", - "spec_repo_commit": "0df91379" + "regenerated": "2023-06-08 19:45:33.967915", + "spec_repo_commit": "f3dd285f" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-08 18:39:07.914115", - "spec_repo_commit": "0df91379" + "regenerated": "2023-06-08 19:45:33.984048", + "spec_repo_commit": "f3dd285f" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e65a13208dc..aadaea369e4 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -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: @@ -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: @@ -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 @@ -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: diff --git a/api/datadogV1/api_monitors.go b/api/datadogV1/api_monitors.go index 67fc8523adc..043f6187805 100644 --- a/api/datadogV1/api_monitors.go +++ b/api/datadogV1/api_monitors.go @@ -123,6 +123,7 @@ func (a *MonitorsApi) CheckCanDeleteMonitor(ctx _context.Context, monitorIds []i // - event-v2: `event-v2 alert` // - audit: `audit alert` // - 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 for more information. // @@ -282,6 +283,19 @@ func (a *MonitorsApi) CheckCanDeleteMonitor(ctx _context.Context, monitorIds []i // - `time_window` #m (between 1 and 2880), #h (between 1 and 48). // - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. // - `#` 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. func (a *MonitorsApi) CreateMonitor(ctx _context.Context, body Monitor) (Monitor, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost diff --git a/api/datadogV1/model_monitor_type.go b/api/datadogV1/model_monitor_type.go index 3e0a3306a45..887e5a3f73e 100644 --- a/api/datadogV1/model_monitor_type.go +++ b/api/datadogV1/model_monitor_type.go @@ -14,22 +14,23 @@ type MonitorType string // List of MonitorType. const ( - MONITORTYPE_COMPOSITE MonitorType = "composite" - MONITORTYPE_EVENT_ALERT MonitorType = "event alert" - MONITORTYPE_LOG_ALERT MonitorType = "log alert" - MONITORTYPE_METRIC_ALERT MonitorType = "metric alert" - MONITORTYPE_PROCESS_ALERT MonitorType = "process alert" - MONITORTYPE_QUERY_ALERT MonitorType = "query alert" - MONITORTYPE_RUM_ALERT MonitorType = "rum alert" - MONITORTYPE_SERVICE_CHECK MonitorType = "service check" - MONITORTYPE_SYNTHETICS_ALERT MonitorType = "synthetics alert" - MONITORTYPE_TRACE_ANALYTICS_ALERT MonitorType = "trace-analytics alert" - MONITORTYPE_SLO_ALERT MonitorType = "slo alert" - MONITORTYPE_EVENT_V2_ALERT MonitorType = "event-v2 alert" - MONITORTYPE_AUDIT_ALERT MonitorType = "audit alert" - MONITORTYPE_CI_PIPELINES_ALERT MonitorType = "ci-pipelines alert" - MONITORTYPE_CI_TESTS_ALERT MonitorType = "ci-tests alert" - MONITORTYPE_ERROR_TRACKING_ALERT MonitorType = "error-tracking alert" + MONITORTYPE_COMPOSITE MonitorType = "composite" + MONITORTYPE_EVENT_ALERT MonitorType = "event alert" + MONITORTYPE_LOG_ALERT MonitorType = "log alert" + MONITORTYPE_METRIC_ALERT MonitorType = "metric alert" + MONITORTYPE_PROCESS_ALERT MonitorType = "process alert" + MONITORTYPE_QUERY_ALERT MonitorType = "query alert" + MONITORTYPE_RUM_ALERT MonitorType = "rum alert" + MONITORTYPE_SERVICE_CHECK MonitorType = "service check" + MONITORTYPE_SYNTHETICS_ALERT MonitorType = "synthetics alert" + MONITORTYPE_TRACE_ANALYTICS_ALERT MonitorType = "trace-analytics alert" + MONITORTYPE_SLO_ALERT MonitorType = "slo alert" + MONITORTYPE_EVENT_V2_ALERT MonitorType = "event-v2 alert" + MONITORTYPE_AUDIT_ALERT MonitorType = "audit alert" + MONITORTYPE_CI_PIPELINES_ALERT MonitorType = "ci-pipelines alert" + MONITORTYPE_CI_TESTS_ALERT MonitorType = "ci-tests alert" + MONITORTYPE_ERROR_TRACKING_ALERT MonitorType = "error-tracking alert" + MONITORTYPE_DATABASE_MONITORING_ALERT MonitorType = "database-monitoring alert" ) var allowedMonitorTypeEnumValues = []MonitorType{ @@ -49,6 +50,7 @@ var allowedMonitorTypeEnumValues = []MonitorType{ MONITORTYPE_CI_PIPELINES_ALERT, MONITORTYPE_CI_TESTS_ALERT, MONITORTYPE_ERROR_TRACKING_ALERT, + MONITORTYPE_DATABASE_MONITORING_ALERT, } // GetAllowedValues reeturns the list of possible values.