You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/04/26 08:24:42 UTC

[GitHub] [skywalking] zhl1987 opened a new issue #2530: 5 question in alarm module

zhl1987 opened a new issue #2530: 5 question in alarm module
URL: https://github.com/apache/skywalking/issues/2530
 
 
   1、在RunningRule类的Window内部类中规则触发次数判断重复:在isMatch方法结尾处与checkAlarm方法中均做了触发次数的判断。
     建议去掉其中之一。
   2、在AlarmCore类start方法的启动单例线程中先调用moveTo方法,后判断当前调用时间的秒数是否大于15进行告警规则的判定,会出现判定数据丢失的情况。
     建议将moveTo方法移到后面处理
   3、在AlarmCore类start方法的启动单例线程中调用moveTo方法时,传入的checkTime未将秒数和毫秒数清零,导致moveTo方法中计算分钟数有误差。
      建议在调用moveTo方法时将秒数和毫秒数清零。
   4、在AlarmCore类start方法的启动单例线程中set lastExecuteTime时间时只清零了秒数,未将毫秒数清零,导致在计算lastExecuteTime与执行时间checkTime分钟差时出现误差。
      建议set lastExecuteTime时间时将秒数和毫秒数均清零。
      
   5、在AlarmCore类start方法的启动单例线程中只会在checkTime的秒数大于15秒后才会进行告警规则的判定,且之前有判断lastExecuteTime与checkTim分钟差大于0时,导致每分钟只会执行一次check规则触发判定。
      这个问题不好描述,举个例子说明如下:
       设定告警规则:2分钟内出现2次服务吞吐量大于10,静默时间为0 
             交易时间      交易秒数      交易量
            12:01           ---           12
            12:02           <15            9
            12:02           >15            2
            12:03           <15            10
            
            因启动的单例线程每10秒执行一次,则会在12:03分秒数小于15调用交易时会调用moveTo方法,将01分的数据清掉,所以在12:02和12:03分的判断中均没有触发规则。事实是12:01和12:02分已经触发上述规则了。
            
            建议可将RunningRule类的Window内部类的values属性长度增大一个,在checkAlarm时不判断当前分钟的数据,判断前period时间段数据。
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services