influxdata / influxdata/influxdb

InfluxDB 2 Cloud doesn't expose /health endpoint at root URL

Open
#19,357 3 comments 1 reaction 1 assignee View on GitHub

@aanthony1243 is already working on this.

Since Oct 27, 2020.

area/api team/compute
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

According to swagger definition the `/health` and `/ready` endpoint should be exposed at root path, but it works only for OSS instances.

https://github.com/influxdata/influxdb/blob/26cf6af07aeb2956ddf5792a31269a94c0f0528e/http/swagger.yml#L2002

__Steps to reproduce:__
List the minimal actions needed to reproduce the behaviour.

1.
```console
curl -i -X GET https://us-west-2-1.aws.cloud2.influxdata.com/health \
-H "Authorization: Token mytoken"
```

__Expected behavior:__
Return `JSON` with health information.
```
HTTP/2 200
date: Tue, 18 Aug 2020 08:28:06 GMT
content-type: application/json; charset=utf-8
content-length: 994
vary: Accept-Encoding
strict-transport-security: max-age=15724800; includeSubDomains

{
"authorizations": "/api/v2/authorizations",
"backup": "/api/v2/backup",
"buckets": "/api/v2/buckets",
"checks": "/api/v2/checks",
"dashboards": "/api/v2/dashboards",
"delete": "/api/v2/delete",
"external": {
"statusFeed": "https://www.influxdata.com/feed/json"
},
"flags": "/api/v2/flags",
"labels": "/api/v2/labels",
"me": "/api/v2/me",
"notificationEndpoints": "/api/v2/notificationEndpoints",
"notificationRules": "/api/v2/notificationRules",
"orgs": "/api/v2/orgs",
"plugins": "/api/v2/telegraf/plugins",
"query": {
"analyze": "/api/v2/query/analyze",
"ast": "/api/v2/query/ast",
"self": "/api/v2/query",
"suggestions": "/api/v2/query/suggestions"
},
"scrapers": "/api/v2/scrapers",
"setup": "/api/v2/setup",
"signin": "/api/v2/signin",
"signout": "/api/v2/signout",
"sources": "/api/v2/sources",
"swagger": "/api/v2/swagger.json",
"system": {
"debug": "/debug/pprof",
"health": "/health",
"metrics": "/metrics"
},
"tasks": "/api/v2/tasks",
"telegrafs": "/api/v2/telegrafs",
"users": "/api/v2/users",
"variables": "/api/v2/variables",
"write": "/api/v2/write"
}
```

__Actual behavior:__
Return `HTML` page:
```
HTTP/2 200
date: Tue, 18 Aug 2020 08:28:19 GMT
content-type: text/html
content-length: 1017
vary: Accept-Encoding
strict-transport-security: max-age=15724800; includeSubDomains
last-modified: Mon, 17 Aug 2020 23:09:22 GMT
vary: Accept-Encoding
etag: "5f3b0e22-3f9"
accept-ranges: bytes

InfluxDB 2.0(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({
'gtm.start': new Date().getTime(),
event: 'gtm.js'
});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-NXMTGSW');

%
```

__Environment info:__

* InfluxDB version: https://us-west-2-1.aws.cloud2.influxdata.com/

__Swagger definition:__

![image](https://user-images.githubusercontent.com/455137/90490091-77a8e200-e13e-11ea-9ef2-a3d795546992.png)

Related to https://github.com/influxdata/influxdb-client-java/issues/143

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.