使用 PrometheusReporter 去 report metric 信息
发现:9250 端口 没有显示 Availability 和 Checkpointing 这两部分的信息 是需要单独配置吗?在文档里面没有看到相关说明。 我注意到:这两个的 scope 都是 Job (only available on JobManager) 是要在启动时,指定额外的参数吗? 配置如下: flink-conf.yml metrics.reporters: prom metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter metrics.reporter.prom.port: 9250 metrics.system-resource: true docker-compose.yml 局部: services: jobmanager: # image: flink:1.9.0 build: ./job_manager container_name: jobmanager_1.9.0 volumes: - ./prometheus/:/etc/prometheus/ - prometheus_data:/prometheus ports: - "8081:8081" - "9250:9250" expose: - "6123" networks: - back-tier # - host-tier command: jobmanager environment: - JOB_MANAGER_RPC_ADDRESS=jobmanager taskmanager: # image: flink:1.9.0 build: ./task_manager container_name: taskmanager_1.9.0 ports: # - "9001:9001" - "9251:9251" expose: - "6121" - "6122" networks: - back-tier # - host-tier command: taskmanager depends_on: - jobmanager environment: - JOB_MANAGER_RPC_ADDRESS=jobmanager Docker FROM flink:1.9.0 COPY flink-conf.yaml ./conf/ RUN cp ./opt/flink-metrics-prometheus-1.9.0.jar ./lib/ |
你好,
JM 的 metric 应该也会直接 report。 可以考虑缩小下问题范围,是 metrics 还是 reporter 的问题。 例如加个 slf4j reporter [1],看下 JM log 中有没有相应的 metrics,如果有那就是 reporter 的问题。 [1] https://ci.apache.org/projects/flink/flink-docs-release-1.9/monitoring/metrics.html#slf4j-orgapacheflinkmetricsslf4jslf4jreporter Thanks, Biao /'bɪ.aʊ/ On Tue, 22 Oct 2019 at 17:37, Blake <[hidden email]> wrote: > 使用 PrometheusReporter 去 report metric 信息 > 发现:9250 端口 没有显示 Availability 和 Checkpointing 这两部分的信息 > 是需要单独配置吗?在文档里面没有看到相关说明。 > 我注意到:这两个的 scope 都是 Job (only available on JobManager) > 是要在启动时,指定额外的参数吗? > > > > > 配置如下: > flink-conf.yml > metrics.reporters: prom > > metrics.reporter.prom.class: > org.apache.flink.metrics.prometheus.PrometheusReporter > metrics.reporter.prom.port: 9250 > > metrics.system-resource: true > > > > > > > > docker-compose.yml 局部: > services: > jobmanager: > # image: flink:1.9.0 > build: ./job_manager > container_name: jobmanager_1.9.0 > volumes: > - ./prometheus/:/etc/prometheus/ > - prometheus_data:/prometheus > ports: > - "8081:8081" > - "9250:9250" > expose: > - "6123" > networks: > - back-tier > # - host-tier > command: jobmanager > environment: > - JOB_MANAGER_RPC_ADDRESS=jobmanager > taskmanager: > # image: flink:1.9.0 > build: ./task_manager > container_name: taskmanager_1.9.0 > ports: > # - "9001:9001" > - "9251:9251" > expose: > - "6121" > - "6122" > networks: > - back-tier > # - host-tier > command: taskmanager > depends_on: > - jobmanager > environment: > - JOB_MANAGER_RPC_ADDRESS=jobmanager > > > > > Docker > FROM flink:1.9.0 > > COPY flink-conf.yaml ./conf/ > > RUN cp ./opt/flink-metrics-prometheus-1.9.0.jar ./lib/ |
你是不是在同一台机器上开了 job manager 和 taskmanager?但是只填写了一个端口?
可以参考官网 https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/metrics.html#prometheus-orgapacheflinkmetricsprometheusprometheusreporter ,他这里写了端口 port 参数的情况 Biao Liu <[hidden email]> 于2019年11月5日周二 上午11:37写道: > 你好, > > JM 的 metric 应该也会直接 report。 > 可以考虑缩小下问题范围,是 metrics 还是 reporter 的问题。 > 例如加个 slf4j reporter [1],看下 JM log 中有没有相应的 metrics,如果有那就是 reporter 的问题。 > > [1] > > https://ci.apache.org/projects/flink/flink-docs-release-1.9/monitoring/metrics.html#slf4j-orgapacheflinkmetricsslf4jslf4jreporter > > Thanks, > Biao /'bɪ.aʊ/ > > > > On Tue, 22 Oct 2019 at 17:37, Blake <[hidden email]> wrote: > > > 使用 PrometheusReporter 去 report metric 信息 > > 发现:9250 端口 没有显示 Availability 和 Checkpointing 这两部分的信息 > > 是需要单独配置吗?在文档里面没有看到相关说明。 > > 我注意到:这两个的 scope 都是 Job (only available on JobManager) > > 是要在启动时,指定额外的参数吗? > > > > > > > > > > 配置如下: > > flink-conf.yml > > metrics.reporters: prom > > > > metrics.reporter.prom.class: > > org.apache.flink.metrics.prometheus.PrometheusReporter > > metrics.reporter.prom.port: 9250 > > > > metrics.system-resource: true > > > > > > > > > > > > > > > > docker-compose.yml 局部: > > services: > > jobmanager: > > # image: flink:1.9.0 > > build: ./job_manager > > container_name: jobmanager_1.9.0 > > volumes: > > - ./prometheus/:/etc/prometheus/ > > - prometheus_data:/prometheus > > ports: > > - "8081:8081" > > - "9250:9250" > > expose: > > - "6123" > > networks: > > - back-tier > > # - host-tier > > command: jobmanager > > environment: > > - JOB_MANAGER_RPC_ADDRESS=jobmanager > > taskmanager: > > # image: flink:1.9.0 > > build: ./task_manager > > container_name: taskmanager_1.9.0 > > ports: > > # - "9001:9001" > > - "9251:9251" > > expose: > > - "6121" > > - "6122" > > networks: > > - back-tier > > # - host-tier > > command: taskmanager > > depends_on: > > - jobmanager > > environment: > > - JOB_MANAGER_RPC_ADDRESS=jobmanager > > > > > > > > > > Docker > > FROM flink:1.9.0 > > > > COPY flink-conf.yaml ./conf/ > > > > RUN cp ./opt/flink-metrics-prometheus-1.9.0.jar ./lib/ > |
Free forum by Nabble | Edit this page |