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

Fix YAML indentation in parsers examples #29663

Merged
merged 1 commit into from
Jan 18, 2022
Merged

Conversation

smokris
Copy link
Contributor

@smokris smokris commented Jan 2, 2022

Type of change: Docs

What does this PR do?

The indentation is incorrect in the filestream parsers example snippets — filebeat expects each parsers array item to be an object with a single key containing an object of parameters, but the examples show each parsers array item as an object with multiple keys. The existing syntax causes filebeat to fail to start. This MR fixes the documentation to produce the YAML structure that filebeat expects, so that the snippets can be successfully used in filebeat.

Why is it important?

The existing documentation is inaccurate, causing confusion about what YAML structure filebeat actually expects.

Checklist

  • [ ] My code follows the style guidelines of this project
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

How to test this PR locally

  • Install filebeat 7.16.2
  • Use the existing YAML snippets in the documentation to try to add a parser to the default config — filebeat fails to launch
  • Use the updated YAML snippets in this MR — filebeat successfully launches

Related issues

Use cases

Screenshots

Logs

The message filebeat outputs when using the existing YAML snippets in the documentation:

Exiting: Failed to start crawler: creating input reloader failed: error while parsing multiline parser config: unknown matcher type: accessing '0.parsers.0.multiline' accessing '0'

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 2, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 2, 2022

💚 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: 2022-01-12T16:42:42.237+0000

  • Duration: 7 min 3 sec

  • Commit: 26106da

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@ChrsMark ChrsMark added the Team:Elastic-Agent Label for the Agent team label Jan 10, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 10, 2022
@jlind23 jlind23 requested a review from a team January 10, 2022 09:55
Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

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

Thanks!

@cmacknz
Copy link
Member

cmacknz commented Jan 11, 2022

/test

@cmacknz
Copy link
Member

cmacknz commented Jan 11, 2022

I would target this to merge to master. We can set the target release branches with labels to have the release branch PRs created automatically (e.g. 7.16, 7.17, etc).

@cmacknz cmacknz changed the base branch from 7.16 to master January 12, 2022 14:41
@cmacknz cmacknz requested review from a team as code owners January 12, 2022 14:41
@cmacknz cmacknz self-assigned this Jan 12, 2022
@cmacknz cmacknz changed the base branch from master to 7.16 January 12, 2022 14:42
@cmacknz cmacknz changed the base branch from 7.16 to master January 12, 2022 14:45
@cmacknz
Copy link
Member

cmacknz commented Jan 12, 2022

@smokris Rebase onto master (and change the PR base to master) to merge this and we'll cherry pick it into the appropriate release branches.

Edit: Tried switching the PR base to master myself and that just picks up the full diff between 7.16 and master which is not helpful, we'll need to rebase first. I think we'll miss the next 7.16 release window so I'm now targeting 7.17 and later.

@cmacknz cmacknz added backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.0.0 Automated backport with mergify labels Jan 12, 2022
@cmacknz cmacknz changed the base branch from master to 7.16 January 12, 2022 16:15
@cmacknz cmacknz added the forwardport-master Automated forwardport with mergify label Jan 12, 2022
@cmacknz
Copy link
Member

cmacknz commented Jan 12, 2022

/test

@cmacknz cmacknz removed the forwardport-master Automated forwardport with mergify label Jan 12, 2022
@cmacknz
Copy link
Member

cmacknz commented Jan 12, 2022

I could forward port this to master from 7.16 but we missed the deadline for getting the change into that branch. We'll merge this to master and it will be updated in 7.17 and later.

@kvch
Copy link
Contributor

kvch commented Jan 18, 2022

Failing test seem unrelated. I think this can be merged.

@cmacknz cmacknz added the forwardport-master Automated forwardport with mergify label Jan 18, 2022
@cmacknz cmacknz merged commit 9e0dad7 into elastic:7.16 Jan 18, 2022
cmacknz pushed a commit that referenced this pull request Jan 18, 2022
See discussion on https://discuss.elastic.co/t/filebeat-filestream-input-parsers-multiline-fails/290543/9.

(cherry picked from commit 9e0dad7)

Co-authored-by: Steve Mokris <smokris@softpixel.com>
cmacknz pushed a commit that referenced this pull request Jan 18, 2022
See discussion on https://discuss.elastic.co/t/filebeat-filestream-input-parsers-multiline-fails/290543/9.

(cherry picked from commit 9e0dad7)

Co-authored-by: Steve Mokris <smokris@softpixel.com>
cmacknz pushed a commit that referenced this pull request Jan 18, 2022
See discussion on https://discuss.elastic.co/t/filebeat-filestream-input-parsers-multiline-fails/290543/9.

