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

EC2 Autodiscover provider #12518

Closed
exekias opened this issue Jun 12, 2019 · 1 comment · Fixed by #14823
Closed

EC2 Autodiscover provider #12518

exekias opened this issue Jun 12, 2019 · 1 comment · Fixed by #14823
Assignees
Labels
autodiscovery enhancement libbeat Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team v7.7.0

Comments

@exekias
Copy link
Contributor

exekias commented Jun 12, 2019

As a user, I may want to launch Metricbeat modules to monitor services running on AWS EC2 instances. For example:

  • to retrieve MySQL metrics from servers tagged with service: mysql.
  • to gather Prometheus metrics from all my nodes, running cadvisor.

Autodiscover framework provides the right mechanism to support this kind of configurations, where the user can define module templates to launch based on conditions on the status of an external system.

We could add a new aws_ec2 autodiscover provider to allow autodiscover to react to EC2 instances status, this information could be included in autodiscover events, to be used in autodiscover conditions:

id (instance arn)
host (public or private IP?)
aws.ec2.instance.image.id
aws.ec2.instance.state.name
aws.tags
cloud.availability_zone
cloud.machine.type
cloud.region

Autodiscover is able to enrich events coming out of modules it launches, aws_ec2 should provide the common cloud metadata

Example config:

metricbeat.autodiscover:
  providers:
  - type: aws_ec2
    regions: ["us-east-1"]
    access_key_id: my-access-key
    secret_access_key: my-secret-access-key
    templates:
    - condition:
        equals.aws.tags.service: mysql
      config:
      - module: mysql
        hosts: ["root:secret@tcp(${data.host}:3306)"]
@exekias
Copy link
Contributor Author

exekias commented Jun 12, 2019

cc @kaiyan-sheng @andrewvc

Also, AWS ELB provider is already in progress: #12401, this should be pretty similar, with some opportunities for code sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autodiscovery enhancement libbeat Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants