-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logstash+Kibana config flexibility improvements #2531
Logstash+Kibana config flexibility improvements #2531
Conversation
@PMazarovich, thanks for the your contribution! |
docker-compose.yml
Outdated
@@ -63,6 +63,8 @@ services: | |||
container_name: cvat_ui | |||
image: cvat/ui | |||
restart: always | |||
environment: | |||
CVAT_KIBANA_URL: http://localhost:8080/analytics/app/kibana |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the cvat_proxy
service does not use the default CVAT_HOST or port, then Kibana will not be available at http://localhost:8080/analytics/app/kibana, so this setting must be changed consistently. From my point of view, this is not good.
Inside the cvat backend uses a reverse proxy for proxy requests in kibana, I would suggest making this django app customizable and pass CVAT_KIBANA_URL env variable into cvat instead of the current implementation. Do you see any problems with this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not use "default" cvat_proxy
service (also cvat_logstash
, cvat_elasticsearch
and cvat_kibana
), instead all these services from AWS or using Fargate, and accessed via Application Load Balancer. So it is necessary for us to have this cvat_kibana_url inside cvat_ui container, not in cvat one.
Or did I misunderstand something and there is some additional reverse proxy logic there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PMazarovich sorry for the late response
I mean your changes breaks the current approach to setting the cvat hostname with a single env variable (CVAT_HOST). For example, if I want to use anything other than localhost
as the cvat hostname with the default ELK, with your changes, I have to set 2 environment variables accordingly: CVAT_HOST and CVAT_KIBANA_URL.
I just would suggest proxy all requests to kibana independently of kibana URL as it's implemented now.
Also one more issue: regardless on CVAT_KIBANA_URL setting UI displays the Analytics tab as origin URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our case it is impossible to leave only CVAT_HOST variable because AWS kibana is accessible through this path: /_plugin/kibana/
, not this one: /analytics/app/kibana
. That is why I suggest to leave approach from the PR. Of course, you can change this in header.tsx, but, as for me, it is better to create another ENV rather than changing code. As for your notice about href, I'll perform another commit this week, that solves the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Andrey, proposed changes look complicated. IMHO a client should work only with its server and if analytics located somewhere else, the server is expected to proxy request where need. Other approaches over complicate the architecture and configuration.
d1bff15
to
669c223
Compare
Changes with corrections are performed taking into account the wishes of developers and minimized in general. |
@PMazarovich LGTM, could you please add a note to changelog.md about this change? Thanks! |
669c223
to
c73400e
Compare
Changelog updated. |
Motivation and context
It is important to be able to connect to remote instances of Logstash or Kibana. With this changes you can simply configure any address (with or without credentials) via environment variables.
As example you can use this with AWS: for Logstash you can use Fargate, for the rest - Amazon Elasticsearch, which provide access to Kibana by URL.
How has this been tested?
It was tested manually.
Checklist
develop
branch