Skip to content

Conversation

@benji2k2
Copy link

📋 Overview

Problem: Docker-Containers in state "unhealthy" are currently marked as "PENDING". Therefore no notification will be send.

With this change the monitor throws an error, if container is unhealthy - in PENDING-State there will be no notification. Setting container DOWN in this state is also wrong. Throwing an error results in notifiing after configured number or retries. Best solution so far for me, works well here in my setup.

There was already a PR adressing this problem (#4372), but this solution is not a good one. There are also "running" containers marked as down.

🛠️ Type of change

  • 🐛 Bugfix (a non-breaking change that resolves an issue)
  • ✨ New feature (a non-breaking change that adds new functionality)
  • ⚠️ Breaking change (a fix or feature that alters existing functionality in a way that could cause issues)
  • 🎨 User Interface (UI) updates
  • 📄 New Documentation (addition of new documentation)
  • 📄 Documentation Update (modification of existing documentation)
  • 📄 Documentation Update Required (the change requires updates to related documentation)
  • 🔧 Other (please specify):
    • Provide additional details here.

📄 Checklist

  • 🔍 My code adheres to the style guidelines of this project.
  • 🦿 I have indicated where (if any) I used an LLM for the contributions
  • ✅ I ran ESLint and other code linters for modified files.
  • 🛠️ I have reviewed and tested my code.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • ⚠️ My changes generate no new warnings.
  • 🤖 My code needed automated testing. I have added them (this is an optional task).
  • 📄 Documentation updates are included (if applicable).
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 🧰 Dependency updates are listed and explained.
  • 📚 I have read and understood the Pull Request guidelines.

Throw an error, if container is unhealthy - in PENDING-State there is no notification. Setting container DOWN in this state is also wrong. Throwing an error results in notifiing after configured number or retries. Best solution so far for me.
@CommanderStorm
Copy link
Collaborator

Does this work correctly with retries?

Otherwise, a container could be start-looping and you would not know...

@benji2k2
Copy link
Author

It is also possible to add "starting" to the "throw Error"-block to determine errors at startup (but then you have to set for example 3 retries with 60 seconds, because "starting" is a valid state for some time. But for me "starting" is definitely a more valid state than "unhealthy". When a container is "unhealthy" there is definitely something wrong with it.
With the current solution in this repo, i get no notification because of the "PENDING"-state. Therefore my solution is better than the current one, because i have some containers with healty-checks and want to become notified when they are goint to "unhealthy".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kuma reports unhealthy docker containers as PENDING, not DOWN

2 participants