Composite monitors
출처: 문서
본문
Composite monitors
목차
{: .text-delta } - TOC {:toc}Composite monitors 개요
Alerting plugin의 기본 monitor types는 단일 trigger type을 정의하도록 설계되었어요. 예를 들어, per document monitor는 쿼리가 문서와 일치하는지에 따라 alert을 트리거할 수 있고, per bucket monitor는 데이터 소스의 집계된 값을 대상으로 하는 쿼리를 기반으로 alert을 트리거할 수 있어요. Composite monitor는 여러 monitor를 순차적으로 결합하여 여러 기준에 따라 데이터 소스를 분석한 다음, 각각의 개별 alert을 사용하여 단일 chained alert을 생성해요. 이를 통해 데이터 소스에 대해 더 세분화된 정보를 얻을 수 있고, 개별 monitor의 스케줄을 수동으로 조정할 필요가 없어요.
Composite monitors는 기본 monitors의 한계를 다음과 같은 방식으로 제거해요:
- Composite monitors는 여러 유형의 monitors에서 생성된 trigger 조합을 통해 복잡한 쿼리를 만들 수 있는 기능을 제공해요.
- 단일 실행으로 실행되는 규칙과 쿼리의 파이프라인을 정의할 수 있어요.
- 워크플로우에서 개별 monitors의 여러 alert 대신 단일 alert을 사용자에게 전달해요.
- 여러 monitors와 여러 유형의 monitors를 순차적으로 실행하여 데이터 소스에 대한 더 완전한 보기를 제공하고, 더 집중된 결과를 만들고 결과의 노이즈를 줄여요.
주요 용어
다음 표의 주요 용어는 composite monitors의 기본 개념을 설명해요. 모든 유형의 monitors에 공통적인 추가 용어는 Alerting 섹션의 Key terms를 참조하세요.
| Term | Definition |
|---|---|
| Composite monitor | Composite monitor는 순차적 워크플로우에서 여러 monitor의 실행을 지원하는 monitor 유형이에요. Chained alert을 생성하기 위한 trigger 구성을 지원해요. |
| Delegate monitor | Delegate monitor는 composite monitor 정의에서의 순서에 따라 순차적으로 실행돼요. Delegate monitor의 trigger 조건이 충족되면 audit alert을 생성해요. 이 audit alert는 composite monitor trigger의 조건이 돼요. Composite monitor는 per query, per bucket, per document monitor를 delegate monitor로 지원해요. |
| workflow ID | Workflow ID는 모든 delegate monitor의 전체 워크플로우에 대한 식별자를 제공해요. Composite monitor의 monitor ID와 동의어예요. |
| Chained alert | Chained alert는 delegate monitor가 audit alert을 생성할 때 composite monitor trigger에서 생성돼요. Chained alert trigger 조건은 논리 연산자 AND, OR, NOT을 지원하므로 여러 함수를 단일 표현식으로 결합할 수 있어요. |
| Audit alert | Delegate monitor는 audit 상태로 alert을 생성해요. 사용자는 각각의 audit alert에 대해 알림을 받지 않으며 승인할 필요도 없어요. Audit alert는 composite monitor에서 chained alert trigger 조건을 평가하는 데 사용돼요. |
| Execution | Composite monitor 구성에 정의된 순서대로 모든 delegate monitor를 단일 실행하는 것이에요. |
기본 워크플로우
Composite monitor는 정의된 순서로 각 monitor를 실행하는 워크플로우에서 개별 monitor를 결합하여 만들어요. Delegate monitor의 개별 audit alert가 composite monitor의 trigger 조건을 충족하면 composite monitor는 자체 chained alert을 생성해요. 두 개의 delegate monitor로 구성된 간단한 composite monitor가 워크플로우를 실행하는 방법을 이해하려면 다음 이벤트 순서를 고려해 보세요. 이 예에서 composite monitor의 trigger 조건은 첫 번째 monitor와 두 번째 monitor 모두 alert을 생성할 때 충족돼요.
- Composite monitor가 실행을 시작하고 첫 번째 monitor에 위임해요. 첫 번째 monitor의 trigger 조건이 충족되어 audit alert을 생성해요.
- 그런 다음 composite monitor는 실행을 두 번째 monitor에 위임해요. 두 번째 monitor의 trigger 조건도 충족되어 자체 audit alert을 생성해요.
- Composite monitor의 trigger 조건이 첫 번째와 두 번째 monitor 모두 audit alert을 생성하도록 요구하기 때문에 composite monitor는 chained alert을 트리거해요.
- Composite monitor 정의에 알림이 구성된 경우 사용자는 chained alert에 대한 알림을 받아요. 하지만 두 delegate monitor가 생성한 개별 audit alert은 받지 않아요.
이 간단한 예에서 첫 번째 monitor는 세 가지 다른 쿼리를 사용하여 데이터 소스를 분석하도록 구성된 per document monitor일 수 있고, 두 번째 monitor는 클라이언트 IP별로 데이터를 집계하는 per bucket monitor일 수 있어요. 각 delegate monitor의 요구 사항을 결합함으로써 composite monitor는 alert 생성 여부를 결정하는 기준을 집중시켜요. 이렇게 하면 결정적 가치가 없는 불필요한 alert를 제거하면서 alert의 의미를 개선할 수 있어요.
API로 composite monitors 관리
OpenSearch REST API 또는 OpenSearch Dashboards를 사용하여 composite monitors를 관리할 수 있어요. 이 섹션에서는 composite monitors의 API 기능을 설명해요.
Composite monitor 생성
이 API는 composite monitor를 생성할 수 있게 해요.
POST _plugins/_alerting/workflows
{% include copy-curl.html %}
Request body fields
| Field | Type | Description |
|---|---|---|
schedule |
Object | 실행 빈도를 결정하는 스케줄이에요. |
schedule.period.interval |
Numeral | 실행 빈도를 설정하기 위해 숫자 값을 받아요. |
schedule.period.unit |
Object | 간격의 시간 단위: SECONDS, MINUTES, HOURS, DAYS. |
inputs |
Object | Delegate monitor를 정의하는 입력을 받아요. Delegate monitor와 실행 순서를 모두 지정해요. |
inputs.composite_input.sequence.delegates |
Object | Composite monitor의 기반이 되는 개별 monitor의 설정이에요. |
inputs.composite_input.sequence.delegates.order |
Number | 실행에서 monitor가 실행되는 순서를 지정해요. |
inputs.composite_input.sequence.delegates.monitor_id |
String | Monitor의 고유 식별자예요. |
enabled_time |
Number | Monitor가 활성화된 시간이에요. Epoch 시간으로 표시돼요. |
enabled |
Boolean | Composite monitor의 활성화 여부를 결정하는 설정이에요. true로 설정하면 composite monitor가 활성화돼요. 기본값은 true예요. |
workflow_type |
String | Composite monitor의 경우 composite로 설정해요. |
triggers |
Object | 개별 alert trigger의 세부 정보예요. |
triggers.chained_alert_trigger |
Object | 각 개별 alert trigger의 세부 정보예요. 각 monitor의 alert trigger는 구성에 대한 설정이 필요해요. |
triggers.chained_alert_trigger.id |
String | Alert trigger의 고유 식별자예요. |
triggers.chained_alert_trigger.name |
String | Alert trigger의 이름이에요. |
triggers.chained_alert_trigger.severity |
Number | Alert 심각도예요. 1 = 가장 높음; 2 = 높음; 3 = 중간; 4 = 낮음; 5 = 가장 낮음. |
triggers.chained_alert_trigger.condition.script |
Object | Alert 트리거 조건을 결정하는 스크립트 세부 정보예요. |
triggers.chained_alert_trigger.condition.script.source |
String | Alert 트리거 조건을 정의하는 Painless 스크립트예요. 자세한 내용은 Painless scripting language를 참조하세요. |
triggers.chained_alert_trigger.condition.script.lang |
String | Painless 스크립팅 언어의 경우 painless를 입력해요. |
actions |
Object | Alert 알림 구성을 위한 필드를 제공해요. |
Example request
POST _plugins/_alerting/workflows
{
"last_update_time": 1679468231835,
"owner": "alerting",
"type": "workflow",
"schedule": {
"period": {
"interval": 1,
"unit": "MINUTES"
}
},
"inputs": [{
"composite_input": {
"sequence": {
"delegates": [{
"order": 1,
"monitor_id": "grsbCIcBvEHfkjWFeCqb"
},
{
"order": 2,
"monitor_id": "agasbCIcBvEHfkjWFeCqa"
}
]
}
}
}],
"enabled_time": 1679468231835,
"enabled": true,
"workflow_type": "composite",
"name": "scale_up",
"triggers": [{
"chained_alert_trigger": {
"id": "m1ANDm2",
"name": "jnkjn",
"severity": "1",
"condition": {
"script": {
"source": "(monitor[id=grsbCIcBvEHfkjWFeCqb] && monitor[id=agasbCIcBvEHfkjWFeCqa])",
"lang": "painless"
}
}
},
"actions": [{
"name": "test-action",
"destination_id": "ld7912sBlQ5JUWWFThoW",
"message_template": {
"source": "This is my message body."
},
"throttle_enabled": true,
"throttle": {
"value": 27,
"unit": "MINUTES"
},
"subject_template": {
"source": "TheSubject"
}
}]
},
{
"chained_alert_trigger": {
"id": "m1ORm2",
"name": "jnkjn",
"severity": "1",
"condition": {
"script": {
"source": "(monitor[id=grsbCIcBvEHfkjWFeCqb] || monitor[id=agasbCIcBvEHfkjWFeCqa])",
"lang": "painless"
}
}
}
}
]
}
{% include copy-curl.html %}
Painless scripting language를 사용하여 chained alert trigger 조건 정의
Composite monitor 구성은 Painless scripting language를 사용하여 chained alert 생성 조건을 정의해요. 조건은 composite monitor의 각 실행에 적용돼요. 요청의 triggers.chained_alert_triggers.condition.script.source 필드에 alert trigger 조건을 정의해요. Painless 구문을 사용하면 기본 Boolean 연산자 AND, OR, NOT 및 우선순위를 사용하여 monitor 간의 링크에 논리를 적용할 수 있어요:
- AND =
&& - OR =
|| - NOT =
! - Precedence =
()
다음 예제를 통해 각각이 monitor 정의에서 어떻게 사용되는지 확인해 보세요.
-
Example 1
monitor[id=1] && monitor[id=2]다음 delegate monitor 조건은 monitor #1 AND monitor #2 모두 alert을 생성할 때 composite monitor가 chained alert을 생성하도록 트리거해요.
-
Example 2
monitor[id=1] || !monitor[id=2]다음 조건은 monitor #1이 alert을 생성하거나 monitor #2가 alert을 생성하지 않을 때 composite monitor가 chained alert을 생성하도록 트리거해요.
-
Example 3
monitor[id=1] && (monitor[id=2] || monitor[id=3])다음 조건은 monitor #1이 alert을 생성하고 monitor #2 OR monitor #3이 alert을 생성할 때 composite monitor가 chained alert을 생성하도록 트리거해요.
Painless 스크립트의 monitor ID 순서는 monitor의 실행 순서를 정의하지 않아요. Monitor 실행 순서는 요청의 inputs.composite_input.sequence.delegates.order 필드에 정의돼요.
{: .note }
Composite monitor 조회
이 API는 지정된 monitor의 정보를 검색해요.
GET _plugins/_alerting/workflows/{workflow_id}
{% include copy-curl.html %}
Path parameters
| Field | Type | Description |
|---|---|---|
workflow_id |
String | Composite monitor의 workflow ID예요. |
Composite monitor 업데이트
이 API는 composite monitor의 세부 정보를 업데이트해요. 요청 필드에 대한 설명은 Create composite monitor를 참조하세요.
Example request
PUT _plugins/_alerting/workflows/{workflow_id}
{
"owner": "security_analytics",
"type": "workflow",
"schedule": {
"period": {
"interval": 1,
"unit": "MINUTES"
}
},
"inputs": [
{
"composite_input": {
"sequence": {
"delegates": [
{
"order": 1,
"monitor_id": "grsbCIcBvEHfkjWFeCqb"
},
{
"order": 2,
"monitor_id": "agasbCIcBvEHfkjWFeCqa"
}
]
}
}
}
],
"enabled_time": 1679468231835,
"enabled": true,
"workflow_type": "composite",
"name": "NTxdwApKbv"
}
{% include copy-curl.html %}
Composite monitor 삭제
DELETE _plugins/_alerting/workflows/{workflow_id}
{% include copy-curl.html %}
Composite monitor 실행
이 API는 composite monitor의 워크플로우 실행을 시작해요:
POST /_plugins/_alerting/workflows/{workflow_id}/_execute
{% include copy-curl.html %}
Example response
{
"execution_id": "I0GXeIgBYKBG2nHoiHCL_2023-06-01T20:18:48.511884_a9c1d055-9b70-49c2-b32a-716cff1f562e",
"workflow_name": "scale_up",
"workflow_id": "I0GXeIgBYKBG2nHoiHCL",
"trigger_results": {
"m1ANDm2": {
"name": "jnkjn",
"triggered": true,
"action_results": {},
"error": null
},
"m1ORm2": {
"name": "jnkjn",
"triggered": true,
"action_results": {},
"error": null
}
},
"monitor_run_results": [{
"monitor_name": "test triggers",
"period_start": 1685650668501,
"period_end": 1685650728501,
"error": null,
"input_results": {
"results": [{
"bhjh": [
"OkGceIgBYKBG2nHoyHAn|test1",
"O0GceIgBYKBG2nHozHCW|test1"
],
"nkjkj": [
"OkGceIgBYKBG2nHoyHAn|test1",
"O0GceIgBYKBG2nHozHCW|test1"
],
"jknkjn": [
"OkGceIgBYKBG2nHoyHAn|test1",
"O0GceIgBYKBG2nHozHCW|test1"
]
}],
"error": null
},
"trigger_results": {
"NC3Dd4cBCDCIfBYtViLI": {
"name": "njkkj",
"triggeredDocs": [
"OkGceIgBYKBG2nHoyHAn|test1",
"O0GceIgBYKBG2nHozHCW|test1"
],
"action_results": {},
"error": null
}
}
},
{
"monitor_name": "test triggers 2",
"period_start": 1685650668501,
"period_end": 1685650728501,
"error": null,
"input_results": {
"results": [{
"bhjh": [
"PEGceIgBYKBG2nHo1HCw|test",
"PUGceIgBYKBG2nHo3HA8|test"
],
"nkjkj": [
"PEGceIgBYKBG2nHo1HCw|test",
"PUGceIgBYKBG2nHo3HA8|test"
],
"jknkjn": [
"PEGceIgBYKBG2nHo1HCw|test",
"PUGceIgBYKBG2nHo3HA8|test"
]
}],
"error": null
},
"trigger_results": {
"NC3Dd4cBCDCIfBYtViLI": {
"name": "njkkj",
"triggeredDocs": [
"PEGceIgBYKBG2nHo1HCw|test",
"PUGceIgBYKBG2nHo3HA8|test"
],
"action_results": {},
"error": null
}
}
}
],
"execution_start_time": "2023-06-01T20:18:48.511874Z",
"execution_end_time": "2023-06-01T20:18:53.682405Z",
"error": null
}
Chained alerts 조회
이 API는 composite monitor 워크플로우에서 생성된 chained alerts의 배열을 반환해요:
GET /_plugins/_alerting/workflows/alerts?workflowIds={workflow_ids}&getAssociatedAlerts=true
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
workflowIds |
Array | No | 이 매개변수를 사용하면 지정된 워크플로우에서 생성된 alert를 반환해요. |
getAssociatedAlerts |
Boolean | No | true로 설정하면 응답에 composite monitor가 chained alert을 생성하는 데 사용한 audit alerts가 포함돼요. 기본값은 false예요. |
Example response
{
"alerts": [
{
"id": "PbQoZokBfd2ci_FqMGi6",
"version": 1,
"monitor_id": "",
"workflow_id": "G7QoZokBfd2ci_FqD2iZ",
"workflow_name": "scale_up",
"associated_alert_ids": [
"4e8256c5-529a-484c-bf7b-d3980c03e9a4",
"513a8cb3-44bc-4eee-8aac-131be10b399e"
],
"schema_version": -1,
"monitor_version": -1,
"monitor_name": "",
"execution_id": "G7QoZokBfd2ci_FqD2iZ_2023-07-17T23:20:55.244970_edd977d2-c02b-4cbe-8a79-2aa7991c4191",
"trigger_id": "m1ANDm2",
"trigger_name": "jnkjn",
"finding_ids": [],
"related_doc_ids": [],
"state": "ACTIVE",
"error_message": null,
"alert_history": [],
"severity": "1",
"action_execution_results": [],
"start_time": 1689636057269,
"last_notification_time": 1689636057270,
"end_time": null,
"acknowledged_time": null
},
{
"id": "PrQoZokBfd2ci_FqMGj8",
"version": 1,
"monitor_id": "",
"workflow_id": "G7QoZokBfd2ci_FqD2iZ",
"workflow_name": "scale_up",
"associated_alert_ids": [
"4e8256c5-529a-484c-bf7b-d3980c03e9a4",
"513a8cb3-44bc-4eee-8aac-131be10b399e"
],
"schema_version": -1,
"monitor_version": -1,
"monitor_name": "",
"execution_id": "G7QoZokBfd2ci_FqD2iZ_2023-07-17T23:20:55.244970_edd977d2-c02b-4cbe-8a79-2aa7991c4191",
"trigger_id": "m1ORm2",
"trigger_name": "jnkjn",
"finding_ids": [],
"related_doc_ids": [],
"state": "ACTIVE",
"error_message": null,
"alert_history": [],
"severity": "1",
"action_execution_results": [],
"start_time": 1689636057340,
"last_notification_time": 1689636057340,
"end_time": null,
"acknowledged_time": null
}
],
"associatedAlerts": [
{
"id": "4e8256c5-529a-484c-bf7b-d3980c03e9a4",
"version": -1,
"monitor_id": "DrQoZokBfd2ci_FqCWh8",
"workflow_id": "G7QoZokBfd2ci_FqD2iZ",
"workflow_name": "",
"associated_alert_ids": [],
"schema_version": 5,
"monitor_version": 1,
"monitor_name": "test triggers",
"execution_id": "G7QoZokBfd2ci_FqD2iZ_2023-07-17T23:20:55.244970_edd977d2-c02b-4cbe-8a79-2aa7991c4191",
"trigger_id": "NC3Dd4cBCDCIfBYtViLI",
"trigger_name": "njkkj",
"finding_ids": [
"277afca7-d5aa-46ed-8023-5449ece65d36"
],
"related_doc_ids": [
"H7QoZokBfd2ci_FqFmii|test1"
],
"state": "AUDIT",
"error_message": null,
"alert_history": [],
"severity": "1",
"action_execution_results": [],
"start_time": 1689636056410,
"last_notification_time": 1689636056410,
"end_time": null,
"acknowledged_time": null
},
{
"id": "513a8cb3-44bc-4eee-8aac-131be10b399e",
"version": -1,
"monitor_id": "EbQoZokBfd2ci_FqCmiR",
"workflow_id": "G7QoZokBfd2ci_FqD2iZ",
"workflow_name": "",
"associated_alert_ids": [],
"schema_version": 5,
"monitor_version": 1,
"monitor_name": "test triggers 2",
"execution_id": "G7QoZokBfd2ci_FqD2iZ_2023-07-17T23:20:55.244970_edd977d2-c02b-4cbe-8a79-2aa7991c4191",
"trigger_id": "NC3Dd4cBCDCIfBYtViLI",
"trigger_name": "njkkj",
"finding_ids": [
"6d185585-a077-4dde-8e43-b4c01b9f3102"
],
"related_doc_ids": [
"ILQoZokBfd2ci_FqGmhb|test"
],
"state": "AUDIT",
"error_message": null,
"alert_history": [],
"severity": "1",
"action_execution_results": [],
"start_time": 1689636056943,
"last_notification_time": 1689636056943,
"end_time": null,
"acknowledged_time": null
}
],
"totalAlerts": 2
}
Request body fields
| Field | Type | Description |
|---|---|---|
alerts |
Array | Composite monitor가 생성한 chained alerts 목록이에요. |
associatedAlerts |
Array | Delegate monitor가 생성한 audit alerts 목록이에요. |
Chained alerts 승인
Alert를 조회한 후에 한 번의 호출로 여러 활성 alert를 승인할 수 있어요. Alert가 이미 ERROR, COMPLETED 또는 ACKNOWLEDGED 상태인 경우 실패 배열에 나타나요.
POST _plugins/_alerting/workflows/{workflow_id}/_acknowledge/alerts
{
"alerts": ["eQURa3gBKo1jAh6qUo49"]
}
{% include copy-curl.html %}
Request body fields
| Field | Type | Description |
|---|---|---|
alerts |
Array | ID별 alert 목록이에요. 결과에는 시스템에서 승인한 alert와 시스템에서 인식하지 못한 alert가 모두 포함돼요. |
Example response
{
"success": [
"eQURa3gBKo1jAh6qUo49"
],
"failed": []
}
OpenSearch Dashboards에서 복합 모니터 생성하기
먼저 OpenSearch Dashboards에서 Create monitor 페이지로 이동해요: Alerting > Monitors를 선택하고 Create monitor를 클릭해요. 모니터 이름을 지정한 다음 모니터 유형으로 Composite monitor를 선택해요. 복합 모니터 워크플로우와 트리거 조건을 생성하는 단계는 Visual editor를 사용하는지 Extraction query editor를 사용하는지에 따라 달라요. 전자는 복합 모니터를 정의하기 위한 기본 UI 선택기를 제공하고, 후자는 스크립트를 사용하여 워크플로우와 트리거 조건을 구축할 수 있게 해줘요. 사용할 방법을 결정한 후 해당 섹션을 참조하세요.
Visual editor
워크플로우와 트리거 조건을 정의하기 위해 비주얼 편집기를 사용하려면 Monitor defining method 섹션에서 Visual editor 라디오 버튼을 선택해요. 다음 이미지에 나와 있어요.
{: width="50%" }
비주얼 편집기에서 복합 모니터 생성을 완료하려면 다음 단계를 따르세요.
- Frequency 드롭다운 목록에서 By interval, Daily, Weekly, Monthly 또는 Custom cron expression 중 하나를 선택해요:
- By interval — 지정한 분, 시간 또는 일 수에 따라 일정을 반복 실행할 수 있어요.
- Daily — 하루 중 시간과 시간대를 지정해요.
- Weekly — 요일, 시간, 시간대를 지정해요.
- Monthly — 월의 일, 시간, 시간대를 지정해요.
- Custom cron expression — 일정에 대한 사용자 정의 cron 표현식을 만들어요. 표현식 생성에 도움이 필요하면 cron expressions 링크를 사용하거나 Cron 표현식을 참조하세요.
-
Delegate monitors 섹션에서 드롭다운 목록에서 선택하여 워크플로우에 포함할 개별 모니터를 입력해요. Visual editor에서는 모니터를 선택하는 순서가 워크플로우에서의 순서를 결정해요.
Add another monitor를 선택하여 다른 드롭다운 목록을 추가해요. 최소 두 개의 위임 모니터가 필요하며, 총 최대 10개까지 허용돼요. 복합 모니터는 쿼리별, 버킷별, 문서별 모니터를 위임 모니터로 지원한다는 점을 기억하세요.
각 드롭다운 목록 옆에서 모니터 보기 아이콘({::nomarkdown}
{:/})을 선택하여 모니터 세부 정보 창을 열고 정보를 검토할 수 있어요. -
복합 모니터에 대한 트리거를 정의해요. Triggers 섹션에서 Add trigger를 선택해요. 트리거 이름을 추가한 다음 트리거 조건을 정의해요.
- Select delegate monitor 레이블을 사용하여 다음 이미지에 표시된 팝업 창을 열어요.
{: width="50%" }-
Select delegate monitor 드롭다운 목록을 사용하여 이전 단계에서 정의한 모니터 중에서 위임 모니터를 선택해요. 첫 번째 위임 모니터의 경우 원하면 연산자로 NOT을 선택할 수 있어요. 모니터가 필드에 채워진 후에는 목록 오른쪽에 있는 휴지통 아이콘({::nomarkdown}
{:/})을 사용하여 필요한 경우 모니터를 제거할 수 있어요. -
첫 번째 모니터 오른쪽에 있는 더하기 기호({::nomarkdown}
{:/})를 선택하여 두 번째 위임 모니터를 선택해요. 두 번째 모니터를 선택한 후 연산자 AND,OR,AND NOT또는OR NOT중 하나를 선택하여 두 모니터 간의 조건을 적용해요. 연산자가 적용된 후 연산자를 선택하여 팝업 창을 다시 열고 선택을 변경할 수 있어요. -
알림의 심각도 수준을 선택해요. 옵션에는 1 (가장 높음), 2 (높음), 3 (중간), 4 (낮음), **5 (가장 낮음)**이 있어요.
-
Notifications 섹션에서 드롭다운 목록에서 알림 채널을 선택해요. 채널이 없으면 드롭다운 목록 오른쪽에 있는 Manage channels 레이블을 선택하여 알림 채널을 설정해요. 알림에 대한 자세한 내용은 Notifications 문서를 참조하세요. 또한 Add notification을 선택하여 알림 트리거에 대한 추가 알림을 지정할 수 있어요.
알림은 모든 모니터 유형에 대해 선택 사항이에요. {: .note }
-
추가 트리거를 정의하려면 Add another trigger를 선택해요. 총 최대 10개의 트리거를 가질 수 있어요. 화면 오른쪽의 Remove trigger를 선택하여 트리거를 제거해요.
-
모니터 워크플로우를 완료하고 트리거를 정의한 후 화면 오른쪽 아래의 Create를 선택해요. 복합 모니터가 생성되고 모니터 세부 정보 창이 열려요.
Extraction query editor
워크플로우와 트리거를 정의하기 위해 추출 쿼리 편집기를 사용하려면 Monitor defining method 섹션에서 Extraction query editor 라디오 버튼을 선택해요. 다음 이미지에 나와 있어요.
{: width="50%" }
추출 쿼리 편집기는 비주얼 편집기와 동일한 일반 단계를 따르지만, API 쿼리에서 추출을 사용하여 복합 모니터 워크플로우와 알림 트리거를 구축할 수 있어요. 이를 통해 비주얼 편집기에서 지원하지 않는 고급 구성을 생성할 수 있어요. 다음 섹션에서는 이 두 필드 각각에 대한 콘텐츠 예제를 제공해요. 복합 모니터 생성의 다른 모든 단계는 비주얼 편집기의 단계와 동일해요.
-
Define workflow
Define workflow 필드에 워크플로우에서 위임 모니터와 그 순서를 정의하는 시퀀스를 입력해요. 다음 예제는 워크플로우에 포함된 위임 모니터와 시퀀스에서의 순서를 보여줘요:
{ "sequence": { "delegates": [ { "order": 1, "monitor_id": "0TgBZokB2ZtsLaRvXz70" }, { "order": 2, "monitor_id": "8jgBZokB2ZtsLaRv6z4N" } ] } }워크플로우에 포함된 모든 위임 모니터에는
monitor_id와order값이 필요해요. -
Trigger condition
Trigger condition 필드에 모니터와 모니터 간의 조건을 정의하는 데 사용할 연산자를 입력해요. 이 필드는 트리거 조건이 Painless 스크립팅 언어로 형식화되어야 해요. 트리거 조건에 대한 스크립트가 어떻게 구성되는지 확인하려면 Using Painless scripting to define chained alert trigger conditions를 참조하세요.
다음 예제는 복합 모니터가 체인 알림을 생성하기 전에 첫 번째 모니터 OR 두 번째 모니터가 감사 알림을 생성하도록 요구하는 트리거 조건을 보여줘요:
(monitor[id=8d36S4kB0DWOHH7wpkET] || monitor[id=4t36S4kB0DWOHH7wL0Hk])
모니터 세부 정보 보기
복합 모니터가 생성되면 Monitors 탭의 모니터 목록에 나타나요. Type 열은 복합 모니터 유형을 포함한 모니터 유형을 나타내요. Associations with composite monitors 열은 기본 모니터가 위임 모니터로 사용되는 복합 모니터의 수를 제공해요. Monitor name 열에서 모니터를 선택하여 세부 정보 창을 열어요.
복합 모니터의 경우 세부 정보 창의 Alerts 섹션에는 Actions 열이 포함되어 있으며, 여기에는 세부 정보 보기 아이콘({::nomarkdown}
{:/})이 있어요. 다음 이미지는 Actions 열이 오른쪽 마지막 열로 표시된 것을 보여줘요.
{: width="75%" }
이 아이콘을 선택하여 Alert details 창을 열어요. 이 창은 체인 알림을 생성한 실행의 일부였던 모든 감사 알림을 보여주고 감사 알림을 생성한 위임 모니터를 포함해요. 창의 오른쪽 위에 있는 X를 선택하여 Alert details를 닫아요.
모니터 세부 정보 창의 Alerts 섹션으로 돌아온 후 Alert start time 왼쪽의 확인란을 선택하여 알림을 강조 표시할 수 있어요. 알림이 강조 표시된 후 이 섹션의 오른쪽 위에 있는 Acknowledge를 선택할 수 있어요. 알림이 승인되고 State 열의 상태가 Active에서 Acknowledged로 변경돼요.