9.4.8. Azure Monitor 로그에 전달


로깅 5.9 이상에서는 기본 로그 저장소에 추가하거나 대신 Azure Monitor Logs 로 로그를 전달할 수 있습니다. 이 기능은 Vector Azure Monitor Logs 싱크 에서 제공합니다.

사전 요구 사항

  • ClusterLogging 사용자 정의 리소스(CR) 인스턴스를 관리하고 생성하는 방법을 잘 알고 있습니다.
  • ClusterLogForwarder CR 인스턴스를 관리하고 생성하는 방법을 잘 알고 있습니다.
  • ClusterLogForwarder CR 사양을 이해하고 있습니다.
  • Azure 서비스에 대한 기본적인 지식이 있습니다.
  • Azure Portal 또는 Azure CLI 액세스용으로 구성된 Azure 계정이 있습니다.
  • Azure Monitor 로그 기본 또는 보조 보안 키를 가져왔습니다.
  • 전달할 로그 유형을 확인했습니다.

HTTP 데이터 수집기 API를 통해 Azure Monitor 로그에 대한 로그 전달을 활성화하려면 다음을 수행합니다.

공유 키를 사용하여 보안을 생성합니다.

apiVersion: v1
kind: Secret
metadata:
  name: my-secret
  namespace: openshift-logging
type: Opaque
data:
  shared_key: <your_shared_key> 
1
1
요청을 수행하는 Log Analytics 작업 공간에 대한 기본 또는 보조 키를 포함해야 합니다.

공유 키를 가져오려면 Azure CLI에서 다음 명령을 사용할 수 있습니다.

Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName "<resource_name>" -Name "<workspace_name>”

로그 선택과 일치하는 템플릿을 사용하여 ClusterLogForwarder CR을 생성하거나 편집합니다.

모든 로그를 전달

apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogForwarder"
metadata:
  name: instance
  namespace: openshift-logging
spec:
  outputs:
  - name: azure-monitor
    type: azureMonitor
    azureMonitor:
      customerId: my-customer-id 
1

      logType: my_log_type 
2

    secret:
       name: my-secret
  pipelines:
  - name: app-pipeline
    inputRefs:
    - application
    outputRefs:
    - azure-monitor

1
로그 분석 작업 공간의 고유 식별자입니다. 필수 필드입니다.
2
제출 중인 데이터의 Azure 레코드 유형입니다. 문자, 숫자, 밑줄(_)만 포함할 수 있으며 100자를 초과할 수 없습니다.

애플리케이션 및 인프라 로그 전달

apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogForwarder"
metadata:
  name: instance
  namespace: openshift-logging
spec:
  outputs:
  - name: azure-monitor-app
    type: azureMonitor
    azureMonitor:
      customerId: my-customer-id
      logType: application_log 
1

    secret:
      name: my-secret
  - name: azure-monitor-infra
    type: azureMonitor
    azureMonitor:
      customerId: my-customer-id
      logType: infra_log #
    secret:
      name: my-secret
  pipelines:
    - name: app-pipeline
      inputRefs:
      - application
      outputRefs:
      - azure-monitor-app
    - name: infra-pipeline
      inputRefs:
      - infrastructure
      outputRefs:
      - azure-monitor-infra

1
제출 중인 데이터의 Azure 레코드 유형입니다. 문자, 숫자, 밑줄(_)만 포함할 수 있으며 100자를 초과할 수 없습니다.

고급 구성 옵션

apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogForwarder"
metadata:
  name: instance
  namespace: openshift-logging
spec:
  outputs:
  - name: azure-monitor
    type: azureMonitor
    azureMonitor:
      customerId: my-customer-id
      logType: my_log_type
      azureResourceId: "/subscriptions/111111111" 
1

      host: "ods.opinsights.azure.com" 
2

    secret:
       name: my-secret
  pipelines:
  - name: app-pipeline
    inputRefs:
    - application
    outputRefs:
    - azure-monitor

1
데이터가 연결되어 있어야 하는 Azure 리소스의 리소스 ID입니다. 선택적 필드입니다.
2
전용 Azure 리전을 위한 대체 호스트입니다. 선택적 필드입니다. 기본값은 ods.opinsights.azure.com 입니다. Azure Government의 기본값은 ods.opinsights.azure.us 입니다.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동