1 SLS JVM监控大盘

Dashboard

Dashboard for Micrometer instrumented applications (Java, Spring Boot, Micronaut)
Last updated: a month ago

Downloads: 218

Reviews: 4

  • micrometer_grafana1.png
    micrometer_grafana1.png
  • image.png
    image.png

基于https://grafana.com/grafana/dashboards/4701 修改

SLS JVM监控大盘

用于Spring Boot应用, 可采集JVM, Tomcat, 进程等监控指标 详细教程请查看: https://developer.aliyun.com/article/770726

配置步骤

  1. 在pom.xml中添加依赖:
<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
 </dependency>
<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-prometheus</artifactId>
    <version>1.1.3</version>
</dependency>
<!-- 可选, 用于进程内存使用图表 -->
        <dependency>
            <groupId>io.github.mweirauch</groupId>
            <artifactId>micrometer-jvm-extras</artifactId>
            <version>0.2.0</version>
        </dependency>

  1. 修改spring boot配置(application.yml)
server:
  port: 8080
spring:
  application:
    name: spring-demo
management:
  endpoints:
    web:
      exposure:
        include: 'prometheus' # 暴露/actuator/prometheus
  metrics:
    tags:
      application: ${spring.application.name} # 暴露的数据中添加application label

  1. 在Prometheus中增加采集
global:
  scrape_interval: 15s
scrape_configs:
  - job_name: "spring-demo"
    metrics_path: "/actuator/prometheus"
    static_configs:
    - targets: ["localhost:8080"]
  1. 通过remote write 写入SLS的时序存储

https://help.aliyun.com/document_detail/171781.html

  1. Grafana中添加数据源

https://help.aliyun.com/document_detail/173903.html

CHANGELOG:

v0.1(2020-08-19): initial upload

Dependencies: