Webhook 알림 채널
웹훅을 사용하여 알림 전송 방법에 대해 알아보세요.
웹훅을 사용하여 알림을 보내려면 일반 웹훅 알림 채널 을 생성하세요.
웹훅 알림 채널 생성하기
일반 웹훅 알림 채널을 생성하려면, Instana UI에서 [설정] > [전역 설정 ] > [이벤트 및 알림 ] > [알림 채널 ] > [알림 채널 추가] 를 클릭하세요.

Webhook ( URL ) 형식은 protocol://domainOrIPAddress:port/path
경고 예시
다음과 같은 Webhook 이벤트는 구성된 URL( HTTP 또는 HTTPS )로 POSTHTTP 형식으로 수신됩니다:
미해결 문제 또는 사고에 대하여
{
"issue": {
"id": "53650436-8e35-49a3-a610-56b442ae7620",
"type": "issue",
"state": "OPEN",
"start": 1460537793322,
"severity": 5,
"text": "Garbage Collection Activity High (11%)",
"suggestion": "Tune your Garbage Collector, reduce allocation rate through code changes",
"link": "https://XXXXXXX/#/?snapshotId=rjhkZXdNzegliVVEswMScGNn0YY",
"zone": "prod",
"fqdn": "host1.demo.com",
"entity": "jvm",
"entityLabel": "Test jvm",
"tags": "production, documents, elasticsearch",
"container": "test-container"
}
}
민감한 사안이나 사건에 대하여
{
"issue": {
"id": "53650436-8e35-49a3-a610-56b442ae7620",
"type": "issue",
"state": "CLOSED",
"start": 1460537793322,
"end": 1460538393322,
"severity": 5,
"text": "Garbage Collection Activity High (11%)",
"suggestion": "Tune your Garbage Collector, reduce allocation rate through code changes",
"link": "https://XXXXXXX/#/?snapshotId=rjhkZXdNzegliVVEswMScGNn0YY",
"zone": "prod",
"fqdn": "host1.demo.com",
"entity": "jvm",
"entityLabel": "Test jvm",
"tags": "production, documents, elasticsearch",
"container": "test-container"
}
}
변경 이벤트 발생 시
{
"issue": {
"id": "G9KRvijARFw6vffuygCvl_Fyg",
"type": "change",
"start": 1743798954000,
"text": "Change detected",
"description": "The value has changed from X to Y.\n",
"link": "https://X/#/events;eventId=G9KRvijARFw6vffuygCvl_Fyg?&snapshotId=mTraati8sdfl0H5qrEagmIRIBYoM4",
"end": 1743798954000,
"zone": "prod",
"fqdn": "something.com",
"entity": "Kubernetes Pod",
"entityLabel": "Test",
"tags": "docs",
"container": "b-container"
}
}
}
오프라인 및 온라인 행사
{
"issue": {
"id": "53650436-8e35-49a3-a610-56b442ae7620",
"type": "presence",
"start": 1460537793322,
"text": "online",
"description": "Java virtual machine on Host host1.demo.com",
"link": "https://XXXXXXX/#/?snapshotId=rjhkZXdNzegliVVEswMScGNn0YY",
"zone": "prod",
"fqdn": "host1.demo.com",
"entity": "jvm",
"entityLabel": "Test jvm",
"tags": "production, documents, elasticsearch",
"container": "test-container"
}
}
에이전트 모니터링 이벤트에 관하여
{
"issue": {
"id": "ah7cCh99TjGqnZJ4UL-uZHA",
"type": "monitoringIssue",
"state": "OPEN",
"start": 1743798151988,
"severity": 5,
"text": "Monitoring issue: nodejs_collector_not_installed",
"suggestion": "Our Agent observed a problem with monitoring the linked process.",
"link": "https://XX/#/events;eventId=ah7cCh99TjGqnZJ4UL-uZHA?&snapshotId=UhgAKBptVGeu04DsagNGU",
"zone": "ava",
"fqdn": "cool.fyre.ibm.com",
"entity": "Process",
"entityLabel": "node (7532267)",
"tags": "proc",
"container": "c-container"
}
}
OAuth 2.0 승인
OAuth ( 2.0 ) 인증이 필요한 서비스와 웹훅 전송을 연동하려면, Instana 내에서 웹훅 알림 채널에 대한 OAuth 프로필을 구성할 수 있습니다. 웹훅 채널을 설정하고 ‘ OAuth ’ 기능을 활성화하면, Instana 에서 액세스 토큰의 수명 주기를 자동으로 관리합니다. 즉, 토큰 획득 및 갱신 작업을 처리하고, 아웃바운드 요청에 토큰을 Bearer 토큰으로 안전하게 추가합니다.
OAuth 구성
웹훅 채널에 대해 OAuth 을 구성하려면 다음 단계를 따르세요:
- Go Instana UI에서 [설정 ] > [전체 설정 ] > [이벤트 및 알림 ] > [알림 채널 ] > [알림 채널 추가] 로 이동합니다.
- 웹훅 채널에 대한 ‘ OAuth ’ 지원을 활성화하려면 ‘ OAuth ’ 설정을 ‘On’으로 설정하세요.
- OAuth 인증 정보를 입력하세요:
- 클라이언트 ID: 인증 서버에서 발급하는 애플리케이션의 공개 식별자입니다.
- 클라이언트 시크릿: 애플리케이션과 인증 서버만이 알고 있는 기밀 키입니다.
- 액세스 토큰 URL : 애플리케이션이 클라이언트 자격 증명을 액세스 토큰으로 교환하기 위해 요청을 보내는 엔드포인트입니다.
- 수신자(선택 사항): 액세스 토큰의 수신 대상을 지정하며, 일반적으로 리소스 서버의 식별자(예: API 엔드포인트)입니다. 일부 OAuth 워크플로에서 특정 리소스에 대한 토큰의 유효성을 확인하는 데 사용됩니다.
- 범위(선택 사항): 클라이언트가 요청하는 권한 또는 액세스 수준을 정의합니다(예: "읽기", "쓰기").
HTTP 요청 헤더
HTTP 요청 헤더 사용자 정의 제공
일부 Webhook 연동 기능은 이 섹션에서 추가할 수 있는 헤더를 지정해야 합니다. 예를 들어, AWS API Gateway 에 API 토큰이 추가된 경우가 있습니다.
Webhook URL 기본 인증
각 AuthorizationHTTP 요청 헤더를 수동으로 설정하는 대신, 웹훅 URL 을 통해 HTTP 기본 인증을 사용할 수 있습니다. 호스트명 앞에 및 password 을 username 붙여(예: https://username:password@webhookurl.com ) 인증 정보가 자동으로 Base64-encoded 처리되며, 다음과 같은 HTTP 헤더 값으로 제공됩니다:
Authorization: Basic <base64 encoded credentials>
JSONata를 이용한 페이로드 변환
API 를 사용하여 웹훅 알림 채널을 생성할 때 JSONata 표현식을 통해 웹훅 페이로드를 변환할 수 있습니다. 이 기능은 현재 API 설정에서만 사용할 수 있으며, Instana UI에서는 사용할 수 없습니다. 이를 통해 웹훅 페이로드의 구조를 사용자 정의하여 타사 시스템과 더욱 원활하게 연동할 수 있습니다.
제한 사항 및 모범 사례
변환 표현식은 알림 채널 수준에서 전역적으로 적용되며, 해당 채널을 통해 전송되는 모든 알림에 영향을 미칩니다. 다음 가이드라인에 유의하십시오.
- 경보별 변환 : 경보마다 서로 다른 변환이 필요한 경우, 각각 고유한 변환 표현식을 가진 여러 개의 웹훅 경보 채널을 생성하십시오.
- 오류 처리 : 유효하지 않은 JSONata 표현식은 알림 전송 실패를 유발할 수 있습니다. 구성을 생성하기 전에 ‘테스트 채널’ 버튼을 사용하여 표현식이 유효한지 확인하고, 잠재적인 null 값이나 누락된 값을 적절히 처리하십시오.
JSONata는 JSON 데이터에 대한 경량 조회 및 변환 언어입니다. JSONata 구문에 대한 자세한 내용은 JSONata 문서를 참조하십시오.
페이로드 변환을 포함한 웹훅 생성
변환 기능을 포함한 웹훅 알림 채널을 생성하려면, 해당 POST /api/events/settings/alertingChannels 엔드포인트로 전송하는 API 요청에 선택적 transformationExpression 필드를 포함하십시오. 해당 transformationExpression 필드는 다음 예시와 같이 JSONata 구문을 따라야 합니다. API 에 대한 자세한 내용은 Instana OpenAPI specification을 참조하십시오.
{
"transformationExpression": "{\"issue\": $merge([issue, {\"metricNames\": issue.text}])}",
"headers": [],
"rbacTags": [],
"webhookUrls": [
"https://webhook.example.com/endpoint"
],
"kind": "WEB_HOOK",
"name": "Transformed Webhook",
"oauthEnabled": false
}
변환 예시
예시: 경고 제목을 metricNames 로 매핑하기
예를 들어, 필드에 metricNames (에 issue.text저장된) 알림 제목을 입력해야 하는 경우가 있습니다:
변환 표현식:
{
"issue": $merge([issue, {"metricNames": issue.text}])
}
변경 전:
{
"issue": {
"id": "<event-id>",
"type": "issue",
"state": "OPEN",
"start": 1749498047273,
"severity": 5,
"text": "<issue-title>",
"suggestion": "<issue-description>",
"link": "<issue-link>",
"entityType": "Host",
"customZone": "<custom-zone>",
"availabilityZone": "<availability-zone>",
"zone": "<zone>",
"fqdn": "<host-fqdn>",
"entity": "Host",
"entityLabel": "<entity-label>",
"tags": "<tag1>, <tag2>",
"container": "<container-name>",
"service": "not available",
"containerNames": [],
"metricNames": [
"cpu.used"
],
"customPayloads": {
"custom:stringKey": [
"<string-value>"
],
"custom:stringSetSingleton": [
"<singleton-value>"
],
"custom:stringSet": [
"<item-1>",
"<item-2>",
"<item-3>",
"<item-4>",
"<item-5>"
]
}
}
}
변환 후:
{
"issue": {
"id": "<event-id>",
"type": "issue",
"state": "OPEN",
"start": 1749498047273,
"severity": 5,
"text": "<issue-title>",
"suggestion": "<issue-description>",
"link": "<issue-link>",
"entityType": "Host",
"customZone": "<custom-zone>",
"availabilityZone": "<availability-zone>",
"zone": "<zone>",
"fqdn": "<host-fqdn>",
"entity": "Host",
"entityLabel": "<entity-label>",
"tags": "<tag1>, <tag2>",
"container": "<container-name>",
"service": "not available",
"containerNames": [],
"metricNames": "<issue-title>",
"customPayloads": {
"custom:stringKey": [
"<string-value>"
],
"custom:stringSetSingleton": [
"<singleton-value>"
],
"custom:stringSet": [
"<item-1>",
"<item-2>",
"<item-3>",
"<item-4>",
"<item-5>"
]
}
}
}
자주하는 질문(FAQ)
Instana 백엔드가 TCP / TLS 연결을 성공적으로 설정할 수 있도록 하려면 어떻게 해야 하나요?
Instana 의 백엔드에서 AWS 및 Google Cloud 서버로 요청을 전송하고 있습니다. 따라서, ` JavaScript ` 및 소스 맵 파일이 인터넷을 통해 누구나 쉽게 접근할 수 있도록 하는 것이 중요합니다. 또한, 백엔드에 인증서 체인이 완벽하게 구성된 정상 작동하는 TLS 설정이 있는지 확인하십시오. SSL Labs/Qualys에서 제공하는 무료 SSL 테스트를 이용하거나 다음 명령어를 실행하여 TLS 관련 문제를 확인할 수 있습니다:
openssl s_client -showcerts -connect {{YOUR_DOMAIN_HERE}}:443