3.3. 대상 al Cryostat


대상 al Cryostat는 OpenTelemetry 수집기 인스턴스의 배포된 플릿에서 대상을 스크랩하는 OpenTelemetry Operator의 선택적 구성 요소입니다. 대상 al Cryostat는 Prometheus PodMonitorServiceMonitor CR(사용자 정의 리소스)과 통합됩니다. 대상이 활성화된 경우 OpenTelemetry Operator는 대상 al Cryostat 서비스에 연결하는 활성화된 prometheus 수신자에 http_sd_config 필드를 추가합니다.

활성화된 대상 al Cryostat를 사용하는 OpenTelemetryCollector CR의 예

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: otel
  namespace: observability
spec:
  mode: statefulset 1
  targetAllocator:
    enabled: true 2
    serviceAccount: 3
    prometheusCR:
      enabled: true 4
      scrapeInterval: 10s
      serviceMonitorSelector: 5
        name: app1
      podMonitorSelector: 6
        name: app2
  config: |
    receivers:
      prometheus: 7
        config:
          scrape_configs: []
    processors:
    exporters:
      debug:
    service:
      pipelines:
        metrics:
          receivers: [prometheus]
          processors: []
          exporters: [debug]

1
대상 al Cryostat가 활성화된 경우 배포 모드를 상태 저장 세트로 설정해야 합니다.
2
대상 al Cryostat를 활성화합니다. 기본값은 false입니다.
3
대상 al Cryostat 배포의 서비스 계정 이름입니다. 서비스 계정에는 ServiceMonitor,PodMonitor 사용자 정의 리소스 및 클러스터의 기타 오브젝트를 가져오려면 RBAC가 있어야 스크랩된 메트릭에 라벨을 올바르게 설정해야 합니다. 기본 서비스 이름은 < collector_name>-targetal Cryostat입니다.
4
Prometheus PodMonitorServiceMonitor 사용자 정의 리소스와의 통합을 활성화합니다.
5
Prometheus ServiceMonitor 사용자 정의 리소스의 라벨 선택기입니다. 비어 있는 경우 모든 서비스 모니터를 활성화합니다.
6
Prometheus PodMonitor 사용자 정의 리소스의 라벨 선택기입니다. 비어 있는 경우 모든 Pod 모니터를 활성화합니다.
7
최소 빈 scrape_config: [] 구성 옵션이 있는 Prometheus 수신자.

대상 al Cryostat 배포에서는 Kubernetes API를 사용하여 클러스터에서 관련 오브젝트를 가져오므로 사용자 지정 RBAC 구성이 필요합니다.

대상 al Cryostat 서비스 계정에 대한 RBAC 구성

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: otel-targetallocator
rules:
  - apiGroups: [""]
    resources:
      - services
      - pods
    verbs: ["get", "list", "watch"]
  - apiGroups: ["monitoring.coreos.com"]
    resources:
      - servicemonitors
      - podmonitors
    verbs: ["get", "list", "watch"]
  - apiGroups: ["discovery.k8s.io"]
    resources:
      - endpointslices
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: otel-targetallocator
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: otel-targetallocator
subjects:
  - kind: ServiceAccount
    name: otel-targetallocator 1
    namespace: observability 2

1
대상 al Cryostat 서비스 계정의 이름입니다.
2
대상 서비스 계정의 네임스페이스입니다.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.