- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Webhooks enable you to:
Go to the Webhooks integration tile and enter the URL and name of the webhook you want to use.
To use your webhook, add @webhook-<WEBHOOK_NAME>
in the text of the metric alert you want to trigger the webhook. It triggers a POST request to the URL you set with the following content in JSON format. The timeout for any individual request is 15 seconds. Datadog only issues a retry if there is an internal error (badly formed notification message), or if Datadog receives a 5XX response from the webhook endpoint. Missed connections are retried 5 times.
Note: Custom headers must be in JSON format.
To add your own custom fields to the request, you can also specify your own payload in the Payload field. If you want your payload to be URL-encoded, check the Encode as form checkbox and specify your payload in JSON format. Use the variables in the following section.
9bd4ac313a4d1e8fae2482df7b77628
1234
system.load.1
P1
, P2
availability-zone:us-east-1a, role:computing-node
system.load.1 over host:my-host was > 0 at least once during the last 1m
Note: To populate this variable in webhook payloads from Logs Monitor alerts, $ALERT_STATUS
must be manually added in the Webhook integration tile.[Triggered on {host:ip-012345}] Host is Down
Recovered
, Triggered
/Re-Triggered
, No Data
/Re-No Data
, Warn
/Re-Warn
, Renotify
error
, warning
, success
, info
1406662672000
@webhook-url Sending to the webhook
[Triggered] [Memory Alert]
1234567
[{"attachment_type": "postmortem", "attachment": {"documentUrl": "https://app.datadoghq.com/notebook/123","title": "Postmortem IR-1"}}]
{"customer_impacted": true, "customer_impact_duration": 300 ,"customer_impact_scope": "scope here"}
{"state": "active", "datacenter": ["eu1", "us1"]}
[{"uuid": "11a15def-eb08-52c8-84cd-714e6651829b", "integration_type": 1, "status": 2, "metadata": {"channels": [{"channel_name": "#incident-1", "channel_id": "<channel_id>", "team_id": "<team_id>", "redirect_url": "<redirect_url>"}]}}]
123
[{"uuid": "01c03111-172a-50c7-8df3-d61e64b0e74b", "content": "task description", "due_date": "2022-12-02T05:00:00+00:00", "completed": "2022-12-01T20:15:00.112207+00:00", "assignees": []}]
https://app.datadoghq.com/incidents/1
01c03111-172a-50c7-8df3-d61e64b0e74b
https://app.datadoghq.com/event/jump_to?event_id=123456
{
"columns": [
"Time",
"Host"
],
"label": "Sample Logs",
"rows": [
{
"items": [
"15:21:18 UTC",
"web"
],
"message": "[14/Feb/2023:15:21:18 +0000] \"GET / HTTP/1.1\" 200"
},
{
"items": [
"15:21:13 UTC",
"web00"
],
"message": "[14/Feb/2023:15:21:13 +0000] \"GET / HTTP/1.1\" 200"
}
]
}
11023
Datadog
normal
or low
AAAAA-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
medium
{"network":{"client":{"ip":"1.2.3.4"}}, "service": ["agent"]}
aaa-aaa-aaa
["@evt.name:authentication"]
{"@usr.name":"john.doe@your_domain.com"}
log_detection
https://p.datadoghq.com/path-to-snapshot
{
"result_id": "1871796423670117676",
"test_type": "browser",
"test_name": "Test name",
"date": "Nov 05, 2021, 09:49AM UTC",
"test_url": "https://app.datadoghq.com/synthetics/edit/apc-ki3-jwx",
"result_url": "https://app.datadoghq.com/synthetics/details/anc-ki2-jwx?resultId=1871796423670117676",
"location": "Frankfurt (AWS)",
"browser": "Chrome",
"device": "Laptop Large",
"failing_steps": [
{
"error_message": "Error: Element's content should contain given value.",
"name": "Test span #title content",
"is_critical": true,
"number": "3.1"
}
]
}
monitor, name:myService, role:computing-node
key
tag. If there is no key
tag or the key
tag has no value, this expression evaluates to an empty string.
Example: If $TAGS
includes role:computing-node
, then $TAGS[role]
evaluates to computing-node
rudy
In addition to the list of built-in variables, you can create your own custom ones in the integration tile. You can use these variables in webhook URLs, payloads, and custom headers. A common use case is storing credentials, like usernames and passwords.
You can also hide custom variable values for extra security. To hide a value, select the hide from view checkbox when you edit or add a custom variable:
If you want to post your webhooks to a service requiring authentication, you can use basic HTTP authentication by modifying your URL from https://my.service.example.com
to https://<USERNAME>:<PASSWORD>@my.service.example.com
.
If you want to post your webhooks to a service that requires OAuth 2.0 authentication, you can setup an Auth Method. An Auth Method includes all of the information required to obtain an OAuth token from your service. Once an Auth Method is configured and associated with a webhook, Datadog will handle obtaining the OAuth token, refreshing it if necessary, and adding it to the webhook request as a Bearer token.
To add an Auth Method, click the Auth Methods tab then click the New Auth Method button. Give the Auth Method a descriptive name, then enter the following information:
Click Save to create the Auth Method. To apply this Auth Method to a webhook, go back to the Configuration tab and select an existing webhook configuration and click the Edit button. The Auth Method that you created should now appear in the Auth Method select list.
In a monitor alert, if 2 or more webhook endpoints are notified, then a webhook queue is created on a per service level. For instance, if you reach out to PagerDuty and Slack, a retry on the Slack webhook does not affect the PagerDuty one.
However, in the PagerDuty scope, certain events always go before others—specifically, an “Acknowledge” payload always goes before “Resolution”. If an “Acknowledge” ping fails, the “Resolution” ping is queued due to the retry logic.
Use as URL:
https://<ACCOUNT_ID>:<AUTH_TOKEN>@api.twilio.com/2010-04-01/Accounts/<ACCOUNT_ID>/Messages.json
and as a payload:
{
"To": "+1347XXXXXXX",
"From": "+1347XXXXXX",
"Body": "$EVENT_TITLE \n Related Graph: $SNAPSHOT"
}
Replace To
with your phone number and From
with the one Twilio attributed to you. Check the Encode as form checkbox.
Use as URL:
https://<JIRA_USER_NAME>:<JIRA_PASSWORD>@<YOUR_DOMAIN>.atlassian.net/rest/api/2/issue
and as a payload:
{
"fields": {
"project": {
"key": "YOUR-PROJECT-KEY"
},
"issuetype": {
"name": "Task"
},
"description": "There's an issue. See the graph: $SNAPSHOT and event: $LINK",
"summary": "$EVENT_TITLE"
}
}
Do not check the “Encode as form” checkbox.
Event Type | Associated Monitors |
---|---|
ci_pipelines_alert | CI Pipelines |
ci_tests_alert | CI Tests |
composite_monitor | Composite |
error_tracking_alert | Error Tracking |
event_alert | Event using V1 endpoint |
event_v2_alert | Event with V2 endpoint |
log_alert | Logs |
monitor_slo_alert | Monitor based SLO |
metric_slo_alert | Metric based SLO |
outlier_monitor | Outlier |
process_alert | Process |
query_alert_monitor | Metric, Anomaly, Forecast |
rum_alert | RUM |
service_check | Host, Service Check |
synthetics_alert | Synthetics |
trace_analytics_alert | Trace Analytics |
추가 유용한 문서, 링크 및 기사: