워크플로 오케스트레이션 관리자에 대한 진단 로그 및 메트릭
참고 항목
워크플로 오케스트레이션 관리자는 Apache Airflow를 통해 구동됩니다.
이 문서에서는 다음 단계를 안내합니다.
- Azure Data Factory에서 워크플로 오케스트레이션 관리자에 대한 진단 로그 및 메트릭을 사용하도록 설정합니다.
- 로그 및 메트릭을 봅니다.
- 쿼리를 실행합니다.
- 메트릭을 모니터링하고 DAG(방향성 비순환 그래프) 오류 시 경고 시스템을 설정합니다.
필수 조건
Azure 구독이 필요합니다. Azure 구독이 아직 없는 경우 시작하기 전에 Azure 체험 계정을 만듭니다.
워크플로 오케스트레이션 관리자에 진단 로그 및 메트릭 사용
Data Factory 리소스를 열고 가장 왼쪽 창에서 진단 설정을 선택합니다. 그런 다음, 진단 설정 추가를 선택합니다.
진단 설정 이름을 작성합니다. Airflow 로그에 대해 다음 범주를 선택합니다.
- Airflow 작업 실행 로그
- Airflow 작업자 로그
- Airflow DAG 처리 로그
- Airflow 스케줄러 로그
- Airflow 웹 로그
- AllMetrics를 선택하면 다양한 Data Factory 메트릭을 사용하여 경고를 모니터링하거나 발생합니다. 이러한 메트릭에는 Data Factory 작업에 대한 메트릭 및 워크플로 오케스트레이션 관리자 통합 런타임(예:
AirflowIntegrationRuntimeCpuUsage
및AirflowIntegrationRuntimeMemory
)이 포함됩니다.
대상 세부 정보에서 Log Analytics 작업 영역에 보내기 확인란을 선택합니다.
저장을 선택합니다.
로그 보기
진단 설정을 추가한 후 진단 설정 섹션에서 해당 설정을 확인할 수 있습니다. 로그에 액세스하고 보려면 구성한 Log Analytics 작업 영역을 선택합니다.
Log Analytics 환경 최대화 섹션에서 로그 보기를 선택합니다.
선택한 테이블이 자동으로 작업 영역으로 가져온 것을 확인할 수 있는 Log Analytics 작업 영역으로 이동됩니다.
스키마에 대한 기타 유용한 링크:
- Azure Monitor 로그 참조 - ADFAirflowSchedulerLogs | Microsoft Learn
- Azure Monitor 로그 참조 - ADFAirflowTaskLogs | Microsoft Learn
- Azure Monitor 로그 참조 - ADFAirflowWebLogs | Microsoft Learn
- Azure Monitor 로그 참조 - ADFAirflowWorkerLogs | Microsoft Learn
- Azure Monitor 로그 참조 - AirflowDagProcessingLogs | Microsoft Learn
쿼리 작성
ADFAirflowTaskLogs
의 모든 레코드를 반환하는 가장 간단한 쿼리부터 시작해 보겠습니다. 테이블 이름을 두 번 클릭하여 쿼리 창에 추가할 수 있습니다. 창에 테이블 이름을 직접 입력할 수도 있습니다.특정 작업 ID를 기준으로 필터링하는 등 검색 결과의 범위를 좁히려면 다음 쿼리를 사용할 수 있습니다.
ADFAirflowTaskLogs | where DagId == "<your_dag_id>" and TaskId == "<your_task_id>"
마찬가지로, LogManagement
에서 사용 가능한 테이블을 사용하여 필요에 따라 사용자 지정 쿼리를 만들 수 있습니다.
자세한 내용은 다음을 참조하세요.
메트릭 모니터링
Data Factory는 Airflow 통합 런타임에 대한 포괄적인 메트릭을 제공하므로 Airflow 통합 런타임의 성능을 효과적으로 모니터링하고 필요에 따라 경고 메커니즘을 설정할 수 있습니다.
Data Factory 리소스를 엽니다.
가장 왼쪽 창의 모니터링 섹션에서 통계를 선택합니다.
모니터링하려는 범위>메트릭 네임스페이스>메트릭을 선택합니다.
Integration Runtime CPU 비율과 Integration Runtime Dag Bag 크기를 시각화하는 여러 줄로 된 차트를 검토합니다.
메트릭이 특정 조건을 충족할 때 트리거되는 경고 규칙을 설정할 수 있습니다. 자세한 내용은 Azure Monitor 경고 개요를 참조하세요.
차트가 완료된 후 대시보드에 저장을 선택합니다. 그렇지 않으면 차트가 사라집니다.
Airflow 메트릭
다음 표에서는 워크플로 오케스트레이션 관리자에 사용할 수 있는 메트릭을 나열합니다. 테이블 제목은 다음과 같습니다.
- 메트릭: Azure Portal에 표시되는 메트릭 표시 이름입니다.
- REST API의 이름: REST API에서 참조되는 메트릭 이름입니다.
- 설명: 메트릭에 대한 설명입니다.
- 단위: 측정 단위입니다.
- 집계: 기본 집계 형식입니다. 유효한 값은 평균, 최소, 최대, 합계 및 개수입니다.
- 차원: 메트릭에 사용할 수 있는 차원입니다.
- 시간 조직: 메트릭이 샘플링되는 간격입니다. 예를 들어, PT1M은 메트릭이 1분마다, PT30M은 30분마다, PT1H는 1시간마다 샘플링됨을 나타냅니다.
- DS 내보내기: 진단 설정을 통해 메트릭을 Azure Monitor 로그로 내보낼 수 있는지 여부를 나타냅니다.
메트릭 | REST API의 이름 | 설명 | 단위 | 집계 | 차원 | 시간 조직 | DS 내보내기 |
---|---|---|---|---|---|---|---|
Airflow Integration Runtime Celery 작업 시간 제한 오류 | AirflowIntegrationRuntimeCeleryTaskTimeoutError |
작업을 Celery Broker에 게시할 때 발생한 AirflowTaskTimeout 오류 수입니다. |
Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 수집 DB Dags | AirflowIntegrationRuntimeCollectDBDags |
데이터베이스에서 직렬화된 모든 DAG를 가져오는 데 걸리는 시간(밀리초)입니다. | 밀리초 | 평균 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime CPU 비율 | AirflowIntegrationRuntimeCpuPercentage |
Airflow 통합 런타임의 CPU 사용량 비율입니다. | 백분율 | 평균 | IntegrationRuntimeName , ContainerName |
PT1M | 아니요 |
Airflow Integration Runtime 메모리 사용량 | AirflowIntegrationRuntimeCpuUsage |
Airflow 통합 런타임에서 소비되는 밀리코어는 CPU 코어의 수천 분의 1에서 사용되는 CPU 리소스를 나타냅니다. | 밀리코어 | 평균 | IntegrationRuntimeName , ContainerName |
PT1M | 예 |
Airflow Integration Runtime Dag Bag 크기 | AirflowIntegrationRuntimeDagBagSize |
스케줄러가 구성에 따라 검사를 실행할 때 발견된 DAG 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime Dag 콜백 예외 | AirflowIntegrationRuntimeDagCallbackExceptions |
DAG 콜백에서 발생한 예외 수입니다. 예외가 발생하면 DAG 콜백이 작동하지 않는다는 의미입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 파일 새로 고침 오류 | AirflowIntegrationRuntimeDAGFileRefreshError |
DAG 파일을 로드하는 데 실패한 횟수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 처리 가져오기 오류 | AirflowIntegrationRuntimeDAGProcessingImportErrors |
DAG 파일을 구문 분석하는 동안 발생한 오류 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 처리 마지막 기간 | AirflowIntegrationRuntimeDAGProcessingLastDuration |
특정 DAG 파일을 로드하는 데 걸린 시간(초)입니다. | 밀리초 | 평균 | IntegrationRuntimeName , DagFile |
PT1M | 아니요 |
Airflow Integration Runtime DAG 처리 마지막 실행 초 전 | AirflowIntegrationRuntimeDAGProcessingLastRunSecondsAgo |
<dag_file>이 마지막으로 처리된 이후의 시간(초)입니다. | 초 | 평균 | IntegrationRuntimeName , DagFile |
PT1M | 아니요 |
Airflow Integration Runtime DAG ProcessingManager 중단 | AirflowIntegrationRuntimeDAGProcessingManagerStalls |
정지된 DagFileProcessorManager 의 수입니다. |
Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 처리 프로세스 | AirflowIntegrationRuntimeDAGProcessingProcesses |
현재 실행 중인 DAG 구문 분석 프로세스의 상대적 수입니다. (예를 들어, 마지막 메트릭이 전송된 이후 프로세스가 완료된 경우 이 델타는 음수입니다.) | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 처리 프로세서 시간 제한 | AirflowIntegrationRuntimeDAGProcessingProcessorTimeouts |
시간이 너무 오래 걸려 종료된 파일 프로세서 수입니다. | 초 | 평균 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 처리 총 구문 분석 시간 | AirflowIntegrationRuntimeDAGProcessingTotalParseTime |
dag_processing.file_path_queue_size DAG 파일을 검사하고 가져오는 데 몇 초가 걸립니다. |
초 | 평균 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG 실행 종속성 검사 | AirflowIntegrationRuntimeDAGRunDependencyCheck |
DAG 종속성을 확인하는 데 밀리초가 소요됩니다. | 밀리초 | 평균 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime DAG 실행 기간 실패 | AirflowIntegrationRuntimeDAGRunDurationFailed |
DagRun 이 실패 상태에 도달하는 데 걸리는 시간(초)입니다. |
밀리초 | 평균 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime DAG 실행 기간 성공 | AirflowIntegrationRuntimeDAGRunDurationSuccess |
DagRun 이 성공 상태에 도달하는 데 걸리는 시간(초)입니다. |
밀리초 | 평균 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime DAG 첫 번째 작업 예약 지연 실행 | AirflowIntegrationRuntimeDAGRunFirstTaskSchedulingDelay |
첫 번째 작업 start_date 와 DagRun 예상 시작 사이에 경과된 시간(초)입니다. |
밀리초 | 평균 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime DAG 실행 일정 지연 | AirflowIntegrationRuntimeDAGRunScheduleDelay |
예정된 DagRun 시작 날짜와 실제 DagRun 시작 날짜 사이의 대기 시간(초)입니다. |
밀리초 | 평균 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime 실행기 오픈 슬롯 | AirflowIntegrationRuntimeExecutorOpenSlots |
실행기의 열린 슬롯 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 실행기 대기 작업 | AirflowIntegrationRuntimeExecutorQueuedTasks |
실행기에서 대기 중인 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 실행기 실행 작업 | AirflowIntegrationRuntimeExecutorRunningTasks |
실행기에서 실행 중인 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 작업 종료 | AirflowIntegrationRuntimeJobEnd |
종료된 <job_name> 작업 수(예: SchedulerJob 및 LocalTaskJob )입니다. |
Count | 합계 | IntegrationRuntimeName , Job |
PT1M | 아니요 |
Airflow Integration Runtime 하트비트 실패 | AirflowIntegrationRuntimeJobHeartbeatFailure |
<job_name> 작업에 대해 실패한 하트비트 수(예: SchedulerJob 및 LocalTaskJob )입니다. |
Count | 합계 | IntegrationRuntimeName , Job |
PT1M | 아니요 |
Airflow Integration Runtime 작업 시작 | AirflowIntegrationRuntimeJobStart |
시작된 <job_name> 작업 수(예: SchedulerJob 및 LocalTaskJob )입니다. |
Count | 합계 | IntegrationRuntimeName , Job |
PT1M | 아니요 |
Airflow Integration Runtime 메모리 백분율 | AirflowIntegrationRuntimeMemoryPercentage |
Airflow 통합 런타임 환경에서 사용되는 메모리 비율입니다. | 백분율 | 평균 | IntegrationRuntimeName , ContainerName |
PT1M | 예 |
Airflow 통합 런타임 노드 수 | AirflowIntegrationRuntimeNodeCount |
Count | 평균 | IntegrationRuntimeName , ComputeNodeSize |
PT1M | 예 | |
Airflow Integration Runtime 운영자 실패 | AirflowIntegrationRuntimeOperatorFailures |
총 운영자 실패입니다. | Count | 합계 | IntegrationRuntimeName , Operator |
PT1M | 아니요 |
Airflow Integration Runtime 운영자 성공 | AirflowIntegrationRuntimeOperatorSuccesses |
총 운영자 성공입니다. | Count | 합계 | IntegrationRuntimeName , Operator |
PT1M | 아니요 |
Airflow Integration Runtime 풀 오픈 슬롯 | AirflowIntegrationRuntimePoolOpenSlots |
풀의 열린 슬롯 수입니다. | Count | 합계 | IntegrationRuntimeName , Pool |
PT1M | 아니요 |
Airflow Integration Runtime 풀 대기 슬롯 | AirflowIntegrationRuntimePoolQueuedSlots |
풀의 대기 중인 슬롯 수입니다. | Count | 합계 | IntegrationRuntimeName , Pool |
PT1M | 아니요 |
Airflow Integration Runtime 풀 실행 슬롯 | AirflowIntegrationRuntimePoolRunningSlots |
풀에서 실행 중인 슬롯 수입니다. | Count | 합계 | IntegrationRuntimeName , Pool |
PT1M | 아니요 |
Airflow Integration Runtime 풀 고갈 작업 | AirflowIntegrationRuntimePoolStarvingTasks |
풀에서 기아 상태인 작업 수입니다. | Count | 합계 | IntegrationRuntimeName , Pool |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 중요 섹션 사용 중 | AirflowIntegrationRuntimeSchedulerCriticalSectionBusy |
스케줄러 프로세스가 임계 영역(실행기에게 작업을 보내는 데 필요함)에 대한 잠금을 가져오려고 시도했지만 다른 프로세스에 의해 잠겨 있음을 발견한 횟수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 중요 섹션 기간 | AirflowIntegrationRuntimeSchedulerCriticalSectionDuration |
스케줄러 루프의 임계 영역에 소요된 밀리초입니다. 한 번에 하나의 스케줄러만 이 루프에 들어갈 수 있습니다. | 밀리초 | 평균 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 SLA 이메일 시도 실패 | AirflowIntegrationRuntimeSchedulerFailedSLAEmailAttempts |
실패한 SLA 누락 이메일 알림 시도 횟수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 하트비트 | AirflowIntegrationRuntimeSchedulerHeartbeat |
스케줄러 하트비트입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 분리된 작업 채택됨 | AirflowIntegrationRuntimeSchedulerOrphanedTasksAdopted |
스케줄러가 채택한 분리된 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 분리된 작업 지워짐 | AirflowIntegrationRuntimeSchedulerOrphanedTasksCleared |
스케줄러에 의해 지워진 분리된 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 작업 실행 가능 | AirflowIntegrationRuntimeSchedulerTasksExecutable |
풀 한도, DAG 동시성, 실행기 상태 및 우선 순위와 관련하여 실행 준비가 완료된(큐로 설정됨) 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 외부에서 스케줄러 작업 종료됨 | AirflowIntegrationRuntimeSchedulerTasksKilledExternally |
외부에서 종료된 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 스케줄러 작업 실행 중 | AirflowIntegrationRuntimeSchedulerTasksRunning |
Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 | |
Airflow Integration Runtime 스케줄러 작업 부족함 | AirflowIntegrationRuntimeSchedulerTasksStarving |
풀에 열려 있는 슬롯이 없기 때문에 예약할 수 없는 작업 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 시작된 작업 인스턴스 | AirflowIntegrationRuntimeStartedTaskInstances |
Count | 합계 | IntegrationRuntimeName , , DagId TaskId |
PT1M | 아니요 | |
Airflow Integration Runtime 운영자를 사용하여 만든 작업 인스턴스 | AirflowIntegrationRuntimeTaskInstanceCreatedUsingOperator |
특정 운영자에 대해 만들어진 작업 인스턴스 수입니다. | Count | 합계 | IntegrationRuntimeName , Operator |
PT1M | 아니요 |
Airflow Integration Runtime 작업 인스턴스 기간 | AirflowIntegrationRuntimeTaskInstanceDuration |
밀리초 | 평균 | IntegrationRuntimeName , , DagId TaskID |
PT1M | 아니요 | |
Airflow Integration Runtime 작업 인스턴스 실패 | AirflowIntegrationRuntimeTaskInstanceFailures |
전체 작업 인스턴스 실패입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 작업 인스턴스 완료됨 | AirflowIntegrationRuntimeTaskInstanceFinished |
전체 작업 인스턴스가 완료되었습니다. | Count | 합계 | IntegrationRuntimeName , DagId , TaskId State |
PT1M | 아니요 |
Airflow Integration Runtime 작업 인스턴스가 이전에 성공함 | AirflowIntegrationRuntimeTaskInstancePreviouslySucceeded |
이전에 성공한 작업 인스턴스 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 작업 인스턴스 성공 | AirflowIntegrationRuntimeTaskInstanceSuccesses |
전체 작업 인스턴스 성공입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime DAG에서 제거된 작업 | AirflowIntegrationRuntimeTaskRemovedFromDAG |
특정 DAG에 대해 제거된 작업 수입니다. (즉, 해당 작업이 더 이상 DAG에 존재하지 않습니다.) | Count | 합계 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime DAG로 복원된 작업 | AirflowIntegrationRuntimeTaskRestoredToDAG |
특정 DAG에 대해 복원된 작업 수입니다. (즉, 데이터베이스에서 이전에 REMOVED 상태였던 작업 인스턴스가 DAG 파일에 추가됩니다.) | Count | 합계 | IntegrationRuntimeName , DagId |
PT1M | 아니요 |
Airflow Integration Runtime 트리거 차단된 기본 스레드 | AirflowIntegrationRuntimeTriggersBlockedMainThread |
기본 스레드를 차단한 트리거 수(완전히 비동기적이지 않았기 때문일 수 있음)입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 트리거 실패함 | AirflowIntegrationRuntimeTriggersFailed |
이벤트를 실행하기 전에 오류가 발생한 트리거 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 트리거 실행 중 | AirflowIntegrationRuntimeTriggersRunning |
트리거에 대해 현재 실행 중인 트리거 수(호스트 이름으로 설명됨)입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 트리거 성공함 | AirflowIntegrationRuntimeTriggersSucceeded |
하나 이상의 이벤트를 실행한 트리거 수입니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
Airflow Integration Runtime 좀비 작업 종료됨 | AirflowIntegrationRuntimeZombiesKilled |
좀비 작업이 종료되었습니다. | Count | 합계 | IntegrationRuntimeName |
PT1M | 아니요 |
자세한 내용은 Microsoft.DataFactory/factories에 지원되는 메트릭을 참조하세요.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기