mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Lower heartbeat interval when monitor is DOWN? #2786
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#2786
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Vincent-HD on GitHub (Nov 13, 2023).
⚠️ Please verify that this bug has NOT been raised before.
🛡️ Security Policy
📝 Describe your problem
I would like the possibility to lower the heartbeat interval when a monitor is marked as
DOWN.For example, here I have an Interval of 30 min betweens checks and 60 sec x 3 on pending. But as soon as it is marked as
DOWN, it checks every 30 min again, can we change that behaviour?It's useful if I don't want to “spam” our websites with checks, but I want to be able to be notified as soon as I want when a monitor is back up
So it would be, for example:
UPPENDINGand max 3 timesDOWNThank you 👍
📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23.1
💻 Operating System and Arch
Ubuntu 20.04.5
🌐 Browser
Vivaldi 6.4.3160.42
🐋 Docker Version
23.0.0
🟩 NodeJS Version
No response
@chakflying commented on GitHub (Nov 13, 2023):
Interesting, I think it would be more reasonable if the retry interval applies to down status as well.
@louislam commented on GitHub (Nov 13, 2023):
Actually true, don't know why didn't think about it.
@doitlikejustin commented on GitHub (Jan 4, 2024):
+1 for this!
@CommanderStorm commented on GitHub (Jan 4, 2024):
@doitlikejustin
Please refrain from posting
+1/ requests for updates things on issues, as this makes issue-management harder.Issues are for discussing what needs to be done how by whom.
We use 👍🏻 on issues to prioritise work, as always: Pull Requests welcome.
@neelbhanushali commented on GitHub (Feb 11, 2024):
@louislam
PENDING,UP,DOWN) correctlyOP)OPwants to change the behavior where the next action taken afterDOWNstatus isHit everyHeartbeat IntervalDOWNtoUP; similar to howHeartbeat Retry Intervalcontrols transitioning fromPENDINGtoUPafter a failure.Flowchart
Flow Chart Details
PENDING,UP,DOWN)@CommanderStorm commented on GitHub (Feb 11, 2024):
I have edited the diagram1 to hopefully clear the question a bit up (inlining, clarifying).
In terms of correctness of the diagram:
Upside Down Mode=> this just reverses what is considered successfulRetries-counter is reset onDOWNIn terms of proposal:
Reusing the
Heartbeat Retry IntervalforDOWNbeats (as suggested by @chakflying) seems intuitive enough. I don't think another setting needs to be added.In any case, I think such adjustments might benefit if made after all monitors have been moved into their file (i.e. from
monitor.jstomonitor-types/*.js). Currently, reasoning about this is quite complicated, as can be seen by your comment.⇒ If somebody wants to extract one of the monitors and test that it still works, our contribution guide can be found here
A thing why I am also not quite confident in this area is that the state model is largely untested. Testing of monitors (as closely related to the state mechanism) is something that we might be able to achieve via https://github.com/louislam/uptime-kuma/pull/4451, but currently I have not found the time to investigate this.
The ability to have mermaid diagrams is very handy. ❤️ ↩︎
@neelbhanushali commented on GitHub (Feb 11, 2024):
@CommanderStorm
For the case @Vincent-HD mentioned, another field would be handly
However, I totally agree
Modifying @Vincent-HD case as below can be a win-win
I'm willing to send a PR for this
I've gone through the Contribution Guidelines
I will be creating my branch from
masterand will be sending the PR back tomasterconsidering this as a new featureLet me know if I need to switch to
1.23.X