Skip to content

Conversation

@ishleenk17
Copy link
Member

  • Enhancement

Proposed commit message

Below changes are part of this PR:

  1. Made 3 fields optional in the grok pattern
  2. Removed one grok pattern since making the fields optional in the other one handles the scenarios
  3. Added corresponding log files for the new format support

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

Pipeline Tests Run is sufficient for the testing

Related issues

@ishleenk17 ishleenk17 self-assigned this Oct 19, 2023
@ishleenk17 ishleenk17 marked this pull request as ready for review October 19, 2023 09:45
@ishleenk17 ishleenk17 requested a review from a team as a code owner October 19, 2023 09:45
@ishleenk17 ishleenk17 changed the title Apache logformat Support additional log format in Apache Oct 19, 2023
@elasticmachine
Copy link

elasticmachine commented Oct 19, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-19T16:45:06.175+0000

  • Duration: 26 min 39 sec

Test stats 🧪

Test Results
Failed 0
Passed 54
Skipped 0
Total 54

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@ishleenk17
Copy link
Member Author

/test

@elasticmachine
Copy link

elasticmachine commented Oct 19, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (9/9) 💚
Files 100.0% (9/9) 💚 3.865
Classes 100.0% (9/9) 💚 3.865
Methods 97.531% (79/81) 👍 5.486
Lines 82.393% (964/1170) 👎 -5.983
Conditionals 100.0% (0/0) 💚
- '^(%{IP:source.ip}|%{DATA:source.user.name}) %{DATA:apache_tomcat.access.http.ident} %{DATA:apache_tomcat.access.http.useragent} \[%{DATA:_tmp.timestamp}\] \"%{DATA:http.request.method} %{DATA:url.original} HTTP\/%{DATA:http.version}\" %{NUMBER:http.response.status_code} %{DATA:destination.bytes} \"%{DATA:http.request.referrer}\" \"%{DATA:user_agent.original}(\")*$'
- '^(%{IP:source.ip}|%{DATA:source.user.name}) %{DATA:apache_tomcat.access.http.ident} %{DATA:apache_tomcat.access.http.useragent} \[%{DATA:_tmp.timestamp}\] \"%{DATA:http.request.method} %{DATA:url.original} HTTP\/%{DATA:http.version}\" %{NUMBER:http.response.status_code} %{DATA:destination.bytes}$'
pattern_definitions:
CONN_STATUS: "[X+-]"
Copy link
Contributor

@harnish-crest-data harnish-crest-data Oct 19, 2023

Choose a reason for hiding this comment

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

Just for reference: We have considered the value from the official Apache Tomcat Access logs doc.

Copy link
Contributor

@devamanv devamanv left a comment

Choose a reason for hiding this comment

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

LGTM

@ishleenk17 ishleenk17 merged commit aaf1a2c into elastic:main Oct 23, 2023
@elasticmachine
Copy link

Package apache_tomcat - 0.16.0 containing this change is available at https://epr.elastic.co/search?package=apache_tomcat

@ishleenk17 ishleenk17 deleted the apache_logformat branch February 7, 2025 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 participants