influxdata / influxdata/influxdb
InfluxDB 2 Cloud doesn't expose /health endpoint at root URL
@aanthony1243 is already working on this.
Since Oct 27, 2020.
- 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:__

Related to https://github.com/influxdata/influxdb-client-java/issues/143
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.