Skip to content

Commit 464e4be

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add network performance monitor type to API spec (#2022)
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 d9a21df commit 464e4be

File tree

5 files changed

+54
-6
lines changed

5 files changed

+54
-6
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.6.6",
7-
"regenerated": "2024-07-02 14:51:00.390386",
8-
"spec_repo_commit": "1e8d5fca"
7+
"regenerated": "2024-07-02 18:17:59.207116",
8+
"spec_repo_commit": "464f0cec"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-02 14:51:00.407176",
13-
"spec_repo_commit": "1e8d5fca"
12+
"regenerated": "2024-07-02 18:17:59.224176",
13+
"spec_repo_commit": "464f0cec"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6831,6 +6831,7 @@ components:
68316831
- logs
68326832
- spans
68336833
- database_queries
6834+
- network_performance_queries
68346835
example: rum
68356836
type: string
68366837
x-enum-varnames:
@@ -6842,6 +6843,7 @@ components:
68426843
- LOGS
68436844
- SPANS
68446845
- DATABASE_QUERIES
6846+
- NETWORK_PERFORMANCE_QUERIES
68456847
MonitorFormulaAndFunctionQueryDefinition:
68466848
description: A formula and function query.
68476849
oneOf:
@@ -7665,6 +7667,7 @@ components:
76657667
- ci-tests alert
76667668
- error-tracking alert
76677669
- database-monitoring alert
7670+
- network-performance alert
76687671
example: query alert
76697672
type: string
76707673
x-enum-varnames:
@@ -7685,6 +7688,7 @@ components:
76857688
- CI_TESTS_ALERT
76867689
- ERROR_TRACKING_ALERT
76877690
- DATABASE_MONITORING_ALERT
7691+
- NETWORK_PERFORMANCE_ALERT
76887692
MonitorUpdateRequest:
76897693
description: Object describing a monitor update request.
76907694
properties:
@@ -27009,6 +27013,8 @@ paths:
2700927013

2701027014
- database-monitoring: `database-monitoring alert`
2701127015

27016+
- network-performance: `network-performance alert`
27017+
2701227018

2701327019
**Notes**:
2701427020

@@ -27308,6 +27314,28 @@ paths:
2730827314
operator #`
2730927315

2731027316

27317+
- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
27318+
27319+
- `rollup_method` The stats roll-up method - supports `count`, `avg`, and
27320+
`cardinality`.
27321+
27322+
- `measure` For `avg` and cardinality `rollup_method` - specify the measure
27323+
or the facet name you want to use.
27324+
27325+
- `time_window` #m (between 1 and 2880), #h (between 1 and 48).
27326+
27327+
- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
27328+
27329+
- `#` an integer or decimal number used to set the threshold.
27330+
27331+
27332+
**Network Performance Alert Query**
27333+
27334+
27335+
Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window)
27336+
operator #`
27337+
27338+
2731127339
- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
2731227340

2731327341
- `rollup_method` The stats roll-up method - supports `count`, `avg`, and

