可以參考下官網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