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

[Elastic Agent] Add support for dynamics inputs #19225

Closed
6 of 8 tasks
ph opened this issue Jun 16, 2020 · 7 comments
Closed
6 of 8 tasks

[Elastic Agent] Add support for dynamics inputs #19225

ph opened this issue Jun 16, 2020 · 7 comments
Assignees
Labels
Ingest Management:beta2 Group issues for ingest management beta2 meta

Comments

@ph
Copy link
Contributor

ph commented Jun 16, 2020

In beats today we have a feature called Autodiscovery that allows you to generate inputs based on labels or other information coming from a provider like the k8s, docker stream. We want to add the same functionality in the Elastic Agent. We are calling that new feature Dynamic input.

As an example, we would create a dynamic input template like this. And the system would run through the data it has to define if a template should be used or not.

inputs:
- type: log
  dataset.type: logs
  streams:
    - paths: /var/log/${host.platform}.log
      dataset.name: foo
  condition: ${host.platform} == "windows"

Use cases:

  • Do an input need to run on this OS (aka syslog should not work on Windows).
  • Do an input need to run based on the environment.
  • Do an input need to run based on data from a provider (k8s hints)
  • Allow defining a cross platform integration that will use journald on Linux but winlogbeat on Windows

Tasks

Phase 1: Elastic Agent

Phase 2 (beyond 7.10)

@elasticmachine
Copy link
Collaborator

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

@ph
Copy link
Contributor Author

ph commented Jun 16, 2020

@exekias
Copy link
Contributor

exekias commented Jun 18, 2020

I've created #19271 to discuss the changes in current autodiscover

@ph
Copy link
Contributor Author

ph commented Aug 20, 2020

@ruflin @blakerouse One thing that I think our idea doesn't cover is a default case. Lets assume that an integration ships with 3 inputs.

- type: A
    conditions: 
      - {{os.platform}} == windows

- type: B
    conditions: 
      - {{journald_detected}} == true

- type: C
    conditions: 
      - Run only is A/B is not enabled.

The use case would be use the windows events, journald if it exist, otherwise fallback to file on disk? Do we need to support that kind of condition or we assume that everything is a single "unit" with only his own view on the world? The later really simplify any use case.

@ruflin
Copy link
Member

ruflin commented Aug 21, 2020

I would skip this default use case for now. For these cases != can be used. For the above example, C would be

- type: C
    conditions: 
      - {{os.platform}} != windows
      - {{journald_detected}} != true

@ph
Copy link
Contributor Author

ph commented Aug 21, 2020

@ruflin Yes this is what I thought, just wanted to make sure we were ok with possible limitations. Also, in some we could have noop inputs. (IE the file do not exist)

@ph
Copy link
Contributor Author

ph commented Oct 14, 2020

Closing this, added the remaining items in the project board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingest Management:beta2 Group issues for ingest management beta2 meta
Projects
None yet
Development

No branches or pull requests

5 participants