src/datadog_api_client/v1/api/monitors_api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ def create_monitor(
396396
* audit: ``audit alert``
397397
* error-tracking: ``error-tracking alert``
398398
* database-monitoring: ``database-monitoring alert``
399+
* network-performance: ``network-performance alert``
399400
400401
**Notes** :
401402
@@ -551,6 +552,17 @@ def create_monitor(
551552
* ``operator`` ``<`` , ``<=`` , ``>`` , ``>=`` , ``==`` , or ``!=``.
552553
* ``#`` an integer or decimal number used to set the threshold.
553554
555+
**Network Performance Alert Query**
556+
557+
Example: ``network-performance(query).rollup(rollup_method[, measure]).last(time_window) operator #``
558+
559+
* ``query`` The search query - following the `Log search syntax <https://docs.datadoghq.com/logs/search_syntax/>`_.
560+
* ``rollup_method`` The stats roll-up method - supports ``count`` , ``avg`` , and ``cardinality``.
561+
* ``measure`` For ``avg`` and cardinality ``rollup_method`` - specify the measure or the facet name you want to use.
562+
* ``time_window`` #m (between 1 and 2880), #h (between 1 and 48).
563+
* ``operator`` ``<`` , ``<=`` , ``>`` , ``>=`` , ``==`` , or ``!=``.
564+
* ``#`` an integer or decimal number used to set the threshold.
565+
554566
:param body: Create a monitor request body.
555567
:type body: Monitor
556568
:rtype: Monitor

src/datadog_api_client/v1/model/monitor_formula_and_function_events_data_source.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MonitorFormulaAndFunctionEventsDataSource(ModelSimple):
1616
"""
1717
Data source for event platform-based queries.
1818
19-
:param value: Must be one of ["rum", "ci_pipelines", "ci_tests", "audit", "events", "logs", "spans", "database_queries"].
19+
:param value: Must be one of ["rum", "ci_pipelines", "ci_tests", "audit", "events", "logs", "spans", "database_queries", "network_performance_queries"].
2020
:type value: str
2121
"""
2222

@@ -29,6 +29,7 @@ class MonitorFormulaAndFunctionEventsDataSource(ModelSimple):
2929
"logs",
3030
"spans",
3131
"database_queries",
32+
"network_performance_queries",
3233
}
3334
RUM: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
3435
CI_PIPELINES: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
@@ -38,6 +39,7 @@ class MonitorFormulaAndFunctionEventsDataSource(ModelSimple):
3839
LOGS: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
3940
SPANS: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
4041
DATABASE_QUERIES: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
42+
NETWORK_PERFORMANCE_QUERIES: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
4143

4244
@cached_property
4345
def openapi_types(_):
@@ -56,3 +58,6 @@ def openapi_types(_):
5658
MonitorFormulaAndFunctionEventsDataSource.DATABASE_QUERIES = MonitorFormulaAndFunctionEventsDataSource(
5759
"database_queries"
5860
)
61+
MonitorFormulaAndFunctionEventsDataSource.NETWORK_PERFORMANCE_QUERIES = MonitorFormulaAndFunctionEventsDataSource(
62+
"network_performance_queries"
63+
)

src/datadog_api_client/v1/model/monitor_type.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MonitorType(ModelSimple):
1616
"""
1717
The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs.
1818
19-
:param value: Must be one of ["composite", "event alert", "log alert", "metric alert", "process alert", "query alert", "rum alert", "service check", "synthetics alert", "trace-analytics alert", "slo alert", "event-v2 alert", "audit alert", "ci-pipelines alert", "ci-tests alert", "error-tracking alert", "database-monitoring alert"].
19+
:param value: Must be one of ["composite", "event alert", "log alert", "metric alert", "process alert", "query alert", "rum alert", "service check", "synthetics alert", "trace-analytics alert", "slo alert", "event-v2 alert", "audit alert", "ci-pipelines alert", "ci-tests alert", "error-tracking alert", "database-monitoring alert", "network-performance alert"].
2020
:type value: str
2121
"""
2222

@@ -38,6 +38,7 @@ class MonitorType(ModelSimple):
3838
"ci-tests alert",
3939
"error-tracking alert",
4040
"database-monitoring alert",
41+
"network-performance alert",
4142
}
4243
COMPOSITE: ClassVar["MonitorType"]
4344
EVENT_ALERT: ClassVar["MonitorType"]
@@ -56,6 +57,7 @@ class MonitorType(ModelSimple):
5657
CI_TESTS_ALERT: ClassVar["MonitorType"]
5758
ERROR_TRACKING_ALERT: ClassVar["MonitorType"]
5859
DATABASE_MONITORING_ALERT: ClassVar["MonitorType"]
60+
NETWORK_PERFORMANCE_ALERT: ClassVar["MonitorType"]
5961

6062
@cached_property
6163
def openapi_types(_):
@@ -81,3 +83,4 @@ def openapi_types(_):
8183
MonitorType.CI_TESTS_ALERT = MonitorType("ci-tests alert")
8284
MonitorType.ERROR_TRACKING_ALERT = MonitorType("error-tracking alert")
8385
MonitorType.DATABASE_MONITORING_ALERT = MonitorType("database-monitoring alert")
86+
MonitorType.NETWORK_PERFORMANCE_ALERT = MonitorType("network-performance alert")

0 commit comments

Comments
 (0)