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

FISH-333 Add Payara HealthCheck Service checkers to MicroProfile Health Readiness Checks #4883

Merged
merged 9 commits into from
Oct 4, 2020

Conversation

MeroRai
Copy link
Member

@MeroRai MeroRai commented Sep 11, 2020

Description

Added Payara HealthCheck Service Checkers to MicroProfile Health Readiness Checks. The set-healthcheck-service-configuration asadmin command has a new options add-to-microprofile-health, which can be used to add a HealthCheck Service Checkers to MicroProfile Health and display its result on the MicroProfile Health endpoint. Below is an example of what the /health/ready endpoint returns:

{
  "status": "UP",
  "checks": [
    {
      "name": "HEAP",
      "status": "UP",
      "data": {
        "Message": "heap: init: 92.00 Mb, used: 204.93 Mb, committed: 332.00 Mb, max.: 455.50 Mbheap%: 45%",
        "HealthCheckStatus": "GOOD"
      }
    },
    {
      "name": "CPU-USAGE",
      "status": "UP",
      "data": {
        "Message": "CPU%: 6.42, Time CPU used: 5 minutes 11 seconds 774 milliseconds",
        "HealthCheckStatus": "GOOD"
      }
    }
  ]
}

Testing

Testing Performed

  • Build test
  • MicroProfile Health TCKS (TODO)

Testing Environment

Zulu JDK 1.8_222 on Elementary OS 0.4.1 Loki with Maven 3.5.4

Documentation

https://docs.payara.fish/community/docs/5.2020.7/documentation/payara-server/health-check-service/asadmin-commands.html#set-healthcheck-service-configuration

@MeroRai MeroRai requested review from jbee and MattGill98 September 11, 2020 10:09
Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

I think the way the bridge or adaptor between Payara and MP health checks is done needs to change. Configuration changes to the newly introduced flag should register or un-register the adaptor in MP health so that the checks can be processed as before without the servlet knowing about any special extra thing that needs to be done.

…egister or un-register of Payara HealthCheck Service Checker into Microprofile Health
@MeroRai MeroRai requested a review from jbee September 29, 2020 14:15
Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

I think using the events is a good solution to link the two health check systems.

Only important comment is the one about NPE, I am pretty sure I have encountered NPEs in the past because options were null at some point before the whole thing is tuned on. So have a look again. Might no longer be the case or apply but in general I'd think the issue should be the same in isEnabled.

Otherwise just some comments for consideration.

Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

Susan an I discussed the wording and he will clarify that the flag refers to MicroProfile. No further comments.

@payara payara deleted a comment from Pandrex247 Oct 3, 2020
@MeroRai
Copy link
Member Author

MeroRai commented Oct 3, 2020

Jenkins test please

@MeroRai
Copy link
Member Author

MeroRai commented Oct 4, 2020

Jenkins test please

@MeroRai MeroRai merged commit d90d20d into payara:master Oct 4, 2020
Pandrex247 pushed a commit to Pandrex247/Payara that referenced this pull request May 4, 2021
Merge pull request payara#4883 from MeroRai/FISH-333
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.

2 participants