Skip to content
Open
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
23 changes: 18 additions & 5 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7973,6 +7973,7 @@ components:
- spans
- database_queries
- network
- network_path
example: rum
type: string
x-enum-varnames:
Expand All @@ -7985,6 +7986,7 @@ components:
- SPANS
- DATABASE_QUERIES
- NETWORK
- NETWORK_PATH
MonitorFormulaAndFunctionQueryDefinition:
description: A formula and function query.
oneOf:
Expand Down Expand Up @@ -8830,6 +8832,7 @@ components:
- network-performance alert
- cost alert
- data-quality alert
- network-path alert
example: query alert
type: string
x-enum-varnames:
Expand All @@ -8853,6 +8856,7 @@ components:
- NETWORK_PERFORMANCE_ALERT
- COST_ALERT
- DATA_QUALITY_ALERT
- NETWORK_PATH_ALERT
MonitorUpdateRequest:
description: Object describing a monitor update request.
properties:
Expand Down Expand Up @@ -31643,10 +31647,11 @@ paths:
alert`\n- watchdog: `event-v2 alert`\n- event-v2: `event-v2 alert`\n- audit:
`audit alert`\n- error-tracking: `error-tracking alert`\n- database-monitoring:
`database-monitoring alert`\n- network-performance: `network-performance alert`\n-
cloud cost: `cost alert`\n\n**Notes**:\n- Synthetic monitors are created through
the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/)
documentation for more information.\n- Log monitors require an unscoped App
Key.\n\n#### Query Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags}
cloud cost: `cost alert`\n- network-path: `network-path alert`\n\n**Notes**:\n-
Synthetic monitors are created through the Synthetics API. See the [Synthetics
API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for
more information.\n- Log monitors require an unscoped App Key.\n\n#### Query
Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags}
[by {key}] operator #`\n\n- `time_aggr`: avg, sum, max, min, change, or pct_change\n-
`time_window`: `last_#m` (with `#` between 1 and 10080 depending on the monitor
type) or `last_#h`(with `#` between 1 and 168 depending on the monitor type)
Expand Down Expand Up @@ -31776,7 +31781,15 @@ paths:
\ - for `threshold` supports `<`, `<=`, `>`, `>=`, `==`, or `!=`\n -
for `change` supports `>`, `<`\n - for `anomaly` supports `>=`\n - for
`forecast` supports `>`\n- `#` an integer or decimal number used to set the
threshold."
threshold.\n\n**Network Path Alert Query**\n\nExample: `network-path(query).index(index_name).rollup(rollup_method[,
measure]).last(time_window) operator #`\n\n- `query` The search query - following
the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n-
`index_name` The data type to monitor on - supports `netpath-path` and `netpath-hop`.\n-
`rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n-
`measure` For `avg` and cardinality `rollup_method` - specify the measure
or the facet name you want to use.\n- `time_window` #m (between 1 and 2880),
#h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n-
`#` an integer or decimal number used to set the threshold."
operationId: CreateMonitor
requestBody:
content:
Expand Down
13 changes: 13 additions & 0 deletions src/datadog_api_client/v1/api/monitors_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ def create_monitor(
* database-monitoring: ``database-monitoring alert``
* network-performance: ``network-performance alert``
* cloud cost: ``cost alert``
* network-path: ``network-path alert``

**Notes** :

Expand Down Expand Up @@ -606,6 +607,18 @@ def create_monitor(

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

**Network Path Alert Query**

Example: ``network-path(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #``

* ``query`` The search query - following the `Log search syntax <https://docs.datadoghq.com/logs/search_syntax/>`_.
* ``index_name`` The data type to monitor on - supports ``netpath-path`` and ``netpath-hop``.
* ``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.

:param body: Create a monitor request body.
:type body: Monitor
:rtype: Monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MonitorFormulaAndFunctionEventsDataSource(ModelSimple):
"""
Data source for event platform-based queries.

:param value: Must be one of ["rum", "ci_pipelines", "ci_tests", "audit", "events", "logs", "spans", "database_queries", "network"].
:param value: Must be one of ["rum", "ci_pipelines", "ci_tests", "audit", "events", "logs", "spans", "database_queries", "network", "network_path"].
:type value: str
"""

Expand All @@ -30,6 +30,7 @@ class MonitorFormulaAndFunctionEventsDataSource(ModelSimple):
"spans",
"database_queries",
"network",
"network_path",
}
RUM: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
CI_PIPELINES: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
Expand All @@ -40,6 +41,7 @@ class MonitorFormulaAndFunctionEventsDataSource(ModelSimple):
SPANS: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
DATABASE_QUERIES: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
NETWORK: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]
NETWORK_PATH: ClassVar["MonitorFormulaAndFunctionEventsDataSource"]

@cached_property
def openapi_types(_):
Expand All @@ -59,3 +61,4 @@ def openapi_types(_):
"database_queries"
)
MonitorFormulaAndFunctionEventsDataSource.NETWORK = MonitorFormulaAndFunctionEventsDataSource("network")
MonitorFormulaAndFunctionEventsDataSource.NETWORK_PATH = MonitorFormulaAndFunctionEventsDataSource("network_path")
5 changes: 4 additions & 1 deletion src/datadog_api_client/v1/model/monitor_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MonitorType(ModelSimple):
"""
The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs.

: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", "cost alert", "data-quality alert"].
: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", "cost alert", "data-quality alert", "network-path alert"].
:type value: str
"""

Expand All @@ -41,6 +41,7 @@ class MonitorType(ModelSimple):
"network-performance alert",
"cost alert",
"data-quality alert",
"network-path alert",
}
COMPOSITE: ClassVar["MonitorType"]
EVENT_ALERT: ClassVar["MonitorType"]
Expand All @@ -62,6 +63,7 @@ class MonitorType(ModelSimple):
NETWORK_PERFORMANCE_ALERT: ClassVar["MonitorType"]
COST_ALERT: ClassVar["MonitorType"]
DATA_QUALITY_ALERT: ClassVar["MonitorType"]
NETWORK_PATH_ALERT: ClassVar["MonitorType"]

@cached_property
def openapi_types(_):
Expand Down Expand Up @@ -90,3 +92,4 @@ def openapi_types(_):
MonitorType.NETWORK_PERFORMANCE_ALERT = MonitorType("network-performance alert")
MonitorType.COST_ALERT = MonitorType("cost alert")
MonitorType.DATA_QUALITY_ALERT = MonitorType("data-quality alert")
MonitorType.NETWORK_PATH_ALERT = MonitorType("network-path alert")
Loading