(cherry picked from commit 9e0dad7)

Co-authored-by: Steve Mokris <smokris@softpixel.com>
@smokris
Copy link
Contributor Author

smokris commented Jan 18, 2022

Thanks for taking care of this, @cmacknz!

@smokris smokris deleted the patch-1 branch January 18, 2022 16:17
v1v added a commit that referenced this pull request Jan 28, 2022
* upstream/7.17: (30 commits)
  [7.17](backport #29966) Add the Elastic product origin header when talking to Elasticsearch or Kibana. (#30000)
  [Heartbeat] Change size of data on ICMP packet (#29948) (#29978)
  Add clarification about enableing dashboard loading (#29985) (#29989)
  Improve aws-s3 gzip file detection to avoid false negatives (#29969) (#29974)
  ci: docker login step for pulling then pushing (#29960) (#29963)
  x-pack/auditbeat/module/system/socket: get full length path and arg from /proc when not available from kprobe (#29410) (#29958)
  [Automation] Update elastic stack version to 7.17.0-ab4975a2 for testing (#29956)
  [Automation] Update elastic stack version to 7.17.0-1bd58b32 for testing (#29938)
  [7.17](backport #29913) [Metricbeat] gcp.gke: fix overview dashboard (#29914)
  [7.17](backport #29605) Fix annotation enrichment (#29834)
  [Automation] Update elastic stack version to 7.17.0-e1efbe3a for testing (#29922)
  [Automation] Update elastic stack version to 7.17.0-68da5d12 for testing (#29904)
  [7.17][Heartbeat] Defer monitor / ICMP errors to monitor runtime / ES (backport #29413) (#29896)
  Merge pull request from GHSA-rj4h-hqvq-cc6q
  [7.17](backport #29681) Change docker image from CentOS 7 to Ubuntu 20.04 (#29817)
  Fix YAML indentation in `parsers` examples (#29663) (#29894)
  [Automation] Update elastic stack version to 7.17.0-079761a0 for testing (#29864)
  Fix Filebeat dissect processor field tokenization in documentation (#29680) (#29883)
  Enable require_alias for Bulk requests for all actions when target is a write alias (#29879)
  Update Index template loading guide to use the correct endpoint (#29869) (#29877)
  ...
yashtewari pushed a commit to build-security/beats that referenced this pull request Jan 30, 2022
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
* upstream/7.17: (30 commits)
  [7.17](backport elastic#29966) Add the Elastic product origin header when talking to Elasticsearch or Kibana. (elastic#30000)
  [Heartbeat] Change size of data on ICMP packet (elastic#29948) (elastic#29978)
  Add clarification about enableing dashboard loading (elastic#29985) (elastic#29989)
  Improve aws-s3 gzip file detection to avoid false negatives (elastic#29969) (elastic#29974)
  ci: docker login step for pulling then pushing (elastic#29960) (elastic#29963)
  x-pack/auditbeat/module/system/socket: get full length path and arg from /proc when not available from kprobe (elastic#29410) (elastic#29958)
  [Automation] Update elastic stack version to 7.17.0-ab4975a2 for testing (elastic#29956)
  [Automation] Update elastic stack version to 7.17.0-1bd58b32 for testing (elastic#29938)
  [7.17](backport elastic#29913) [Metricbeat] gcp.gke: fix overview dashboard (elastic#29914)
  [7.17](backport elastic#29605) Fix annotation enrichment (elastic#29834)
  [Automation] Update elastic stack version to 7.17.0-e1efbe3a for testing (elastic#29922)
  [Automation] Update elastic stack version to 7.17.0-68da5d12 for testing (elastic#29904)
  [7.17][Heartbeat] Defer monitor / ICMP errors to monitor runtime / ES (backport elastic#29413) (elastic#29896)
  Merge pull request from GHSA-rj4h-hqvq-cc6q
  [7.17](backport elastic#29681) Change docker image from CentOS 7 to Ubuntu 20.04 (elastic#29817)
  Fix YAML indentation in `parsers` examples (elastic#29663) (elastic#29894)
  [Automation] Update elastic stack version to 7.17.0-079761a0 for testing (elastic#29864)
  Fix Filebeat dissect processor field tokenization in documentation (elastic#29680) (elastic#29883)
  Enable require_alias for Bulk requests for all actions when target is a write alias (elastic#29879)
  Update Index template loading guide to use the correct endpoint (elastic#29869) (elastic#29877)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.0.0 Automated backport with mergify forwardport-master Automated forwardport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants