Skip to content

Conversation

@mjwolf
Copy link
Contributor

@mjwolf mjwolf commented Oct 23, 2024

Proposed commit message

Reduce logging levels for some log messages in the add_session_metadata processor.

If something goes wrong with the process cache where all, or most, processes are missed, many of these logs would be called for every process event, resulting in a lot of logging spam. These logs have been changed to Debug, which is below the default log level and will not cause log spam.

The logs that have been reduce to Info are in a timer, so they will not cause a lot of spam, but they should be Informational messages

There are better ways to detect if enrichment has failed, so changing the log levels shouldn't negatively affect anything. For example, an Elasticsearch query or alert on missing fields that only this processor will populate will show processes that weren't properly enriched (i.e. process.entry_leader fields).

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.

Disruptive User Impact

None

Reduce logging levels for some log messages in the add_session_metadata processor.

If something goes wrong with enrichment, many of these logs would be called for every process event, resulting
in a lot of logging spam. The logs that have been changed to `Debug` are logs that could potentially be called on
every enrichment, so they are lowered to below the default log level.

The other logs that have been changed to `Warn` or `Info` will only be called once, or are related to a timer, so
they will not cause a large amount of logs to be created.

There are better ways to detect if enrichment has failed, so changing the log levels shouldn't negatively affect anything.
For example an Elasticsearch query or alert on missing data that only this processor will populate (i.e.
`process.entry_leader` fields) will show processes that weren't properly enriched.
@mjwolf mjwolf added Auditbeat bugfix Team:Security-Linux Platform Linux Platform Team in Security Solution backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify labels Oct 23, 2024
@mjwolf mjwolf requested a review from a team as a code owner October 23, 2024 23:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 23, 2024
@mergify mergify bot assigned mjwolf Oct 23, 2024
@mjwolf mjwolf enabled auto-merge (squash) October 24, 2024 06:28
@mjwolf mjwolf merged commit 5941e68 into elastic:main Oct 24, 2024
mergify bot pushed a commit that referenced this pull request Oct 24, 2024
Reduce logging levels for some log messages in the add_session_metadata processor.

If something goes wrong with the process cache where all, or most, processes are missed, many of these logs would be called for every process event, resulting in a lot of logging spam. These logs have been changed to Debug, which is below the default log level and will not cause log spam.

The logs that have been reduce to Info are in a timer, so they will not cause a lot of spam, but they should be Informational messages

There are better ways to detect if enrichment has failed, so changing the log levels shouldn't negatively affect anything. For example, an Elasticsearch query or alert on missing fields that only this processor will populate will show processes that weren't properly enriched (i.e. process.entry_leader fields).

(cherry picked from commit 5941e68)
mergify bot pushed a commit that referenced this pull request Oct 24, 2024
Reduce logging levels for some log messages in the add_session_metadata processor.

If something goes wrong with the process cache where all, or most, processes are missed, many of these logs would be called for every process event, resulting in a lot of logging spam. These logs have been changed to Debug, which is below the default log level and will not cause log spam.

The logs that have been reduce to Info are in a timer, so they will not cause a lot of spam, but they should be Informational messages

There are better ways to detect if enrichment has failed, so changing the log levels shouldn't negatively affect anything. For example, an Elasticsearch query or alert on missing fields that only this processor will populate will show processes that weren't properly enriched (i.e. process.entry_leader fields).

(cherry picked from commit 5941e68)
mjwolf added a commit that referenced this pull request Oct 24, 2024
Reduce logging levels for some log messages in the add_session_metadata processor.

If something goes wrong with the process cache where all, or most, processes are missed, many of these logs would be called for every process event, resulting in a lot of logging spam. These logs have been changed to Debug, which is below the default log level and will not cause log spam.

The logs that have been reduce to Info are in a timer, so they will not cause a lot of spam, but they should be Informational messages

There are better ways to detect if enrichment has failed, so changing the log levels shouldn't negatively affect anything. For example, an Elasticsearch query or alert on missing fields that only this processor will populate will show processes that weren't properly enriched (i.e. process.entry_leader fields).

(cherry picked from commit 5941e68)

Co-authored-by: Michael Wolf <[email protected]>
mjwolf added a commit that referenced this pull request Oct 24, 2024
Reduce logging levels for some log messages in the add_session_metadata processor.

If something goes wrong with the process cache where all, or most, processes are missed, many of these logs would be called for every process event, resulting in a lot of logging spam. These logs have been changed to Debug, which is below the default log level and will not cause log spam.

The logs that have been reduce to Info are in a timer, so they will not cause a lot of spam, but they should be Informational messages

There are better ways to detect if enrichment has failed, so changing the log levels shouldn't negatively affect anything. For example, an Elasticsearch query or alert on missing fields that only this processor will populate will show processes that weren't properly enriched (i.e. process.entry_leader fields).

(cherry picked from commit 5941e68)

Co-authored-by: Michael Wolf <[email protected]>
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auditbeat backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify bugfix Team:Security-Linux Platform Linux Platform Team in Security Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants