Microgateway health check plugin

Not applicable

Anyone uses the Microgateway's healthcheck plugin?

After I enable the plugin in the configuration file and try to access the endpoint,

for example: http://localhost:8000/healthcheck. I am getting error "no match found for /healthcheck"

Do I still need to configure a mapping in Edge for the endpoint /healthcheck? From the plugin code, it seems that when the URL matches /healthcheck, it will put the stats data in response and return right away.

Thanks

Solved Solved
0 6 1,230
2 ACCEPTED SOLUTIONS

Former Community Member
Not applicable

That's right, you still need need a proxy which exposes that basePath in Edge.

View solution in original post

Not applicable

Thanks Srinandan. If a proxy is needed, how do I map this basePath to backend path? This /healthcheck endpoint should return stats info from MG directly. I don't need this endpoint to reach any backend endpoint.

View solution in original post

6 REPLIES 6

Former Community Member
Not applicable

That's right, you still need need a proxy which exposes that basePath in Edge.

Not applicable

Thanks Srinandan. If a proxy is needed, how do I map this basePath to backend path? This /healthcheck endpoint should return stats info from MG directly. I don't need this endpoint to reach any backend endpoint.

Former Community Member
Not applicable

You don't need a valid target endpoint. You can set it to something like "http://localhost:8080". The call is never forwarded there. The plugin returns the response.

Not applicable

Hello Srinandan: On the same note, we are configuring the Edgemicro in our AWS instance and routing the request to the MG via the AWS ALB. As part of this setup, ALB runs a background check on the health of the MG's before forwarding the traffic. In the current state, AWS ALB can perform healthchecks only on http protocol. As we have enabled Authorization in the MG, it mandates to send the API Key in the healthcheck endpoint as a query parameter instead of the header (sending apikey as header is not supported still in AWS ALB). As the proxies are developed with a header based api key validation, I am trying to find a workaround that would solve both the cases. Can you provide your imputs?

Former Community Member
Not applicable

@vidya,

If you enable the healthcheck plugin before the OAuth plugin in the configuration file, AWS ELB will be able to hit MG without needing API Key or OAuth tokens.

@Srinandan Sridhar : Thanks. It worked. I just added the healthcheck plugin as the first plugin followed by oauth. In the Edge, I configured this edgemicro proxy as a reverse proxy with a dummy target pointing to localhost:8080.