springboot+prometheus+grafana_Spring
springboot+prometheus+grafana_Spring_02
Actuator是Springboot提供的用来对应用系统进行自省和监控的功能模块,借助于Actuator开发者可以很方便地对应用系统某些监控指标进行查看、统计等。

Spring Boot Actuator可以帮助你监控和管理Spring Boot应用,比如健康检查、审计、统计和HTTP追踪等。所有的这些特性可以通过JMX或者HTTP endpoints来获得。

Actuator同时还可以与外部应用监控系统整合,比如 Prometheus, Graphite, DataDog, Influx, Wavefront, New Relic等。这些系统提供了非常好的仪表盘、图标、分析和告警等功能,使得你可以通过统一的接口轻松的监控和管理你的应用。

Actuator使用Micrometer来整合上面提到的外部应用监控系统。这使得只要通过非常小的配置就可以集成任何应用监控系统。

springboot+prometheus+grafana_Spring_03

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
</dependencies>

springboot+prometheus+grafana_Spring_04
springboot+prometheus+grafana_Spring_05
springboot+prometheus+grafana_Spring_06
springboot+prometheus+grafana_Spring_07
springboot+prometheus+grafana_Spring_08

端点列表

springboot+prometheus+grafana_Spring_09
springboot+prometheus+grafana_Spring_10
springboot+prometheus+grafana_Spring_11
springboot+prometheus+grafana_Spring_12
springboot+prometheus+grafana_Spring_13
springboot+prometheus+grafana_Spring_14
springboot+prometheus+grafana_Spring_15
springboot+prometheus+grafana_Spring_16
springboot+prometheus+grafana_Spring_17

springboot+prometheus+grafana_Spring_18
springboot+prometheus+grafana_Spring_19
springboot+prometheus+grafana_Spring_20
项目配置完数据库
springboot+prometheus+grafana_Spring_21

metrics端点

springboot+prometheus+grafana_Spring_22
springboot+prometheus+grafana_Spring_23

loggers端点

springboot+prometheus+grafana_Spring_24
springboot+prometheus+grafana_Spring_25
springboot+prometheus+grafana_Spring_26
springboot+prometheus+grafana_Spring_27
springboot+prometheus+grafana_Spring_28
springboot+prometheus+grafana_Spring_29
springboot+prometheus+grafana_Spring_30
springboot+prometheus+grafana_Spring_31

info端点

springboot+prometheus+grafana_Spring_32
springboot+prometheus+grafana_Spring_33
springboot+prometheus+grafana_Spring_34
springboot+prometheus+grafana_Spring_35

beans端点

springboot+prometheus+grafana_Spring_36

heapdump端点

springboot+prometheus+grafana_Spring_37
springboot+prometheus+grafana_Spring_38
springboot+prometheus+grafana_Spring_39
springboot+prometheus+grafana_Spring_40

threaddump端点

springboot+prometheus+grafana_Spring_41
springboot+prometheus+grafana_Spring_42

shutdown端点

springboot+prometheus+grafana_Spring_43
springboot+prometheus+grafana_Spring_44


springboot+prometheus+grafana_Spring_45
springboot+prometheus+grafana_Spring_46
springboot+prometheus+grafana_Spring_47
springboot+prometheus+grafana_Spring_48
springboot+prometheus+grafana_Spring_49
springboot+prometheus+grafana_Spring_50
springboot+prometheus+grafana_Spring_51
springboot+prometheus+grafana_Spring_52
springboot+prometheus+grafana_Spring_53
springboot+prometheus+grafana_Spring_54
springboot+prometheus+grafana_Spring_55
springboot+prometheus+grafana_Spring_56
springboot+prometheus+grafana_Spring_57
springboot+prometheus+grafana_Spring_58
springboot+prometheus+grafana_Spring_59
springboot+prometheus+grafana_Spring_60
springboot+prometheus+grafana_Spring_61
springboot+prometheus+grafana_Spring_62

Prometheus安装

官方安装教程地址
https://prometheus.io/docs/prometheus/latest/installation/
springboot+prometheus+grafana_Spring_63
springboot+prometheus+grafana_Spring_64
springboot+prometheus+grafana_Spring_65

global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
    monitor: 'codelab-monitor'

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s

    static_configs:
      - targets: ['localhost:9090']
docker run \
    -p 9090:9090 \
    -v /Users/zhangxm/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
    prom/prometheus

springboot+prometheus+grafana_Spring_66
springboot+prometheus+grafana_Spring_67
springboot+prometheus+grafana_Spring_68
springboot+prometheus+grafana_Spring_69
springboot+prometheus+grafana_Spring_70
springboot+prometheus+grafana_Spring_71
springboot+prometheus+grafana_Spring_72
springboot+prometheus+grafana_Spring_73

Grafana安装

springboot+prometheus+grafana_Spring_74
springboot+prometheus+grafana_Spring_75
springboot+prometheus+grafana_Spring_76
springboot+prometheus+grafana_Spring_77
springboot+prometheus+grafana_Spring_78

Grafana插件

springboot+prometheus+grafana_Spring_79
springboot+prometheus+grafana_Spring_80
springboot+prometheus+grafana_Spring_81
springboot+prometheus+grafana_Spring_82
springboot+prometheus+grafana_Spring_83
springboot+prometheus+grafana_Spring_84