File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 43
43
- [ 多个节点定时任务如何设置?] ( 多个节点定时任务如何设置.md )
44
44
- [ 如何优雅的进行服务更新发布?] ( 如何优雅的进行服务更新发布.md )
45
45
- [ 网关应该承担什么功能和能力?] ( 网关应该承担什么功能和能力.md )
46
+ - [ 微服务应该有哪些监控点?] ( 微服务应该有哪些监控点.md )
46
47
47
48
48
49
Original file line number Diff line number Diff line change
1
+ 微服务由于服务众多,所以业务的监控是必不可少的,我们在做微服务监控的话,主要做了几个方面的监控
2
+
3
+ ### 监控分类
4
+ - metrics监控
5
+ - trace监控
6
+ - 健康性监控
7
+ - 日志监控
8
+
9
+ ### 监控做法
10
+ - 通过springboot配合micrometer进行使用,底层存储使用prometheus来进行存储
11
+ - prometheus从eureka上面获取服务节点信息,并且每天晚上更新一次
12
+ - 通过prometheus的alter-manager进行报警通知
13
+ - alter-manager把通知发送到一个我们的对接钉钉服务,然后通过这个
14
+ 服务通过钉钉的机器人进行通知
15
+
16
+ ### metrics监控指标
17
+ - 服务qps
18
+ - 服务分位数
19
+ - 服务错误返回数
20
+ - 服务接口请求次数的top
21
+ - 服务接口95%请求时间top
22
+ - cpu使用率
23
+ - cpu个数和负载
24
+ - jvm堆内存/非堆内存
25
+ - jvm线程
26
+ - jvm的类数
27
+ - gc的暂停时间和次数
28
+ - tomcat的活跃线程
29
+ - 数据库连接数
30
+ - 日志行数
31
+ - 业务通过api自己上报的业务数据
32
+
33
+
34
+ ### trace监控指标
35
+ - 通过zipkin来产生唯一的traceid、spanid
36
+ - 产生的数据会通过kafka发送,然后传给下游服务
37
+ - zipkin-server收集数据,存储到es
38
+ - zipkin-web从es获取数据,进行展示
39
+
40
+ ### 健康性检查
41
+ - 通过从eureka获取服务节点,并且从服务请求数据和状态
42
+ - 如果服务状态不健康, 进行报警通知
43
+ - 通过接口查看错误码,错误码达到一定比率,进行报警通知
44
+
45
+ ### 日志监控
46
+ - 通过sentry来监控error日志,对于error日志,则通过邮件或者钉钉进行发送。实时排查服务端异常
You can’t perform that action at this time.
0 commit comments