confluent prometheus 연동

마가·2022년 8월 12일
0

trial-error

목록 보기
5/19

https://www.confluent.io/ko-kr/blog/bring-your-own-monitoring-with-confluent-cloud/
이 링크에 시킨대로 한다.

나는 사용하는게 stable/prometheus 인데
이 경우 extraScrapeConfigs 에 추가해야 prometheus.yml가 변경된다고 하는데..

https://awskrug.github.io/eks-workshop/monitoring/deploy-prometheus/
여기 있는 prometheus-values.yaml 를 사용할 경우 이상하게 반영이 안 된다.

근데 extraScrapeConfigs 바로 윗 줄에

        relabel_configs:
          - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
            action: keep
            regex: true
          - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
            action: replace
            target_label: __metrics_path__
            regex: (.+)
          - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
            action: replace
            regex: ([^:]+)(?::\d+)?;(\d+)
            replacement: $1:$2
            target_label: __address__
          - action: labelmap
            regex: __meta_kubernetes_pod_label_(.+)
          - source_labels: [__meta_kubernetes_namespace]
            action: replace
            target_label: kubernetes_namespace
          - source_labels: [__meta_kubernetes_pod_name]
            action: replace
            target_label: kubernetes_pod_name

가 prometheus.yml 내용물이다보니 그 바로밑에

      - job_name: Confluent Cloud
        metrics_path: /v2/metrics/cloud/export
        params:
          "resource.kafka.id":
            - cluster id
        static_configs:
          - targets:
            - api.telemetry.confluent.cloud
        scrape_interval: 1m
        scrape_timeout: 1m
        honor_timestamps: true
        scheme: https
        basic_auth:
          username: "없어도 될 것 같음"
          password: "따옴표 필수"

를 추가해주면 된다.
scrape_interval 이 1분이다보니 다른 것들처럼 15초마다 업데이트 되지 않는데, 이게 컨플루언트 설정이라 어떻게 할 수가 없다.
수동 쿼리는 1시간에 80번 치면 429 띄우며 막는댄다.


현재 보이는건 이 만큼인데
https://api.telemetry.confluent.cloud/docs/descriptors/datasets/cloud
이 링크에 따르면 있어야 하는 cluster_load_percent 이게 안보인다.
끄앙.

profile
마음 가는 길은 죽 곧은 길

1개의 댓글

comment-user-thumbnail
2022년 8월 12일

그라파나에 이름별로 테이블정렬하는 기능은 15년에 제기되었는데 아직까지 없네...

답글 달기