[Apache] Add condition support to logs and metrics#7372
[Apache] Add condition support to logs and metrics#7372ishleenk17 merged 2 commits intoelastic:mainfrom
condition support to logs and metrics#7372Conversation
|
@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 |
|
/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
conditionto 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
conditionvalue, and metrics is an independent value.Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Install new version, confirm that
conditionfields are available and can be set.Related issues
Screenshots