Skip to content

Commit 57bdfb3

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

File tree

5 files changed

+62
-4
lines changed

5 files changed

+62
-4
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:50:56.429366",
8-
"spec_repo_commit": "1e8d5fca"
7+
"regenerated": "2024-07-02 18:17:53.184204",
8+
"spec_repo_commit": "464f0cec"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-02 14:50:56.479402",
13-
"spec_repo_commit": "1e8d5fca"
12+
"regenerated": "2024-07-02 18:17:53.201791",
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/datadogV1/api/api_monitors.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ impl MonitorsAPI {
535535
/// - audit: `audit alert`
536536
/// - error-tracking: `error-tracking alert`
537537
/// - database-monitoring: `database-monitoring alert`
538+
/// - network-performance: `network-performance alert`
538539
///
539540
/// **Notes**:
540541
/// - Synthetic monitors are created through the Synthetics API. See the [Synthetics API](<https://docs.datadoghq.com/api/latest/synthetics/>) documentation for more information.
@@ -688,6 +689,17 @@ impl MonitorsAPI {
688689
/// - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
689690
/// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
690691
/// - `#` an integer or decimal number used to set the threshold.
692+
///
693+
/// **Network Performance Alert Query**
694+
///
695+
/// Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window) operator #`
696+
///
697+
/// - `query` The search query - following the [Log search syntax](<https://docs.datadoghq.com/logs/search_syntax/>).
698+
/// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.
699+
/// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
700+
/// - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
701+
/// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
702+
/// - `#` an integer or decimal number used to set the threshold.
691703
pub async fn create_monitor(
692704
&self,
693705
body: crate::datadogV1::model::Monitor,
@@ -733,6 +745,7 @@ impl MonitorsAPI {
733745
/// - audit: `audit alert`
734746
/// - error-tracking: `error-tracking alert`
735747
/// - database-monitoring: `database-monitoring alert`
748+
/// - network-performance: `network-performance alert`
736749
///
737750
/// **Notes**:
738751
/// - Synthetic monitors are created through the Synthetics API. See the [Synthetics API](<https://docs.datadoghq.com/api/latest/synthetics/>) documentation for more information.
@@ -886,6 +899,17 @@ impl MonitorsAPI {
886899
/// - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
887900
/// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
888901
/// - `#` an integer or decimal number used to set the threshold.
902+
///
903+
/// **Network Performance Alert Query**
904+
///
905+
/// Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window) operator #`
906+
///
907+
/// - `query` The search query - following the [Log search syntax](<https://docs.datadoghq.com/logs/search_syntax/>).
908+
/// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.
909+
/// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
910+
/// - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
911+
/// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
912+
/// - `#` an integer or decimal number used to set the threshold.
889913
pub async fn create_monitor_with_http_info(
890914
&self,
891915
body: crate::datadogV1::model::Monitor,

src/datadogV1/model/model_monitor_formula_and_function_events_data_source.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub enum MonitorFormulaAndFunctionEventsDataSource {
1515
LOGS,
1616
SPANS,
1717
DATABASE_QUERIES,
18+
NETWORK_PERFORMANCE_QUERIES,
1819
UnparsedObject(crate::datadog::UnparsedObject),
1920
}
2021

@@ -29,6 +30,7 @@ impl ToString for MonitorFormulaAndFunctionEventsDataSource {
2930
Self::LOGS => String::from("logs"),
3031
Self::SPANS => String::from("spans"),
3132
Self::DATABASE_QUERIES => String::from("database_queries"),
33+
Self::NETWORK_PERFORMANCE_QUERIES => String::from("network_performance_queries"),
3234
Self::UnparsedObject(v) => v.value.to_string(),
3335
}
3436
}
@@ -61,6 +63,7 @@ impl<'de> Deserialize<'de> for MonitorFormulaAndFunctionEventsDataSource {
6163
"logs" => Self::LOGS,
6264
"spans" => Self::SPANS,
6365
"database_queries" => Self::DATABASE_QUERIES,
66+
"network_performance_queries" => Self::NETWORK_PERFORMANCE_QUERIES,
6467
_ => Self::UnparsedObject(crate::datadog::UnparsedObject {
6568
value: serde_json::Value::String(s.into()),
6669
}),

src/datadogV1/model/model_monitor_type.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub enum MonitorType {
2424
CI_TESTS_ALERT,
2525
ERROR_TRACKING_ALERT,
2626
DATABASE_MONITORING_ALERT,
27+
NETWORK_PERFORMANCE_ALERT,
2728
UnparsedObject(crate::datadog::UnparsedObject),
2829
}
2930

@@ -47,6 +48,7 @@ impl ToString for MonitorType {
4748
Self::CI_TESTS_ALERT => String::from("ci-tests alert"),
4849
Self::ERROR_TRACKING_ALERT => String::from("error-tracking alert"),
4950
Self::DATABASE_MONITORING_ALERT => String::from("database-monitoring alert"),
51+
Self::NETWORK_PERFORMANCE_ALERT => String::from("network-performance alert"),
5052
Self::UnparsedObject(v) => v.value.to_string(),
5153
}
5254
}
@@ -88,6 +90,7 @@ impl<'de> Deserialize<'de> for MonitorType {
8890
"ci-tests alert" => Self::CI_TESTS_ALERT,
8991
"error-tracking alert" => Self::ERROR_TRACKING_ALERT,
9092
"database-monitoring alert" => Self::DATABASE_MONITORING_ALERT,
93+
"network-performance alert" => Self::NETWORK_PERFORMANCE_ALERT,
9194
_ => Self::UnparsedObject(crate::datadog::UnparsedObject {
9295
value: serde_json::Value::String(s.into()),
9396
}),

0 commit comments

Comments
 (0)