-
Notifications
You must be signed in to change notification settings - Fork 474
[Apache] Add condition
support to logs and metrics
#7372
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
Conversation
@BenB196 : Could you please specify a usecase for which you think this will be helpful in Apache ? |
Hi @ishleenk17 this would be helpful for Apache as it would allow for having a single Elastic Agent policy that is applied to both hosts which have an Apache process running and hosts that do not. By leveraging the |
Any specific reason why we are focusing on single policy when the same can be attained by having 2 different policies? |
Hi @ishleenk17, while technically possible to do this via 2 policies this method will devolve into exponential (matrix multiplication) operational complexity. One of the main reasons for the FWIW, this isn't a "new" concept, there are already a number of integrations which support this field: https://github.com/search?q=repo%3Aelastic%2Fintegrations+%22title%3A+Condition%22&type=code |
Sounds good. Thanks for your contribution @BenB196 |
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.
Looks good!
/test |
🌐 Coverage report
|
Package apache - 1.15.0 containing this change is available at https://epr.elastic.co/search?package=apache |
Package iis - 1.15.0 containing this change is available at https://epr.elastic.co/search?package=iis |
What does this PR do?
Enhancement - Adds support for setting
condition
to both Log file collection and metrics. This allows for defining this integration in a policy, but only having it run on during specific conditions.Note: Log file (access/error) share a top-level
condition
value, and metrics is an independent value.Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Install new version, confirm that
condition
fields are available and can be set.Related issues
Screenshots