Skip to main content

monitor_search_results

Creates, updates, deletes, gets or lists a monitor_search_results resource.

Overview

Namemonitor_search_results
TypeResource
Iddatadog.monitoring.monitor_search_results

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idinteger (int64)ID of the monitor.
namestringThe monitor name.
org_idinteger (int64)The ID of the organization.
classificationstringClassification of the monitor.
creatorobjectObject describing the creator of the shared element.
last_triggered_tsinteger (int64)Latest timestamp the monitor triggered.
metricsarrayMetrics used by the monitor.
notificationsarrayThe notification triggered by the monitor.
quality_issuesarrayQuality issues detected with the monitor.
querystringThe monitor query. (example: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100)
scopesarrayThe 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.
statusstringThe different states your monitor can be in. (Alert, Ignored, No Data, OK, Skipped, Unknown, Warn)
tagsarrayTags associated with the monitor.
typestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
search_monitorsselectquery, page, per_page, sortSearch 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.

NameDatatypeDescription
sitestringThe 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.
pageinteger (int64)Page to start paginating from.
per_pageinteger (int64)Number of monitors to return per page.
querystringAfter 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
sortstringString 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 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 }}'
;