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

[Agent] Inject index with sane defaults to configuration #15852

Closed
wants to merge 17 commits into from

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Jan 27, 2020

Build on top of: #15809

Added one extra rule for injecting index into inputs based on provided type and detected namespace/dataset type.

Other option was to use decorator but at the time of decorating there are already some pieces of config missing.

Draft until final configuration format is settled and mentioned PR is in, but READY for review.

It overwrites index specified in input.

Fixes: #15690
Fixes: #15691

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest (Project:fleet)

@michalpristas michalpristas changed the title [Agent] [Agent] Inject index with sane defaults to configuration Jan 27, 2020
Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

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

LGTM, I am going to approve this. the final format will be a bit different see https://gist.github.com/ph/c7a83c8dee58a90051ceb6b0c2cbad5b not final and not ready for implementation

libbeat/monitoring/metrics.go Outdated Show resolved Hide resolved
libbeat/monitoring/metrics.go Outdated Show resolved Hide resolved
libbeat/monitoring/metrics.go Outdated Show resolved Hide resolved
libbeat/mock/mockbeat.go Outdated Show resolved Hide resolved
libbeat/monitoring/metrics.go Outdated Show resolved Hide resolved
libbeat/monitoring/metrics.go Outdated Show resolved Hide resolved
libbeat/monitoring/metrics.go Outdated Show resolved Hide resolved
libbeat/mock/mockbeat.go Outdated Show resolved Hide resolved
@michalpristas michalpristas marked this pull request as ready for review February 10, 2020 10:50
@michalpristas
Copy link
Contributor Author

created followups: #16210 #16209

@michalpristas
Copy link
Contributor Author

michalpristas commented Feb 10, 2020

Tested with this config. careful monitoring moved to settings.monitoring

outputs:
  default:
    type: elasticsearch
    api_key: VuaCfGcBCdbkQm-e5aOx:ui2lp2axTNmsyakw9tvNnw
    hosts: ["localhost:9200"]
    ca_sha256: "7lHLiyp4J8m9kw38SJ7SURJP4bXRZv/BNxyyXkCcE/M="
  monitoring:
    type: elasticsearch
    api_key: VuaCfGcBCdbkQm-e5aOx:ui2lp2axTNmsyakw9tvNnw
    hosts: ["localhost:9200"]
    ca_sha256: "7lHLiyp4J8m9kw38SJ7SURJP4bXRZv/BNxyyXkCcE/M="

datasources:
  - use_output: default
    inputs:
    - type: logs
      streams:
        - dataset: nginx.acccess
          paths: /var/log/nginx/access.log
    - type: metrics/nginx
      streams:
        - dataset: nginx.stub_status
          metricset: stub_status

settings.monitoring:
  enabled: true
  use_output: monitoring
  logs: true

management:
  host: "localhost"

config:
  reload: 123

download:
  sourceURI: "https://artifacts.elastic.co/downloads/beats/"
  target_directory: "/{user_home}/elastic/downloads"
  timeout: 30s
  pgpfile: "/{user_home}/elastic/elastic.pgp"
  install_path: "/{user_home}/elastic/install"

process:
  min_port: 10000
  max_port: 30000
  spawn_timeout: 30s

retry:
  enabled: true
  retries_count: 3
  delay: 30s
  max_delay: 5m
  exponential: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants