beats icon indicating copy to clipboard operation
beats copied to clipboard

[docs][metricbeat] - remove asciidoc and add markdown

Open VihasMakwana opened this issue 5 months ago • 6 comments

Proposed commit message

This is a follow-up of https://github.com/elastic/beats/pull/44638.
This PR converts metricbeat docs to markdown and resolves a TODO. Most changes are related to asciidoc and metricbeat/scripts/docs_collector.go is responsible for generating it.

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] 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.

How to test this PR

Related issues

  • Relates https://github.com/elastic/beats/issues/43008

VihasMakwana avatar Jun 20 '25 15:06 VihasMakwana

:robot: GitHub comments

Expand to view the GitHub comments

Just comment with:

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

github-actions[bot] avatar Jun 20 '25 15:06 github-actions[bot]

This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @VihasMakwana? 🙏. For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

mergify[bot] avatar Jun 20 '25 15:06 mergify[bot]

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

elasticmachine avatar Jun 23 '25 10:06 elasticmachine

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

elasticmachine avatar Jun 23 '25 10:06 elasticmachine

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b metricbeat-docs upstream/metricbeat-docs
git merge upstream/main
git push upstream metricbeat-docs

mergify[bot] avatar Jun 24 '25 17:06 mergify[bot]

@colleenmcginnis thanks for you review!! I'll take a look the files and get back to you.

VihasMakwana avatar Jun 25 '25 07:06 VihasMakwana

@colleenmcginnis Here's my thoughts after going through the files again:

  • docs/reference/metricbeat/metricbeat-metricset-kubernetes-state_horizontalpodautoscaler.md
  • docs/reference/metricbeat/metricbeat-metricset-windows-wmi.md
  • docs/reference/metricbeat/metricbeat-metricset-mysql-galera_status.md
    • For some reason, both of the above files were missing the ## Fields [_fields] section. That section is dynamically inserted from each module.
    • The changes are expected for them.
  • docs/reference/metricbeat/metricbeat-module-gcp.md
    • The dataproc metricset was recently added to the module configuration. But, the documentation wasn't updated. https://github.com/elastic/beats/pull/43518/files
  • docs/reference/metricbeat/metricbeat-module-sql.md
  • docs/reference/metricbeat/metricbeat-module-statsd.md
    • For some reason, both of the above filere were missing an ## Example Conifguration and **## Metricsets** sections. Now, they're added automatically due to the script.
  • docs/reference/metricbeat/metricbeat-metricset-nats-jetstream.md
    • I've fixed this file. The main doc wasn't updated and as a result, changes weren't reflected in autogenerated doc. It was missing ## Fields [_fields] section previously. I've added that as well.

VihasMakwana avatar Jun 25 '25 08:06 VihasMakwana

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b metricbeat-docs upstream/metricbeat-docs
git merge upstream/main
git push upstream metricbeat-docs

mergify[bot] avatar Jun 26 '25 06:06 mergify[bot]

@VihasMakwana We merged https://github.com/elastic/beats/pull/44579 in the meantime and it caused conflicts, can you look into it and regenerate the markdown doc? Thank you.

mauri870 avatar Jun 27 '25 12:06 mauri870

@zmoog Thanks for pointing this out! There was a typo introduced. I guess it was due to resolving merge conflicts.

https://docs-v3-preview.elastic.dev/elastic/beats/pull/44947/reference/metricbeat/metricbeat-metricset-aws-dynamodb and other metricsets now show correct docs.

VihasMakwana avatar Jul 01 '25 10:07 VihasMakwana

@VihasMakwana Shouldn't this PR be backported to the 9.1 branch as well?

vishaangelova avatar Aug 21 '25 07:08 vishaangelova

@vishaangelova Yes, it should be. I've added the label.

VihasMakwana avatar Aug 21 '25 07:08 VihasMakwana