Skip to content
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

Add OpenSearch to source identification #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schisamo
Copy link

@schisamo schisamo commented Dec 20, 2023

What does this PR do?

Adds support for identifying the source of OpenSearch logs from Cloudwatch log groups. More on OpenSearch logs can be found at: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createdomain-configure-slow-logs.html

Motivation

If forwarded to Datadog, the source identification for these currently defaults to cloudwatch

Testing Guidelines

A new test has been added.

Additional Notes

I'm not sure if the returned source should be elasticsearch or opensearch. I know from reading the docs Datadog knows how to parse ElasticSearch logs (assuming when source:elasticsearch is set on a log event) but I'm not sure if OpenSearch logs are different enough to need to parse differently (and if Datadog has some out of the box parsing rules for source:opensearch.

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

# e.g. /aws/OpenSearchService/domains/*/ES_APPLICATION_LOGS
# e.g. /aws/OpenSearchService/domains/*/AUDIT_LOGS
if log_group.startswith("/aws/opensearchservice/domains/"):
return "elasticsearch"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the returned source should be elasticsearch or opensearch. I know from reading the docs Datadog knows how to parse ElasticSearch logs (assuming when source:elasticsearch is set on a log event) but I'm not sure if OpenSearch logs are different enough to need to parse differently (and if Datadog has some out of the box parsing rules for source:opensearch.

@schisamo
Copy link
Author

schisamo commented Jan 8, 2024

Is anyone watching MRs in this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant