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

Cherry-pick #17833 to 7.x: [Elastic-Agent] Fixed injected log path to monitoring beat #17860

Merged
merged 3 commits into from
Apr 22, 2020

Conversation

michalpristas
Copy link
Contributor

Cherry-pick of PR #17833 to 7.x branch. Original message:

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.

[Agent] Fixed injected log path to monitoring beat  (elastic#17833)
@elasticmachine
Copy link
Collaborator

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

@ph ph self-requested a review April 21, 2020 13:07
@@ -21,6 +21,8 @@
- Fix issues when running `mage package` for all the platforms. {pull}17767[17767]
- Rename the User-Agent string from Beats Agent to Elastic Agent. {pull}17765[17765]
- Remove the kbn-version on each request to the Kibana API. {pull}17764[17764]
- Fixed process spawning on Windows {pull}17751[17751]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a merge conflict with the changelog?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i dont unerstand this. it;s not in 7.x it's from different PR, i need to cleanup

Copy link
Contributor

Choose a reason for hiding this comment

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

@michalpristas yeah, it's common I make the mistake all the times with CHANGELOG 9 out of 10 I have to make some change to it. I try always to look that file on the cherry-pick PR because even if you don't have a conflict it may content more items..

@michalpristas michalpristas changed the title Cherry-pick #17833 to 7.x: [Agent] Fixed injected log path to monitoring beat Cherry-pick #17833 to 7.x: [Elastic-Agent] Fixed injected log path to monitoring beat Apr 21, 2020
@michalpristas michalpristas merged commit 04bdc7c into elastic:7.x Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants