-
Notifications
You must be signed in to change notification settings - Fork 287
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
Support OpenSearch v1.0.0 #483
Conversation
|
Regarding the documentation question, I don't see any reason not to mention OpenSearch. A line or two saying that the project is OpenSearch compatible somewhere on this page is probably sufficient. |
Seems to be working rather well in my tests at this point |
I'm curious, so I'll ask you a question. In the case of opensearch, can't I get the value of es_client.info () ["version"] ["number"]? .. In addition, I plan to change to elasticsearch-py 8.0.0 when it supports elasticsearch 8, but probably OpenSearch will not be able to connect (the implementation should have been added in elasticsearch-py 7.14.0), so opensearch-py at that time I think it will be necessary to take measures to incorporate. |
@nbrownus it looks like some dictionary accesses need to be modified to use
|
A bug has been embedded. Isn't it terrible? elastalert/create_index.py bug
Please correct.
elastalert/ruletypes.py bug
Please correct.
|
base_test.py Line 848 mock_es.info.return_value = {'version': {'number': '2.0'}} conftest.py Line 70 self.info = mock.Mock(return_value={'status': 200, 'name': 'foo', 'version': {'number': '2.0'}}) Line 92 self.info = mock.Mock(return_value={'status': 200, 'name': 'foo', 'version': {'number': '6.6.0'}}) rules_test.py Line 570, 622, 640, 665, 735, 772 mock_es.return_value.info.return_value = {'version': {'number': '2.x.x'}} |
It is very dangerous if you do not check if it works properly with elasticsearch 7.x as well as opensearch before merging. |
Is there anything else you care about? |
I want to try it first with my ES cluster before it gets merged. If I get time this weekend I'll do that and merge it in if it looks good. |
No concerns from me, thanks! |
I've tested against ES 7.x and did not encounter problems. However, I then tested against a brand new AWS OpenSearch cluster and encountered two problems:
Based on my short time testing I'd say that more work is still needed to allow ElastAlert 2 to work with OpenSearch. But since this is a step forward and isn't breaking existing functionality I'll proceed with the merge. |
Quick follow-up: After reviewing the problem reported in #487 I realize my previous test must have been invalid, and likely wasn't using the correct code from this PR. After correcting the issue in #487 and re-testing I was able to successfully start ElastAlert 2 against another brand new AWS OpenSearch cluster. Both index creation and rule processing were successful, as well as |
Hi, do you @jertel know which permissions I have to provide to the elastalert user? Currently, I gave:
But Elastalert (v 2.2.2) still complains:
I'm using OpenSearch 1.1.0 on premises. |
I don't know because I don't use OpenSearch, but it is rejected when connecting to OpenSearch. I think you should ask questions in the OpenSearch community as follows: It's just a guess from here, but I think it's a problem with setting up OpenSearch security plugins. |
@nsano-rururu , the problem was totally on my side. I was setting "cluster:monitor/main" in the index permissions section insted of cluster's. Thanks anyway. |
Description
Maps OpenSearch (currently v1.0.0) to Elasticsearch v7.10.2 to enable appropriate compatibility
Checklist
make test-docker
with my changes.Questions or Comments
I reviewed the tests and there aren't any covering existing version detection. Happy to add some but that would require some inventing that I assume the maintainers would have a strong opinion about.
I have not modified any documentation, mainly because I am not sure how prominently you would want to voice that this project supports OpenSearch.Closes #482