Repository navigation
Fix excessive restarts rule to only monitor elastic-agent process - #17237
MichelLosier merged 4 commits into
Conversation
🚀 Benchmarks reportTo see the full report comment with |
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
belimawr
left a comment
There was a problem hiding this comment.
Regarding the possibility of the log message changing, I don't see it as an issue, but I'd like the @elastic/elastic-agent-data-plane opinion on it.
I think you meant @elastic/elastic-agent-control-plane. While it seems fragile to rely on log messages, they don't change often. But perhaps we can add a comment on the agent to say this message is used here? Worst case we'd need to add a few OR if the log changes, so it should be fine. I don't recall, but could we get this information from the |
|
I'm not against relying on the log file for now, but we should definitely add a test on the agent side which verifies we emit exactly this line and links back to the package definition. In the long run, it shouldn't be too difficult to have agent expose an uptime metric which would be much more reliable. |
We do have a
As discussed a little bit here: https://github.com/elastic/ingest-dev/issues/6696 |
|
Just added in a separate small fix here: 12b0bb8 where the |
12b0bb8 to
9775cd8
Compare
💚 Build Succeeded
History
|
|
Package elastic_agent - 2.7.2 containing this change is available at https://epr.elastic.co/package/elastic_agent/2.7.2/ |
…astic#17237) * Fix excessive restarts rule to only monitor elastic-agent process * Fix hardcoding of default namespace in alerting rules
Proposed commit message
Fixes the excessive restarts rule for elastic_agent package to only monitor the elastic-agent process, and hardcoding of default namespace in alerting rules.
This rescopes the excessive restarts rule to only focus on elastic-agent process restarts. Monitoring other elastic-agent processes could produce false signals since these can occur on config changes.
This also switches the rule to querying logs from the elastic-agent to avoid the existing cross-dependency with the
systempackage:Possible risk / questions here:
An alternative solution using the
systempackage:This also addresses an issue where the
defaultnamespace was hardcoded into the index pattern of some alerting rules in this package.Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
defaultnamespace in several packaged rules #17311Screenshots