cloudeasy-monitor/src/main/java/com/chinasofti/cloudeasy/api/external/SkyWalkingController.java
cloudeasy-monitor/src/main/java/com/chinasofti/cloudeasy/model/skywalking/AlarmRule.java
cloudeasy-monitor/src/main/java/com/chinasofti/cloudeasy/model/skywalking/AlarmRulesResult.java
cloudeasy-monitor/src/main/java/com/chinasofti/cloudeasy/service/skywalking/AlarmRuleService.java
oap-server/server-alarm-plugin/pom.xml
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/AlarmModuleProvider.java
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/AlarmRulesResult.java
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/AlarmRulesWatcher.java
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/PullAlarmUtil.java
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/Rules.java
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RulesReader.java
oap-server/server-bootstrap/src/main/resources/alarm-settings-backup.yml
oap-server/server-bootstrap/src/main/resources/alarm-settings.yml
oap-server/server-bootstrap/src/main/resources/application.yml
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/alarm/AlarmUtil.java
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java
oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol/alarm.graphqls
skywalking agent配置:
-javaagent:D:\cmsp\code\pre-research\apache-skywalking-apm-es7-8.4.0\apache-skywalking-apm-bin-es7\agent\skywalking-agent.jar -Dskywalking.agent.service_name=test::consumer::123456 -Dskywalking.collector.backend_service=localhost:11800
-javaagent:D:\code\skywalking\apache-skywalking-apm-bin-es7\agent\skywalking-agent.jar -Dskywalking.agent.service_name=test::consumer::123456 -Dskywalking.collector.backend_service=localhost:11800
-Dcheckstyle.skip=true
oap-server不依赖mysql
1.org.apache.skywalking.oap.server.library.server.jetty.JettyServer 加一个filter
post body,继承一个基类,tenantId和get
2.monitor提供告警配置界面保存,并提供配置查询
3.改造org.apache.skywalking.oap.server.core.alarm.provider.AlarmModuleProvider,系统启动查询全量告警配置,定时1分钟调用monitor查询告警配置,条件是上次同步时间戳
刷新到map里
4.告警转发到alarm,调用消息服务通知
5.后台上报,界面查询加租户id
文帅修改的点:
NotifyHandler.java RunningRule.java InstanceTraffic.java
租户隔离修改点:
1.所有服务下拉列表查询返回服务名称,去掉租户id
2.追踪查询结果里,服务名称去掉租户id,查询结果服务名称去掉租户id
3.告警历史信息,在告警入库时修改服务名,去掉租户id
-javaagent:D:\cmsp\code\pre-research\apache-skywalking-apm-es7-8.4.0\apache-skywalking-apm-bin-es7\agent\skywalking-agent.jar -Dskywalking.agent.service_name=test::consumer::123456 -Dskywalking.collector.backend_service=localhost:11800
-javaagent:D:/jacoco-0.8.6/lib/jacocoagent.jar=includes=com.chinasofti.cloudeasy.*,output=tcpserver,port=6000,address=10.100.9.101
标签:src,java,alarm,server,skywalking,main,定制 From: https://www.cnblogs.com/yaoyu1983/p/17439609.html