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] Fixed injected log path to monitoring beat #17833

Merged
merged 5 commits into from
Apr 20, 2020

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Apr 20, 2020

What does this PR do?

Incorrect path was passed to monitoring beat so it could not pick up files from log directory

Why is it important?

To enable logs monitoring

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test

Package agent and run standalone with this config

outputs:
  default:
    type: elasticsearch
    hosts: [127.0.0.1:9200]
    username: elastic
    password: changeme
datasources:
- id: system-1
  enabled: true
  use_output: default
  inputs:
  - type: system/metrics
    enabled: true
    streams:
    - id: system/metrics-system.core
      enabled: true
      dataset: system.core
      period: 10s
      metrics:
      - percentages
    - id: logs-system.syslog
      enabled: true
      dataset: system.syslog
      paths:
      - "/var/log/messages*"
      - "/var/log/syslog*"
  package:
    name: system
    version: 0.9.0  
settings.monitoring:
  use_output: default
  enabled: true
  logs: true
  metrics: true
management:
  mode: "local"
  fleet:
    access_token: ""
    kibana:
      host: "localhost:5601"
      ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  reporting:
    log:
      format: "default"
    fleet:
      enabled: false
      reporting_threshold: 10000
      reporting_check_frequency_sec: 30
  reload:
    enabled: true
    period: 10s
download:
  sourceURI: "https://artifacts.elastic.co/downloads/beats/"
  target_directory: "${path.data}/downloads"
  timeout: 30s
  pgpfile: "${path.data}/elastic.pgp"
  install_path: "${path.data}/install"
process:
  min_port: 10000
  max_port: 30000
  spawn_timeout: 30s
retry:
  enabled: true
  retriesCount: 3
  delay: 30s
  maxDelay: 5m
  exponential: false

when you check GET /_cat/indices/ in kibana you should see filebeat-8.0.0-{date} index created.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Project:fleet)

@michalpristas michalpristas changed the title [Agent] Monitor logs [Agent] Fixed injected log path to monitoring beat Apr 20, 2020
@ph ph added needs_backport PR is waiting to be backported to other branches. [zube]: In Review review labels Apr 20, 2020
@michalpristas michalpristas merged commit a16a2a3 into elastic:master Apr 20, 2020
michalpristas added a commit to michalpristas/beats that referenced this pull request Apr 21, 2020
[Agent] Fixed injected log path to monitoring beat  (elastic#17833)
michalpristas added a commit that referenced this pull request Apr 22, 2020
… monitoring beat (#17860)

Cherry-pick #17833 to 7.x: [Elastic-Agent] Fixed injected log path to monitoring beat  (#17860)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs_backport PR is waiting to be backported to other branches. review [zube]: In Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants