Skip to content

Copy log.syslog.appname to process.name#10646

Merged
nicholasberlin merged 3 commits intomainfrom
nberlin/set_process_name_when_syslog_processor_has_run
Jul 30, 2024
Merged

Copy log.syslog.appname to process.name#10646
nicholasberlin merged 3 commits intomainfrom
nberlin/set_process_name_when_syslog_processor_has_run

Conversation

@nicholasberlin
Copy link
Copy Markdown
Contributor

@nicholasberlin nicholasberlin commented Jul 29, 2024

Proposed commit message

Before the syslog processor was added to the default filebeat yaml configuration, process.name was set by a Grok ingest pipeline. However, when the syslog processor was added a condition was also added to the Grok ingest pipeline, if: ctx.log?.syslog == null. This condition always evaluates to false when the data is supplied by the syslog processor, and therefore process.name is not extraced from the syslog message. This commit copies the process name from log.syslog.appname to process.name before an pipeline processors which use it are executed. With this change, process.name, event.category, and event.type are now populated when data arrives from the syslog processor.

And add tests.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

~/git/integrations/main/packages/system$ elastic-package test pipeline -d auth -v

Related issues

Before the syslog processor was added to the default filebeat yaml configuration, process.name was
set by a Grok ingest pipeline. However, when the syslog processor was added a condition was also added to
the Grok ingest pipeline, `if: ctx.log?.syslog == null`. This condition always evaluates to false when
the data is supplied by the syslog processor, and therefore `process.name` is not extraced from the syslog
message. This commit copies the process name from `log.syslog.appname` to `process.name` before an pipeline
processors which use it are executed. With this change, `process.name`, `event.category`, and `event.type`
are now populated when data arrives from the syslog processor.
@nicholasberlin nicholasberlin added the bugfix Pull request that fixes a bug issue label Jul 29, 2024
@nicholasberlin nicholasberlin requested a review from a team as a code owner July 29, 2024 21:15
@nicholasberlin nicholasberlin requested review from a team as code owners July 29, 2024 21:16
@elasticmachine
Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@andrewkroh
Copy link
Copy Markdown
Member

Can you fix the .github/CODEOWNERS file while you are in there. I think the auth data stream belongs under the sec-linux-platform team instead of windows.

/packages/system/data_stream/auth @elastic/sec-windows-platform

@andrewkroh andrewkroh added Integration:system System Team:Security-Linux Platform Linux Platform Security team [elastic/sec-linux-platform] labels Jul 30, 2024
@elasticmachine
Copy link
Copy Markdown

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

@nicholasberlin nicholasberlin requested a review from a team July 30, 2024 16:46
@elastic-sonarqube
Copy link
Copy Markdown

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

@nicholasberlin nicholasberlin merged commit 8107f32 into main Jul 30, 2024
@nicholasberlin nicholasberlin deleted the nberlin/set_process_name_when_syslog_processor_has_run branch July 30, 2024 17:10
@elasticmachine
Copy link
Copy Markdown

Package system - 1.60.1 containing this change is available at https://epr.elastic.co/search?package=system

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
* Copy log.syslog.appname to process.name

Before the syslog processor was added to the default filebeat yaml configuration, process.name was
set by a Grok ingest pipeline. However, when the syslog processor was added a condition was also added to
the Grok ingest pipeline, `if: ctx.log?.syslog == null`. This condition always evaluates to false when
the data is supplied by the syslog processor, and therefore `process.name` is not extraced from the syslog
message. This commit copies the process name from `log.syslog.appname` to `process.name` before an pipeline
processors which use it are executed. With this change, `process.name`, `event.category`, and `event.type`
are now populated when data arrives from the syslog processor.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
* Copy log.syslog.appname to process.name

Before the syslog processor was added to the default filebeat yaml configuration, process.name was
set by a Grok ingest pipeline. However, when the syslog processor was added a condition was also added to
the Grok ingest pipeline, `if: ctx.log?.syslog == null`. This condition always evaluates to false when
the data is supplied by the syslog processor, and therefore `process.name` is not extraced from the syslog
message. This commit copies the process name from `log.syslog.appname` to `process.name` before an pipeline
processors which use it are executed. With this change, `process.name`, `event.category`, and `event.type`
are now populated when data arrives from the syslog processor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:system System Team:Security-Linux Platform Linux Platform Security team [elastic/sec-linux-platform]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System Auth integration not populating process.name

3 participants