虽然Prometheus自带了图形监控页面,但是还是比较简单,所以推荐使用更加专业的Grafana
Grafana监控图
wget https://dl.grafana.com/oss/release/grafana-6.0.0-1.x86_64.rpm
sudo yum localinstall grafana-6.0.0-1.x86_64.rpm
sudo service grafana-server start
设置Data Source
设置Data Source
设置Prometheus作为Data Source
(grafana标准方法,新建名字为Prometheus的Dashbaord)
选择Prometheus
设置指标
分别增加3个panel,指标分别是
go_gc_duration_seconds
promhttp_metric_handler_requests_total
go_gc_duration_seconds