uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

New Notification: Slow Response Time

Open pemassi opened this issue 1 year ago • 7 comments

Description

Fixes #1813

This new notification is notifying when the heartbeat is slower than a set threshold. I believe this will help the back-end developer to solve the problem before users meet slow site.

Type of change

  • User interface (UI)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I ran ESLint and other linters for modified files
  • [x] I have performed a self-review of my own code and tested it
  • [x] I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
  • [x] My changes generate no new warnings

Screenshots (if any)

image

Need Help

This is the first contribution! I need help with option naming for the user.

  1. Calc Method
image

The response time is calculated with data corresponding to the time range and Calc Method. For example, Calc Method is max, it will find the max value of data and compare it with a threshold.

  1. Threshold
image

I think this is perfect wording for this option.

  1. Time Range
image

Time Range will be used to get data. Gets the latest data that corresponds to the time range.

pemassi avatar Jul 08 '22 14:07 pemassi

This is looking good. For the naming of calc method, I would personally just change it to the full version (Calculation method) and then perhaps add a note underneath explaining what it does, like you did for threshold

Computroniks avatar Jul 08 '22 16:07 Computroniks

@Computroniks Thanks for helping. I have changed the naming and added some descriptions.

image

pemassi avatar Jul 09 '22 04:07 pemassi

@Computroniks Thanks, I have applied your suggestion.

pemassi avatar Jul 12 '22 03:07 pemassi

Anything we can do to help get this merged?

leofidus avatar Dec 06 '22 15:12 leofidus

This is a really great feature, I tested it and it works as expected, the only thing missing is the visual display of a slow response time on the UI, as mentioned here.

rblee1 avatar Dec 21 '22 08:12 rblee1

Is the threshold can be a delta between the mean response time on the N latest response times and the latest one ? Or determined by regression ?

dada051 avatar Dec 21 '22 14:12 dada051

@rblee1 I am not good at designing UI, so someone may help make UI for this notification after this PR is merged.

@dada051 There are two, maximum and average between the given time range.

pemassi avatar Dec 22 '22 07:12 pemassi

Merged the code.

But I found that the notification will be kept sending for each beat. I don't know whether we should limit this or not.

louislam avatar Feb 02 '23 15:02 louislam

I don't know whether we should limit this or not.

My opinion, yes. At most every 5 beats or something like that, as sometimes response time problems are solved by themselves. Having it at each beat is a bit overkill I think.

solracsf avatar Feb 20 '23 18:02 solracsf

Any updates regarding this feature? It seems quite useful...

Batnun avatar Mar 08 '23 12:03 Batnun

But I found that the notification will be kept sending for each beat. I don't know whether we should limit this or not.

It definitely should be configurable how often it alerts. You have it on other monitors. The standard should be alert once on fail and on resolve.

olivernz avatar Mar 15 '23 21:03 olivernz

is there any update ?

Natgho avatar Mar 23 '23 14:03 Natgho

I would love to see this added as well. We had a issue just this week that this would have caught.

adamsewell avatar Apr 20 '23 14:04 adamsewell

@louislam hey, is there any update? this feature is really important. Please pay attention.

Natgho avatar May 11 '23 16:05 Natgho

I would love to see this added as well. We had a issue just this week that this would have caught.

+1 to this. Had a site that went to over 17000ms, but it still "responded" so no alert was issued. Please implement this much-needed feature @louislam!!!

NOVACyclist avatar May 22 '23 17:05 NOVACyclist

(The above comment is removed)

Please stop trolling. I had already reviewed and commented here: https://github.com/louislam/uptime-kuma/pull/1878#issuecomment-1413928855, and waiting for @pemassi's opinion.

If you think you would like to work on this pr, you could ask. Otherwise, keep asking for an ETA is just helpless here.

Recap from CONTRIBUTING.md:

Also, please don't rush or ask for ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests.

louislam avatar Jun 01 '23 06:06 louislam

Please stop trolling. I had already reviewed and commented here: #1878 (comment), and waiting for @pemassi's opinion.

If you think you would like to work on this pr, you could ask. Otherwise, keep asking for an ETA is just helpless here.

Recap from CONTRIBUTING.md:

Also, please don't rush or ask for ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests.

Thanks Louis, but it seems like @pemassi is not active since January... https://github.com/pemassi?tab=overview&from=2023-01-01&to=2023-06-01

Batnun avatar Jun 01 '23 09:06 Batnun

This feature seems important to me.

For my part I think that rationalizing the probes would be a good thing.

Have a single HTTP probe that brings together the following probes: HTTP HTTP + keyword HTTP + slow response time

by default no keywords and the response time to 30s.

What do you think? @louislam ?

Mabed

mabed-fr avatar Jun 25 '23 17:06 mabed-fr

Sorry guys, it looks like many people are waiting for this feature. I have been busy days so far, and I now have some free time.

But I found that the notification will be kept sending for each beat. I don't know whether we should limit this or not.

This is what I expected result, but some people might think it could be nosy. Can you guys give some ideas on this? Then, we can vote on this.

  1. Notice only once when Failed and Solved @olivernz
  2. Notice every each beat
  3. Or some ideas

pemassi avatar Jul 15 '23 16:07 pemassi

Personally, I would like to be notified when the ping times are higher than X and then when ping times fall below X. It shouldn't notify on each beat. So what @olivernz said.

adamsewell avatar Jul 15 '23 17:07 adamsewell

Can you guys give some ideas on this

image

This should adhere to the currently configurable state of notifications via reusing the same options. Notifying only once would be possible, but only if this is communicated clearly to our users.

CommanderStorm avatar Jul 15 '23 19:07 CommanderStorm

I think that should be sufficient for a 1st release. Once users get some hands on experience I am sure there will be the odd improvement. And thank you for doing this!

olivernz avatar Jul 15 '23 20:07 olivernz

Follow up on the issue. What's left to be done? I have some time and can help if need be, don't want to jump the queue though :) Nice job, would find it very handy!

jugglingjsons avatar Sep 09 '23 10:09 jugglingjsons

Hi @CommanderStorm, as far as I know, there is already opened PR. Please just fix it for the feature. Thank you for helping :)

Natgho avatar Sep 09 '23 10:09 Natgho

Any change this is getting merged soon?

grovolis avatar Sep 22 '23 10:09 grovolis

Will this be available on all http probes?

mabed-fr avatar Oct 05 '23 12:10 mabed-fr

Any change this is getting merged soon?

As mentioned above: the current implementation is not cutting it, as it would essentially send notifications on every failed attempt and not respect the retry-mechanism. At this point, I think a reattempt is reasonable

CommanderStorm avatar Oct 06 '23 06:10 CommanderStorm

Will this be available on all http probes?

See the files changed => this would be avaliable for all monitors if the problems are adressed

CommanderStorm avatar Oct 06 '23 06:10 CommanderStorm

If I'm reading the above correctly, a new solution needs to be coded that has an option similar to the resend up/down notifications?

image

Something like Resend Notification if Slow Response X times consecutively

That way you could default it to 0, such that you would only get a notification when Failed and Solved. Otherwise you could configure it to notify every time (1) or every x times.

stephenpapierski avatar Oct 26 '23 16:10 stephenpapierski

Closing in favor of #4005 (which is on track to be reviewed in v2.2)

CommanderStorm avatar Dec 07 '23 22:12 CommanderStorm