-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add Cloud Foundry Processor #16621
Add Cloud Foundry Processor #16621
Conversation
@elasticmachine run elasticsearch-ci/docs |
2 similar comments
@elasticmachine run elasticsearch-ci/docs |
@elasticmachine run elasticsearch-ci/docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, made a few comments
x-pack/libbeat/processors/add_cloudfoundry_metadata/_meta/fields.yml
Outdated
Show resolved
Hide resolved
x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata.go
Outdated
Show resolved
Hide resolved
The `add_cloudfoundry_metadata` processor annotates each event with relevant metadata | ||
from Cloud Foundry applications. The events are annotated with Cloud Foundry metadata, | ||
only if the event contains a reference to a Cloud Foundry application and the configured | ||
Cloud Foundry client is able to retrieve information for the application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to explicitly explain what field (cf.app.id
) is used for correlation. So people wanting to do their own enrichment have everything they need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay will add, it will become cloudfoundry.app.id
. Should a field be added to the config to adjust this field path? Don't think its a requirement, but easy to add, might be have a use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have done this in the past, ie:
MatchPIDs []string `config:"match_pids" validate:"required"` |
…ds. Fix changelog, and update asciidoc to reference the field that is read for application ID.
b28cb48
to
18bcca6
Compare
@exekias It's ready for another look! |
The `add_cloudfoundry_metadata` processor annotates each event with relevant metadata | ||
from Cloud Foundry applications. The events are annotated with Cloud Foundry metadata, | ||
only if the event contains a reference to a Cloud Foundry application and the configured | ||
Cloud Foundry client is able to retrieve information for the application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have done this in the past, ie:
MatchPIDs []string `config:"match_pids" validate:"required"` |
* Add the cloudfoundry metadata processor. * Fix testing and documentation. * Add changelog entry. * Run mage fmt. * Fix docs. * Update asciidoc to set role=xpack and experimental. * Switch from cf to cloudfoundry for event key. Improve some event fields. Fix changelog, and update asciidoc to reference the field that is read for application ID. * Update fields.yml from cf to cloudfoundry. (cherry picked from commit 1e0c818)
* Add Cloud Foundry Processor (#16621) * Add the cloudfoundry metadata processor. * Fix testing and documentation. * Add changelog entry. * Run mage fmt. * Fix docs. * Update asciidoc to set role=xpack and experimental. * Switch from cf to cloudfoundry for event key. Improve some event fields. Fix changelog, and update asciidoc to reference the field that is read for application ID. * Update fields.yml from cf to cloudfoundry. (cherry picked from commit 1e0c818) * Fix changelog.
What does this PR do?
Adds a
add_cloudfoundry_metadata
processor that adds application metadata to an event with a Cloud Foundry application ID.Why is it important?
To provide more context on the application for the event. Processor allows this to easily be shared between both metricbeat and filebeat.
Checklist
I have made corresponding change to the default configuration filesAuthor's Checklist
How to test this PR locally
With a running cloud foundry us the following filebeat configuration:
Related issues
Use cases
Screenshots
Logs