可以参考下官网https://ci.apache.org/projects/flink/flink-docs-release-1.8/monitoring/historyserver.html
1:配置conf/flink-conf.yaml文件,修改参数如下:
flink job运行完成后的日志存放目录
jobmanager.archive.fs.dir: hdfs://nameservice1/flink/
flink history进程所在的主机
historyserver.web.address: 10.244.161.34
flink history进程的占用端口
historyserver.web.port: 8083
flink history进程页面展示读取的hdfs目录
historyserver.archive.fs.dir: hdfs://nameservice1/flink/
刷新受监视目录的时间间隔(以毫秒为单位)
historyserver.archive.fs.refresh-interval: 1000
2:启动:
bin/historyserver.sh (start|start-foreground|stop)
3:json响应范例:
http://hostname:port/jobs/7684be6004e4e955c2a558a9bc463f65/exceptions
.
/config
/jobs/overview
/jobs/<jobid>
/jobs/<jobid>/vertices
/jobs/<jobid>/config
/jobs/<jobid>/exceptions
/jobs/<jobid>/accumulators
/jobs/<jobid>/vertices/<vertexid>
/jobs/<jobid>/vertices/<vertexid>/subtasktimes
/jobs/<jobid>/vertices/<vertexid>/taskmanagers
/jobs/<jobid>/vertices/<vertexid>/accumulators
/jobs/<jobid>/vertices/<vertexid>/subtasks/accumulators
/jobs/<jobid>/vertices/<vertexid>/subtasks/<subtasknum>
/jobs/<jobid>/vertices/<vertexid>/subtasks/<subtasknum>/attempts/<attempt>
/jobs/<jobid>/vertices/<vertexid>/subtasks/<subtasknum>/attempts/<attempt>/accumulators
/jobs/<jobid>/plan