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 deriving metrics from logs use case to Data Prepper #6248

Merged
merged 29 commits into from
Jul 3, 2024
Merged

Conversation

vagimeli
Copy link
Contributor

@vagimeli vagimeli commented Jan 23, 2024

Description

Add deriving metrics from logs use case to Data Prepper

Issues Resolved

Closes #6429

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli
Copy link
Contributor Author

@dlvenable This use case PR is ready for your review at availability. Thank you, Melissa

@vagimeli vagimeli added 3 - Tech review PR: Tech review in progress and removed 2 - In progress Issue/PR: The issue or PR is in progress. labels Jan 24, 2024
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli
Copy link
Contributor Author

vagimeli commented Mar 6, 2024

@dlvenable At your availability, will you review this use case? It's one of the two last use cases we're transferring from OpenSearch Ingestion. Thank you, Melissa

@vagimeli
Copy link
Contributor Author

vagimeli commented Apr 3, 2024

@dlvenable At your availability, will you review this use case? It's one of the two last use cases we're transferring from OpenSearch Ingestion. Thank you, Melissa

Hi @dlvenable, Is it possible to review this PR by end of week? We need to get this done to address feedback in the benchmark study. Thank you.

@vagimeli vagimeli requested a review from epugh as a code owner April 3, 2024 20:34
@vagimeli
Copy link
Contributor Author

vagimeli commented Apr 9, 2024

@dlvenable Following up to get your tech review on this use case carryover from OpenSearch Service Ingestion to Data Prepper. Once we have your approval, I can move this forward to editorial and get it published.

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli
Copy link
Contributor Author

@dlvenable Thanks for your review. I've accepted your changes. Do we have any other outstanding items to address before merging?

@hdhalter hdhalter added backport 2.14 PR: Backport label for 2.14 and removed backport 2.13 PR: Backport label for 2.13 labels May 16, 2024
@vagimeli vagimeli added Needs SME Waiting on input from subject matter expert and removed 5 - Editorial review PR: Editorial review in progress labels Jun 10, 2024

# Deriving metrics from logs

You can use Data Prepper to derive metrics from logs. The following example pipeline receives incoming logs using the [`http` source plugin]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/configuration/sources/http-source) and the [`grok` processor]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/configuration/processors/grok/). It then uses the [`aggregate` processor]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/configuration/processors/aggregate/) to extract the metric bytes aggregated during a 30-second window and derives histograms from the results.
Copy link
Member

Choose a reason for hiding this comment

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

This writes data to two indexes - one with un-aggregated events and the other derived metrics.

Can we clarify somewhere? You mention below how we use two pipelines. But, maybe we can make this end result more explicit.

vagimeli added 2 commits June 26, 2024 12:04
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

The following example pipeline receives incoming logs using the [`http` source plugin]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/configuration/sources/http-source) and the [`grok` processor]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/configuration/processors/grok/). It then uses the [`aggregate` processor]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/configuration/processors/aggregate/) to extract the metric bytes aggregated during a 30-second window and derives histograms from the results.

This pipeline writes data to two different OpenSearch indexes:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dlvenable Please review the text added at lines 14--27 and let me know if these additions address your feedback and are accurate. Thank you.

vagimeli added 2 commits June 28, 2024 12:20
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
@vagimeli vagimeli merged commit a838228 into main Jul 3, 2024
6 checks passed
@vagimeli vagimeli deleted the metrics-logs branch July 3, 2024 18:49
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 3, 2024
* Add use case to Data Prepper

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Add content

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Copy edits

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: David Venable <dlv@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: David Venable <dlv@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

---------

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: David Venable <dlv@amazon.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
(cherry picked from commit a838228)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
leanneeliatra pushed a commit to leanneeliatra/opensearch-documentation-website-forl that referenced this pull request Jul 24, 2024
…roject#6248)

* Add use case to Data Prepper

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Add content

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Copy edits

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: David Venable <dlv@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: David Venable <dlv@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

---------

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: David Venable <dlv@amazon.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: leanne.laceybyrne@eliatra.com <leanne.laceybyrne@eliatra.com>
sandervandegeijn pushed a commit to sandervandegeijn/documentation-website that referenced this pull request Jul 30, 2024
…roject#6248)

* Add use case to Data Prepper

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Add content

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Copy edits

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: David Venable <dlv@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: David Venable <dlv@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

* Update _data-prepper/common-use-cases/metrics-logs.md

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>

---------

Signed-off-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: David Venable <dlv@amazon.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Sander van de Geijn <sandervandegeijn@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.14 PR: Backport label for 2.14 Content gap data-prepper Needs SME Waiting on input from subject matter expert
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Updates to ingestion/Data Prepper documentation
4 participants