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 docs about hints and templates autodiscovery priority #30343

Merged
merged 2 commits into from
Feb 16, 2022

Conversation

ChrsMark
Copy link
Member

What does this PR do?

Adds documentation to state that it's possible to use autodiscover templating + hints based autodiscover together in a single Filebeat (and others) configuration.

Closes #26397

@ChrsMark ChrsMark requested a review from a team as a code owner February 10, 2022 16:04
@ChrsMark ChrsMark self-assigned this Feb 10, 2022
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 10, 2022
@mergify
Copy link
Contributor

mergify bot commented Feb 10, 2022

This pull request does not have a backport label. Could you fix it @ChrsMark? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Feb 10, 2022
@ChrsMark ChrsMark added the Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team label Feb 10, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 10, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 10, 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-02-16T11:19:08.431+0000

  • Duration: 23 min 25 sec

❕ 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!)

@@ -100,6 +100,33 @@ Define an ingest pipeline ID to be added to the {beatname_uc} input/module confi
co.elastic.logs/pipeline: custom-pipeline
-----

When hints are used along with templates, then hints will be evaluated only in case
there is no template's condition that resolve to true. For example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
there is no template's condition that resolve to true. For example:
there is no template's condition that resolves to true. For example:

should here maybe be added clarification if this is evaluated per container basis?

Copy link
Member Author

Choose a reason for hiding this comment

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

At this docs section we refer in general in docker+kubernetes autodiscover hence I would avoid mixing the concept of event based evaluation per container/pod for simplicity. In addition the way that autodiscover works is more or less described on the first paragraph of this page.

-----

In this example first the condition `kubernetes.annotations.prometheus.io/scrape: "true"`
is evaluated and if not matched the hints will be processed.
Copy link
Contributor

Choose a reason for hiding this comment

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

metricbeat doesn't have hints.default_config, that is why it is omitted here?

Copy link
Member Author

@ChrsMark ChrsMark Feb 16, 2022

Choose a reason for hiding this comment

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

Yeap. See

compared to
DefaultConfig: defaultCfg,
. In fact I don't think it would even had any reason to have a default config for metrics. Logs is kind of special since all containers can provide them in a unified way.

Signed-off-by: chrismark <[email protected]>
@ChrsMark ChrsMark added the backport-v8.1.0 Automated backport with mergify label Feb 16, 2022
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Feb 16, 2022
@ChrsMark ChrsMark merged commit 5961a2d into elastic:main Feb 16, 2022
mergify bot pushed a commit that referenced this pull request Feb 16, 2022
ChrsMark added a commit that referenced this pull request Feb 16, 2022
v1v added a commit to v1v/beats that referenced this pull request Feb 21, 2022
…nd-k8s-env

* upstream/main:
  fix typos and improve sentences (elastic#30432)
  Add drop and explicit tests to avoid duplicate ingest of elasticsearch logs (elastic#30440)
  {,x-pack/}auditbeat: replace uses of github.com/pkg/errors with stdlib equivalents (elastic#30321)
  Spelling fix (elastic#30439)
  packetbeat/beater: make sure Npcap installation runs before interfaces are needed in all cases (elastic#30438)
  Add BC about Homebrew no longer being available in 8.0 (elastic#30419)
  Install gawk as a replacement for mawk in Docker containers. (elastic#30452)
  Clean up python-related system tests (elastic#30415)
  Fix TestNewModuleRegistry flakiness (elastic#30453)
  [Filebeat] [auditd]: Support EXECVE events with truncated argument list (elastic#30382)
  Set `log.offset` to the start of the reported line in filestream (elastic#30445)
  clarify SelectedPackageTypes meaning and improve its usage (elastic#30142)
  [elasticsearch module] serialize shards properties (elastic#30408)
  Add docs about hints and templates autodiscovery priority (elastic#30343)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.1.0 Automated backport with mergify Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Add example of using templating with hints based autodiscover
3 participants