Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong heartbeat behavior with push monitor #5639

Open
1 task done
sy6sy2 opened this issue Feb 21, 2025 · 0 comments
Open
1 task done

Wrong heartbeat behavior with push monitor #5639

sy6sy2 opened this issue Feb 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@sy6sy2
Copy link

sy6sy2 commented Feb 21, 2025

πŸ“‘ I have found these related issues/pull requests

No related issue found.

πŸ›‘οΈ Security Policy

Description

I think that the heartbeat feature does not work correctly with push monitors.

We can take this use case:

Monitor settings:

  • Hearbeat interval: 900
  • Retries: 5
  • Heartbeat Retry Interval: 60

Use cases:

  • When everything is working my device push an "ok" status every 900 seconds and uptime if full green. It's ok.
  • If my device goes down my script does not send any "ok" status so uptime turn into orange with "No heartbeat in the time window" before going to red as expected. It's ok.
  • But, if my device explicitly push a "down" status with a script then the heartbeat stuff is still triggered so status bar shows something like this:
    • ok (green)
    • ok (green)
    • ok (green)
    • down (red) (this is my intentional down push thanks to the script)
    • pending (orange) (No heartbeat in the time window)
    • pending (orange) (No heartbeat in the time window)
    • pending (orange) (No heartbeat in the time window)
    • pending (orange) (No heartbeat in the time window)
    • pending (orange) (No heartbeat in the time window)
    • down (red) (No heartbeat in the time window)

And this use case is not correct because for me, we should consider the intentional down push to be a valid heartbeat, in fact, the device just pushed a DOWN status so the device is not "dead". In the case of the push monitor we should trigger the heartbeat countdown only in case we do have any URL push (OK or DOWN) during the specified period.

I hope my explanation to be clear :)

Thanks

πŸ‘Ÿ Reproduction steps

See the use case given in description.

πŸ‘€ Expected behavior

Do no trigger the "Heartbeat pending" stage if monitor is push type and device explicitly pushed a DOWN status.

πŸ˜“ Actual Behavior

The "heartbeat pending" stage is triggered after an explicit DOWN status push.

🐻 Uptime-Kuma Version

1.23.15

πŸ’» Operating System and Arch

Docker compose stack

🌐 Browser

Safari

πŸ–₯️ Deployment Environment

  • Runtime: Docker
  • Database: sqlite
  • Filesystem used to store the database on: Docker bing mount (Debian host)
  • number of monitors: 20

πŸ“ Relevant log output

@sy6sy2 sy6sy2 added the bug Something isn't working label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant