Skip to content

[GCP] Preserve original value of resource name #13633

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

Merged

Conversation

moxarth-rathod
Copy link
Contributor

Proposed commit message

GCP : Add gcp.audit.resource_name for k8s audit logs

Remove condition on json.protoPayload.resourceName to preserve original value. This field is used to
extract orchestrator-related information in Kubernetes logs, and grok is already applied for extracting
details. Removing the condition helps retain the original value.

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.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/gcp directory.
  • Run the following command to run tests.

elastic-package test

Related issues

@moxarth-rathod moxarth-rathod added Integration:gcp Google Cloud Platform bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Apr 22, 2025
@moxarth-rathod moxarth-rathod self-assigned this Apr 22, 2025
@moxarth-rathod moxarth-rathod requested review from a team as code owners April 22, 2025 06:32
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

Package gcp 👍(4) 💚(0) 💔(2)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
firewall 4032.26 3021.15 -1011.11 (-25.08%) 💔
vpcflow 3952.57 2967.36 -985.21 (-24.93%) 💔

To see the full report comment with /test benchmark fullreport

Copy link

@elasticmachine
Copy link

💚 Build Succeeded

cc @moxarth-rathod

@kcreddy kcreddy merged commit e5a63de into elastic:main Apr 22, 2025
7 checks passed
@@ -510,7 +510,6 @@ processors:
field: gcp.audit.resource_name
copy_from: json.protoPayload.resourceName
ignore_failure: true
if: ctx.orchestrator?.type != 'kubernetes'
Copy link
Member

@ishleenk17 ishleenk17 Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please check why this was excluded before?
Also, in case we are not using this. We might as well not have set orchestrator.type as we were creating and using that field only for this check.

@elastic-vault-github-plugin-prod

Package gcp - 2.41.1 containing this change is available at https://epr.elastic.co/package/gcp/2.41.1/

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:gcp Google Cloud Platform Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GCP Audit Integration] gcp.audit.resource_name not extracted from k8s audit logs
4 participants