Duansg commented on issue #3757:
URL: https://github.com/apache/hertzbeat/issues/3757#issuecomment-3290277616

   > 1. I tested it and found that if I fire a new alert, it will indeed wait 
for the `wait time` before triggering the alarm. However, if I delete the alarm 
in the `alarm center` and trigger it again, it will only wait for 10~20s to 
send notification no matter how long I set the 'wait time'. Is this by design 
or a bug?
   > 2. I set `repeat interval`, but if no new alarm is triggered, there will 
be no repeat notification. This seems different from the description in the 
above figure.
   
   1. I recently reviewed the current code design, and the existing logic 
complies with specifications. After the initial notification, any subsequent 
alerts should have a wait time of `groupInterval`. Meanwhile, `groupWait` only 
handles the first notification.
   
     The current `group_wait` decision logic:
     ```
     // First wait time reached
     if (cache.getLastSendTime() == 0 && now - cache.getCreateTime() >= 
groupWait) {
         return true;
     }
     ```
   
   2. The `repeatInterval` is only checked if there are `firing` alerts in the 
current alert group. It also sets the last repeat time for the next 
`repeatInterval` determination.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to