For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/monitors/get-all-monitors.md. A documentation index is available at /llms.txt.
Language
Datadog site

모든 모니터 가져오기

GEThttps://api.datadoghq.com/api/v1/monitorhttps://api.us3.datadoghq.com/api/v1/monitorhttps://api.us5.datadoghq.com/api/v1/monitorhttps://api.datadoghq.eu/api/v1/monitorhttps://api.ap1.datadoghq.com/api/v1/monitorhttps://api.ap2.datadoghq.com/api/v1/monitorhttps://api.uk1.datadoghq.com/api/v1/monitorhttps://api.ddog-gov.com/api/v1/monitorhttps://api.us2.ddog-gov.com/api/v1/monitor

개요

조직의 모든 모니터 목록을 가져옵니다.

This endpoint requires the monitors_read permission.

OAuth apps require the monitors_read authorization scope to access this endpoint.

인수

쿼리 문자열

이름
유형
설명
group_states
string

When specified, shows additional information about the group states. Choose one or more from all, alert, warn, and no data.

name
string

A string to filter monitors by name.

tags
string

A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. For example, host:host0.

monitor_tags
string

A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors. Tags created in the Datadog UI automatically have the service key prepended. For example, service:my-app.

with_downtimes
boolean

If this argument is set to true, then the returned data includes all current active downtimes for each monitor.

id_offset
integer

Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty.

page
integer

The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination.

page_size
integer

The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a page_size limit. However, if page is specified and page_size is not, the argument defaults to 100.

Default: 100

응답

OK

An array of monitor objects.

항목
유형
설명
assets
[object]

The list of monitor assets tied to a monitor, which represents key links for users to take action on monitor alerts (for example, runbooks).

created
date-time

Timestamp of the monitor creation.

creator
object

Object describing the creator of the shared element.

deleted
date-time

Whether or not the monitor is deleted. (Always null)

draft_status
enum

Indicates whether the monitor is in a draft or published state.

draft: The monitor appears as Draft and does not send notifications. published: The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.

Default: published
Allowed enum values: draft, published
id
int64

ID of this monitor.

matching_downtimes
[object]

A list of active v1 downtimes that match this monitor.

message
string

A message to include with notifications for this monitor.

modified
date-time

Last timestamp when the monitor was edited.

multi
boolean

Whether or not the monitor is broken down on different groups.

name
string

The monitor name.

options
object

List of options associated with your monitor.

overall_state
enum

The different states your monitor can be in.

Allowed enum values: Alert, Ignored, No Data, OK, Skipped, Unknown, Warn
priority
int64

Integer from 1 (high) to 5 (low) indicating alert severity.

query [required]
string

The monitor query.

restricted_roles
[string]

A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the Roles API and are located in the data.id field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. You can use the Restriction Policies API to manage write authorization for individual monitors by teams and users, in addition to roles.

state
object

Wrapper object with the different monitor states.

tags
[string]

Tags associated to your monitor.

type [required]
enum

The type of the monitor. For more information about type, see the monitor options docs.

Allowed enum values: composite, event alert, log alert, metric alert, process alert, query alert, rum alert, service check, synthetics alert, trace-analytics alert
Show 13 moreslo 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

코드 예시

모든 모니터 가져오기
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/monitor" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"