monitor_search_results
Creates, updates, deletes, gets or lists a monitor_search_results resource.
Overview
| Name | monitor_search_results |
| Type | Resource |
| Id | datadog.monitoring.monitor_search_results |
Fields
The following fields are returned by SELECT queries:
- search_monitors
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | ID of the monitor. |
name | string | The monitor name. |
org_id | integer (int64) | The ID of the organization. |
classification | string | Classification of the monitor. |
creator | object | Object describing the creator of the shared element. |
last_triggered_ts | integer (int64) | Latest timestamp the monitor triggered. |
metrics | array | Metrics used by the monitor. |
notifications | array | The notification triggered by the monitor. |
quality_issues | array | Quality issues detected with the monitor. |
query | string | The monitor query. (example: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100) |
scopes | array | The scope(s) to which the downtime applies, for example host:app2. Provide multiple scopes as a comma-separated list, for example env:dev,env:prod. The resulting downtime applies to sources that matches ALL provided scopes (that is env:dev AND env:prod), NOT any of them. |
status | string | The different states your monitor can be in. (Alert, Ignored, No Data, OK, Skipped, Unknown, Warn) |
tags | array | Tags associated with the monitor. |
type | string | The type of the monitor. For more information about type, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. (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, data-jobs alert, llm-observability alert) (example: query alert) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_monitors | select | query, page, per_page, sort | Search and filter your monitors details. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
page | integer (int64) | Page to start paginating from. |
per_page | integer (int64) | Number of monitors to return per page. |
query | string | After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance query="type:metric status:alert". [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage/#find-the-monitors |
sort | string | String for sort order, composed of field and sort order separate by a comma, for example name,asc. Supported sort directions: asc, desc. Supported fields: * name * status * tags |
SELECT examples
- search_monitors
Search and filter your monitors details.
SELECT
id,
name,
org_id,
classification,
creator,
last_triggered_ts,
metrics,
notifications,
quality_issues,
query,
scopes,
status,
tags,
type
FROM datadog.monitoring.monitor_search_results
WHERE query = '{{ query }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND sort = '{{ sort }}'
;