Healthcheck URL for Kibana is not working

Hi ROR Folks,

I have read the documentation for ROR Kibana , it suggests to whitelist api/stats. I have done that.

readonlyrest:
ssl:
  ....
  allowed_protocols: [TLSv1.2]
  ....
  readonlyrest_kbn.whitelistedPaths: [".*/api/stats$"]

curl command still fails by redirecting to “/login”. I am hitting Kibana without reverse-proxy.

Any help?

This works for me

readonlyrest_kbn.whitelistedPaths: [".*api/stats$", ".*api/status$"]
$ curl -vvv  localhost:5601/k/api/stats 
*   Trying 127.0.0.1:5601...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 5601 (#0)
> GET /k/api/stats HTTP/1.1
> Host: localhost:5601
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
....

and

$ curl -vvv  localhost:5601/k/api/status 
*   Trying 127.0.0.1:5601...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 5601 (#0)
> GET /k/api/status HTTP/1.1
> Host: localhost:5601
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
...

Thanks for the response Simone, what is /k ?
Is that the basepath in Kibana?

curl -v http://127.0.0.1:5600/api/stats
* About to connect() to 127.0.0.1 port 5600 (#0)
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 5600 (#0)
GET /api/stats HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:5600
Accept: */*
>
< HTTP/1.1 302 Found
< location: /login?nextUrl=/api/stats
< kbn-name: kibana
< kbn-xpack-sig: bddae84c3a013c22079aef7faa7b8996
< content-type: text/html; charset=utf-8
< cache-control: no-cache
< content-length: 0
< Date: Fri, 15 May 2020 13:07:36 GMT
< Connection: keep-alive
<
* Connection #0 to host 127.0.0.1 left intact

Do I have the Whitelist at the right place? Is it possible to post the sample of ROR yml

Ohh only now I get what you did. You put that setting in readonlyres.yml instead of kibana.yml!

And yes, in my Kibana dev environment I have base path /k sorry didn’t mention :slight_smile:

I got it, it’s my bad, I overlooked that.
I made a change in kibana.yml and its behaving as expected.

Thanks for your help.

1 Like