Skip to content
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

WIP feat: Add hostname to payload #355

Closed

Conversation

adnankobir
Copy link

@adnankobir adnankobir commented Aug 22, 2022

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area config

/area outputs

What this PR does / why we need it:
Adds optional hostname field to the incoming falco payload. Conditionally adds the hostname to all outputs.

Which issue(s) this PR fixes:

Allows sidekick to retrieve hostname once falcosecurity/falco#1520 is resolved.

Special notes for your reviewer:

@poiana
Copy link

poiana commented Aug 22, 2022

Welcome @adnankobir! It looks like this is your first PR to falcosecurity/falcosidekick 🎉

@poiana poiana requested review from cpanato and fjogeleit August 22, 2022 11:19
@poiana
Copy link

poiana commented Aug 22, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adnankobir
Once this PR has been reviewed and has the lgtm label, please assign fjogeleit for approval by writing /assign @fjogeleit in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana added the size/S label Aug 22, 2022
@Issif
Copy link
Member

Issif commented Aug 22, 2022

Hi,
Thank you. As hostname will be a new field, we should add it in all outputs, not only Slack and PagerDuty.

@adnankobir adnankobir force-pushed the add-hostname-to-payload branch from 45756a5 to 98fdb1a Compare August 22, 2022 11:23
@Issif Issif modified the milestone: 2.28 Aug 22, 2022
@adnankobir
Copy link
Author

Hi, Thank you. As hostname will be a new field, we should add it in all outputs, not only Slack and PagerDuty.

Agreed, let me added it to the remaining outputs.

@Issif
Copy link
Member

Issif commented Aug 22, 2022

You can take reference with the PR #310 I did it for source and tags

@poiana poiana added size/L and removed size/S labels Aug 22, 2022
@adnankobir
Copy link
Author

@Issif added to all outputs

@Issif
Copy link
Member

Issif commented Aug 22, 2022

/do-not-merge

@Issif Issif added this to the 2.27.0 milestone Aug 25, 2022
@Issif Issif changed the title feat: Add hostname to payload WIP feat: Add hostname to payload Aug 31, 2022
Signed-off-by: Adnan Kobir <adnan.kobir@gmail.com>
Signed-off-by: Adnan Kobir <adnan.kobir@gmail.com>
Signed-off-by: Adnan Kobir <adnan.kobir@gmail.com>
@Issif
Copy link
Member

Issif commented Oct 12, 2022

I saw you closed your PR and why. Do you think this one is still relevant? hostname is listed among other output_fields, we shall not need to create a specific field. Wdyt?

edit: with last version of Falco, it's a dedicated field

@@ -71,6 +71,10 @@ func (c *Client) WavefrontPost(falcopayload types.FalcoPayload) {
tags["rule"] = falcopayload.Rule
tags["source"] = falcopayload.Source

if len(falcopayload.Hostname) != 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if len(falcopayload.Hostname) != 0 {
if falcopayload.Hostname != "" {

Copy link
Member

@Issif Issif left a comment

Choose a reason for hiding this comment

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

We added a bunch of new outputs, can you rebase and see if we must add the hostname either, please

@Issif
Copy link
Member

Issif commented Nov 29, 2022

Hi,

Can you resolve the conflicts and apply the suggestion I made please, I'm hoping to release the 2.27 in the next 2 weeks

@Issif
Copy link
Member

Issif commented Nov 29, 2022

#383 has been merged, this PR is not useful anymore finally.

@Issif Issif closed this Nov 29, 2022
@Issif Issif modified the milestone: 2.27.0 Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants