tencent cloud

이 페이지는 현재 영어 만 지원하며보고있는 언어를 준비 중입니다.
关闭
전체 제품 문서
TDMQ for CKafka
Connecting to Prometheus
마지막 업데이트 시간:2024-11-07 14:49:02
Connecting to Prometheus
마지막 업데이트 시간: 2024-11-07 14:49:02

Overview

By default, a CKafka Pro Edition instance allows connection with external monitoring services for instance monitoring through the provided access point, including monitoring metrics of open-source Kafka such as unsynced replicas and incoming message rate.
CKafka Pro Edition instances currently provide Prometheus to scrape the metric information of broker nodes, including basic monitoring metrics such as CPU, memory usage, and system load, as well as the metrics exposed by the broker's JMX.

Directions

1. Log in to the CKafka console.
2. Select Instance List on the left sidebar and click the ID of the target instance to enter its basic information page.
3. Click Get Monitoring Target in the top-right corner of the Prometheus Monitoring module and select the VPC and subnet.
4. Click Submit to obtain a set of monitoring targets.

5. In the Prometheus Monitoring instance, click Retrieve again in the top-right corner to delete the current monitoring addresses under the existing network.

6. Click Confirm to retrieve the monitoring targets again.

7. Download Prometheus and configure the monitoring scrape address.
7.1 Enter the directory of the Prometheus package and run the following command to decompress it.
tar -vxf prometheus-2.30.3.linux-amd64.tar.gz
7.2 Modify the prometheus.yml configuration file by adding the jmx_exporter and node_exporter scrape tasks.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["localhost:9090"]

- job_name: "broker-jmx-exporter"
scrape_interval: 5s
metrics_path: '/metrics'
static_configs:
- targets: ['10.x.x.0:60001','10.x.x.0:60003','10.x.x.0:60005']
labels:
application: 'broker-jmx'
- job_name: "broker-node-exporter"
scrape_interval: 10s
metrics_path: '/metrics'
static_configs:
- targets: ['10.x.x.0:60002','10.x.x.0:60004','10.x.x.0:60006']
labels:
application: 'broker-node'
Here, broker-jmx-exporter is the tag configured for the jmx metric of the broker scraped by Prometheus, Targets contains the information of the mapped port, broker-node-exporter is the tag configured for the basic metrics of the node of the scraped broker, and scrape_interval is the frequency of scraping metric data.
7.3 Start Prometheus.
./prometheus --config.file=prometheus.yml --web.enable-lifecycle
7.4 Open the UI provided by Prometheus to check whether the connected targets are normal by entering http://localhost:9090 in the browser for example.

7.5 Confirm that all targets are in UP status.

If the targets are in DOWN status, check whether the network is accessible or check the Error option at the end of the status bar for the cause.
8. Query the monitoring metric data.
Click Graph, enter a metric name such as node_memory_MemAvailable_bytes, and click Execute to view the monitoring data.

문제 해결에 도움이 되었나요?
더 자세한 내용은 문의하기 또는 티켓 제출 을 통해 문의할 수 있습니다.
아니오

피드백

문의하기

고객의 업무에 전용 서비스를 제공해드립니다.

기술 지원

더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

연중무휴 24시간 전화 지원
中国香港
+852 800 906 020 (無料)
アメリカ
+1 844 606 0804 (無料)
イギリス
+44 808 196 4551 (無料)
カナダ
+1 888 605 7930 (無料)
オーストラリア
+61 1300 986 386 (無料)
EdgeOne ホットライン
+852 300 80699
ローカルサービスホットラインが続々追加中です