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

[Fleet] Add support for new template path above data stream folders #82599

Closed
jalvz opened this issue Nov 4, 2020 · 3 comments · Fixed by #83878
Closed

[Fleet] Add support for new template path above data stream folders #82599

jalvz opened this issue Nov 4, 2020 · 3 comments · Fixed by #83878
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team v7.11.0

Comments

@jalvz
Copy link
Contributor

jalvz commented Nov 4, 2020

Consider this snippet of an integration's manifest.yml file:

policy_templates:
    inputs:
      - vars:
          - name: host
            type: int

Currently, Kibana substitutes the host variable in every data stream template (data_stream/*/agent/stream). However if there aren't data streams (which will be the case for APM), the configuration above is ignored:

inputs:
  - id: 0e682c50-183a-11eb-916d-71d55143d422
    name: my-apm-integration
    streams: [] # no `host` inside because there aren't streams in the integration
    # more input fields

elastic/package-spec#79 tries to define a new valid template path in <package-name>/<version>/agent/input/ as per discussion.

Kibana would then need to substitute the variables defined at the root in policy_templates in agent/input/template.yml.hbs (I don't have an opinion on what the default template name should be), if such file exists. This would result in a policy like:

inputs:
  - id: 0e682c50-183a-11eb-916d-71d55143d422
    name: my-apm-integration
    streams: []
    host: http://localhost:8200
    # more fields coming from agent/input/template.yml.hbs
    # more input fields
@jalvz jalvz added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 4, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@ruflin
Copy link
Member

ruflin commented Nov 5, 2020

I assume the streams: [] part is not needed?

@jen-huang I wonder if we should allow to mix global inputs and local input. My initial gut reaction is that no. Mixing the two might become confusing. If we don't allow to mix it, I would hope it also simplifies the code. Either only global input(s) are used or only data_stream specific inputs. Does this make sense?

@jalvz
Copy link
Contributor Author

jalvz commented Nov 5, 2020

I assume the streams: [] part is not needed?

Right, I don't recall if it is generated or not, but it doesn't matter 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team v7.11.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants