Skip to content

Commit a0c7581

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Network Path Monitors to API Docs (#3604)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent ae39a89 commit a0c7581

4 files changed

Lines changed: 35 additions & 5 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7993,6 +7993,7 @@ components:
79937993
- spans
79947994
- database_queries
79957995
- network
7996+
- network_path
79967997
example: rum
79977998
type: string
79987999
x-enum-varnames:
@@ -8005,6 +8006,7 @@ components:
80058006
- SPANS
80068007
- DATABASE_QUERIES
80078008
- NETWORK
8009+
- NETWORK_PATH
80088010
MonitorFormulaAndFunctionQueryDefinition:
80098011
description: A formula and function query.
80108012
oneOf:
@@ -8850,6 +8852,7 @@ components:
88508852
- network-performance alert
88518853
- cost alert
88528854
- data-quality alert
8855+
- network-path alert
88538856
example: query alert
88548857
type: string
88558858
x-enum-varnames:
@@ -8873,6 +8876,7 @@ components:
88738876
- NETWORK_PERFORMANCE_ALERT
88748877
- COST_ALERT
88758878
- DATA_QUALITY_ALERT
8879+
- NETWORK_PATH_ALERT
88768880
MonitorUpdateRequest:
88778881
description: Object describing a monitor update request.
88788882
properties:
@@ -31680,10 +31684,11 @@ paths:
3168031684
alert`\n- watchdog: `event-v2 alert`\n- event-v2: `event-v2 alert`\n- audit:
3168131685
`audit alert`\n- error-tracking: `error-tracking alert`\n- database-monitoring:
3168231686
`database-monitoring alert`\n- network-performance: `network-performance alert`\n-
31683-
cloud cost: `cost alert`\n\n**Notes**:\n- Synthetic monitors are created through
31684-
the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/)
31685-
documentation for more information.\n- Log monitors require an unscoped App
31686-
Key.\n\n#### Query Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags}
31687+
cloud cost: `cost alert`\n- network-path: `network-path alert`\n\n**Notes**:\n-
31688+
Synthetic monitors are created through the Synthetics API. See the [Synthetics
31689+
API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for
31690+
more information.\n- Log monitors require an unscoped App Key.\n\n#### Query
31691+
Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags}
3168731692
[by {key}] operator #`\n\n- `time_aggr`: avg, sum, max, min, change, or pct_change\n-
3168831693
`time_window`: `last_#m` (with `#` between 1 and 10080 depending on the monitor
3168931694
type) or `last_#h`(with `#` between 1 and 168 depending on the monitor type)
@@ -31813,7 +31818,15 @@ paths:
3181331818
\ - for `threshold` supports `<`, `<=`, `>`, `>=`, `==`, or `!=`\n -
3181431819
for `change` supports `>`, `<`\n - for `anomaly` supports `>=`\n - for
3181531820
`forecast` supports `>`\n- `#` an integer or decimal number used to set the
31816-
threshold."
31821+
threshold.\n\n**Network Path Alert Query**\n\nExample: `network-path(query).index(index_name).rollup(rollup_method[,
31822+
measure]).last(time_window) operator #`\n\n- `query` The search query - following
31823+
the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n-
31824+
`index_name` The data type to monitor on - supports `netpath-path` and `netpath-hop`.\n-
31825+
`rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n-
31826+
`measure` For `avg` and cardinality `rollup_method` - specify the measure
31827+
or the facet name you want to use.\n- `time_window` #m (between 1 and 2880),
31828+
#h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n-
31829+
`#` an integer or decimal number used to set the threshold."
3181731830
operationId: CreateMonitor
3181831831
requestBody:
3181931832
content:

api/datadogV1/api_monitors.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (a *MonitorsApi) CheckCanDeleteMonitor(ctx _context.Context, monitorIds []i
131131
// - database-monitoring: `database-monitoring alert`
132132
// - network-performance: `network-performance alert`
133133
// - cloud cost: `cost alert`
134+
// - network-path: `network-path alert`
134135
//
135136
// **Notes**:
136137
// - Synthetic monitors are created through the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information.
@@ -324,6 +325,18 @@ func (a *MonitorsApi) CheckCanDeleteMonitor(ctx _context.Context, monitorIds []i
324325
// - for `forecast` supports `>`
325326
//
326327
// - `#` an integer or decimal number used to set the threshold.
328+
//
329+
// **Network Path Alert Query**
330+
//
331+
// Example: `network-path(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #`
332+
//
333+
// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
334+
// - `index_name` The data type to monitor on - supports `netpath-path` and `netpath-hop`.
335+
// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.
336+
// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
337+
// - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
338+
// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
339+
// - `#` an integer or decimal number used to set the threshold.
327340
func (a *MonitorsApi) CreateMonitor(ctx _context.Context, body Monitor) (Monitor, *_nethttp.Response, error) {
328341
var (
329342
localVarHTTPMethod = _nethttp.MethodPost

api/datadogV1/model_monitor_formula_and_function_events_data_source.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const (
2424
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_SPANS MonitorFormulaAndFunctionEventsDataSource = "spans"
2525
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_DATABASE_QUERIES MonitorFormulaAndFunctionEventsDataSource = "database_queries"
2626
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_NETWORK MonitorFormulaAndFunctionEventsDataSource = "network"
27+
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_NETWORK_PATH MonitorFormulaAndFunctionEventsDataSource = "network_path"
2728
)
2829

2930
var allowedMonitorFormulaAndFunctionEventsDataSourceEnumValues = []MonitorFormulaAndFunctionEventsDataSource{
@@ -36,6 +37,7 @@ var allowedMonitorFormulaAndFunctionEventsDataSourceEnumValues = []MonitorFormul
3637
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_SPANS,
3738
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_DATABASE_QUERIES,
3839
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_NETWORK,
40+
MONITORFORMULAANDFUNCTIONEVENTSDATASOURCE_NETWORK_PATH,
3941
}
4042

4143
// GetAllowedValues reeturns the list of possible values.

api/datadogV1/model_monitor_type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const (
3535
MONITORTYPE_NETWORK_PERFORMANCE_ALERT MonitorType = "network-performance alert"
3636
MONITORTYPE_COST_ALERT MonitorType = "cost alert"
3737
MONITORTYPE_DATA_QUALITY_ALERT MonitorType = "data-quality alert"
38+
MONITORTYPE_NETWORK_PATH_ALERT MonitorType = "network-path alert"
3839
)
3940

4041
var allowedMonitorTypeEnumValues = []MonitorType{
@@ -58,6 +59,7 @@ var allowedMonitorTypeEnumValues = []MonitorType{
5859
MONITORTYPE_NETWORK_PERFORMANCE_ALERT,
5960
MONITORTYPE_COST_ALERT,
6061
MONITORTYPE_DATA_QUALITY_ALERT,
62+
MONITORTYPE_NETWORK_PATH_ALERT,
6163
}
6264

6365
// GetAllowedValues reeturns the list of possible values.

0 commit comments

Comments
 (0)