Spark应用监控解决方案--使用Prometheus和Grafana监控Spark应用
Spark任务启动后,我们通常都是通过跳板机去Spark UI界面查看对应任务的信息,一旦任务多了之后,这将会是让人头疼的问题。如果能将所有任务信息集中起来监控,那将会是很完美的事情。 通过S park官网指导文档 ,发现Spark只支持以下sink Each instance can report to zero or more sinks . Sinks are contained in the org.apache.spark.metrics.sink package: ConsoleSink : Logs metrics information to the console. CSVSink : Exports metrics data to CSV files at regular intervals. JmxSink : Registers metrics for viewing in a JMX console. MetricsServlet : Adds a servlet within the existing Spark UI to serve metrics data as JSON data. GraphiteSink : Sends metrics to a Graphite node. Slf4jSink : Sends metrics to slf4j