-
Notifications
You must be signed in to change notification settings - Fork 288
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
Added new alerter to send alerts to Opensearch #1451
Conversation
Hello, this is an interesting alerter. It looks like it could be made to work with both Elasticsearch and OpenSearch instead of just OpenSearch, since it's already using the Elasticsearch Python SDK. Perhaps it (and its settings) could be renamed to Aside from that discussion, the missing unit tests are important so those should be included. Since you've done a good job breaking the logic into discrete functions it should be relatively light work to add that coverage. We aim for 100% coverage on all new code. A side effect of doing so is it lets the PR reviewers better understand what the inputs and outputs look like for each function. Also, a couple instances of Thanks for taking the time to submit this PR. |
Thank you for your feedback. |
Hello, I updated my patch based on your suggestions.
|
Nice job! Will you please rename the alerter to "indexer" since none of the other alerters have that suffix? Ex:
The class name of IndexerAlerter is fine, so it just the lookup name that needs changed. |
Thanks. Two remaining items:
|
Also, I noticed that there is an inconsistently named property: |
fixed error in shema.yaml related with description of INDEXER
I corrected my little mistakes. |
Looks good. I'll leave this PR open for a few days, for additional comments by the community. |
Thank you. |
Description
Hi.
Problem:
I have a needs to send alerts to the opensearch index.
Solution:
I have added a new alerter to send alerts to Opensearch
Description: Create and manage separately index for all alerts for statistics and report purpose.
Opensearch alerter can be used to create a new alert in existen Opensearch. The alerter supports
custom fields, and observables from the alert matches and rule data.
Required:
opensearch_alert_config
: Configuration options for the alert, see example below for structure.customFields
Fields must be manually added, all of them will exist in the newly created index. You can set own field or use existed field fron match(see example below for structure).index_alerts_name
: This field setup the output index for alerts.One of below is required:
opensearch_connection
: Options the connection details to your instance (see example below for the required syntax Example 1).opensearch_config
: Options for the get connection details to your instance from file (see example below for the required syntax Example 2).Example 1 usage::
Example 2 usage::
Checklist
make test-docker
with my changes.Questions or Comments
unit tests