flink监控指标大屏搭建
Flink Metrics
Flink12
metrics.reporters: prom metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter metrics.reporter.prom.port: 9213-9214
Flink17配置
和flink12的配置方式不同
jobmanager.rpc.address: flink-node1 jobmanager.rpc.port: 6123 jobmanager.memory.process.size: 4096m jobmanager.memory.jvm-metaspace.size: 2048m taskmanager.memory.task.heap.size: 20480m taskmanager.memory.managed.size: 1024m taskmanager.memory.framework.off-heap.size: 2048m taskmanager.memory.jvm-metaspace.size: 2048m taskmanager.numberOfTaskSlots: 300 parallelism.default: 1 state.checkpoints.num-retained: 2 jobmanager.execution.failover-strategy: region rest.bind-address: 0.0.0.0 io.tmp.dirs: /home/taishi/nfsdata/flink/flink-temp historyserver.web.tmpdir: /home/taishi/nfsdata/flink/flink-web-tmp jobmanager.archive.fs.dir: file:///home/taishi/nfsdata/flink/flink-history historyserver.web.port: 8882 historyserver.archive.fs.dir: file:///home/taishi/nfsdata/flink/flink-history env.java.home: /usr/lib/java/jdk1.8.0_191 web.upload.dir: /home/taishi/nfsdata/flink/flink-web-jar metrics.reporters: prom #metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter #metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporter metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory metrics.reporter.prom.port: 9213-9214 classloader.check-leaked-classloader: false restart-strategy.fixed-delay.attempts: 3 restart-strategy.fixed-delay.delay: 10s restart-strategy: fixed-delay cluster.evenly-spread-out-slots: true env.java.opts: -Dlog4j2.formatMsgNoLookups=true
调试方式
查看flink启动的详细日志
展示监控大屏异常
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={exported_job="tf_flinkmonitor09cd6b3d26e1751eaa32dc1cb4371ec3"}'
正常展示大屏数据
1.删除多余的job
2.增加指标查询过滤条件
本文来自博客园,作者:不懂123,转载请注明原文链接:https://www.cnblogs.com/yxh168/p/17790291.html