Skip to content

HTTP 204 returned from /ping endpoint is unsuitable for Google Kubernetes Cloud healthcheck #4935

@noodle-rubrik

Description

@noodle-rubrik

Feature Request

The "/ping" endpoint of influxdb_listener should have an option to return HTTP status code 200

Proposal:

Google Cloud does not allow you to configure the behavior of its health checks, other than the endpoint, it requires a 200 response. This means that the "/ping" endpoint, which seems intended for this sort of use case, can't be used on this cloud provider. The return code should be changed to 200, either by default, or by adding a param to the endpoint, as suggested in a similar issue for influxdb itself.
[1] influxdata/influxdb#9772

Current behavior:

Calling the "/ping" endpoint returns 204. Using "/ping" as your Google HTTP(s) Load Balancer backend's health check fails in a (to me) surprising way. As a workaround, "/query" can be used to return the correct status code, but this is more obtuse, and the behavior of an empty query might change in the future, or consume more resources than a simple ping.

Desired behavior:

If "/ping" can't be configured to return 200 by default, then configuring "/ping?statusCode=200" as the health check should return 200, as proposed in the linked influxdb issue. If that proposal is not accepted, then both implementations of "/ping" should have the same API to request a different status code, so that influxdb_listener is as similar to influxdb as possible.

Use case: [Why is this important (helps with prioritizing requests)]

We are deploying telegraf to GCP as a proxy to forward traffic from a second telegraf instance to influxdb. The influxdb_listener plugin is definitely the right tool for this use case, and we can put this telegraf instance behind an endpoint of our load balancer, as long as we have a health check that returns 200 OK.

Metadata

Metadata

Assignees

Labels

area/influxdbfeature requestRequests for new plugin and for new features to existing plugins

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions