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

Improve healthcheck logging #265

Merged
merged 2 commits into from
May 5, 2023
Merged

Conversation

Jberczel
Copy link
Contributor

@Jberczel Jberczel commented May 3, 2023

I've upgraded mrsk from version 0.11.0 to 0.12.0, and since then, the health check has been failing during my deploys.

After investigating, I discovered that my app is using a ruby-slim image that doesn't include curl by default.

I had difficulty tracking down the issue because the healthcheck container is always stopped and removed after a failed health check.

To address this problem, I have made changes to the code that will output the container health log before stopping and removing the health check container.

Example output:

 ERROR {
  "Status": "unhealthy",
  "FailingStreak": 28,
  "Log": [
    {
      "Start": "2023-05-03T18:37:18.671956589Z",
      "End": "2023-05-03T18:37:18.736151422Z",
      "ExitCode": 1,
      "Output": "/bin/sh: 1: curl: not found\n"
    },
    ...

@dhh
Copy link
Member

dhh commented May 4, 2023

cc @kevinmcconnell

Copy link
Collaborator

@kevinmcconnell kevinmcconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @Jberczel 👍

Thanks also for fixing my typo ;)

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.

3 participants