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

[gateway] [management-api] Healthcheck #543

Closed
lusoalex opened this Issue Apr 19, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@lusoalex

lusoalex commented Apr 19, 2017

Hello,

Context

As soon as an API consumer is meeting a problem, they tend to say first that the problem come from the api management solution (as the response is delivered from the gateways).

Plus as "Product Owner" of the gravitee solution, i'll be in charge to monitor and also debug sometimes the solution, if a component (the repository for example) fails, how can i found the issue quickly?

Suggestion

In order to be able to do a quick diagnostic of the gateway and/or the management api, we advise that these components implements a healthcheck endpoint.

For example for the api management, when i call the healthcheck endpoint, it will return something like :

{
  "oauth-server": {
    "healthy": true
  },
  "repository": {
    "healthy": true
  },
  "cache": {
    "healthy": true
  },
  "host-info": {
    "healthy": true,
    "message": "mgtapi.hosting.com#INSTANCE01#PRODUCTION#EUROPE#1.4.0"
  },
  "idp-token": {
    "healthy": true
  }
}

If everything is ok, the status code is 200, but as soon as at least one component is unhealthy, then the status code will be 500.

For example :

{
  "oauth-server": {
    "healthy": true
  },
  "repository": {
    "healthy": true
  },
  "cache": {
    "healthy": true
  },
  "host-info": {
    "healthy": true,
    "message": "mgtapi.hosting.com#INSTANCE01#PRODUCTION#EUROPE#1.4.0"
  },
  "idp-token": {
    "healthy": false,
    "message":"invalid jwt signature"
  }
}

The healthcheck endpoint will require an authentication header (that must be checked too, as the Authentication Server is part of the management api components)

You can have a look to http://metrics.dropwizard.io/, they provide some components health check implementations.

Regards,
Alexandre.

@brasseld brasseld changed the title from [gateway][Management api] Healtcheck to [gateway] [management-api] Healthcheck Apr 20, 2017

@brasseld brasseld added this to the 1.8.0 milestone Jun 28, 2017

@brasseld brasseld self-assigned this Jun 28, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Jul 4, 2017

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 4, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Jul 4, 2017

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 4, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Jul 7, 2017

NicolasGeraud added a commit to gravitee-io/gravitee-gateway that referenced this issue Jul 7, 2017

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 7, 2017

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