程序员的公众号:源1024,获取更多资料,无加密无套路!
最近整理了一份大厂面试资料《史上最全大厂面试题》,Springboot、微服务、算法、数据结构、Zookeeper、Mybatis、Dubbo、linux、Kafka、Elasticsearch、数据库等等
获取方式: 关注公众号并回复 666 领取,更多内容持续奉上
添加maven依赖
<!--actuator 监控-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!--适配prometheus-->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
application.yml配置暴露端点
#暴露指定端点
#Prometheus springboot监控配置
management:
endpoints:
web:
exposure:
include: '*'
metrics:
export:
prometheus:
enabled: true
prometheus.yml配置
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "demo-boot"
metrics_path: "actuator/prometheus"
static_configs:
- targets: ["localhost:8080"]
启动prometheus
配置grafana看板,导入12900
grafana面板
系列文章索引
MyBatis的插件能在哪些地方进行拦截?
了解MyBatis的缓存机制吗
面试官:谈谈对volatile的理解
Spring中用到了哪些设计模式
面试官:说一下SQL的执行过程
线程池的工作原理