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

[New Integration] Goflow2 integration #10561

Merged
merged 13 commits into from
Aug 8, 2024

Conversation

HaveSec
Copy link
Contributor

@HaveSec HaveSec commented Jul 23, 2024

The GoFlow2 integration allows you to monitor goflow2 logs. At the moment only goflow2 sflow logs are supported.

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

  • elastic-package check
  • elastic-package install
  • install elatic-agent
  • generate goflow2 sflow logs
    • goflow2 -format json -listen "sflow://:6343" -mapping /root/sflow/goflow2/mapping.yaml -transport.file /var/log/sflow/goflow2/goflow2.log
# File: mapping.yaml
formatter:
    fields: # list of fields to format in JSON
        - type
        - time_flow_start_ns
        - sampler_address
        - sequence_num
        - in_if
        - out_if
        - src_addr
        - dst_addr
        - etype
        - proto
        - src_port
        - dst_port
        - src_vlan
        - dst_vlan
        - ip_flags
        - sampling_rate
        - bytes

Copy link

cla-checker-service bot commented Jul 23, 2024

💚 CLA has been signed

@andrewkroh andrewkroh added New Integration needs CLA User must sign the Elastic Contributor License before review. labels Jul 23, 2024
@jamiehynds jamiehynds requested a review from a team July 24, 2024 10:13
@jamiehynds jamiehynds added the Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices] label Jul 24, 2024
@elasticmachine
Copy link

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

@andrewkroh andrewkroh removed the needs CLA User must sign the Elastic Contributor License before review. label Jul 25, 2024
@andrewkroh
Copy link
Member

/test

@HaveSec
Copy link
Contributor Author

HaveSec commented Jul 26, 2024

/test

@@ -205,6 +205,7 @@
/packages/github @elastic/security-service-integrations
/packages/gitlab @elastic/security-service-integrations
/packages/golang @elastic/obs-infraobs-integrations
/packages/goflow2 @elastic/security-service-integrations
Copy link
Contributor

Choose a reason for hiding this comment

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

this one should be @elastic/sec-deployment-and-devices

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed.

Copy link
Contributor

@marioschaefer marioschaefer Aug 6, 2024

Choose a reason for hiding this comment

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

fixed in 43c25c7 and d737ad8

@pkoutsovasilis
Copy link
Contributor

@HaveSec @marioschaefer could you please add some tests for the sflow datastream?

@marioschaefer
Copy link
Contributor

@HaveSec @marioschaefer could you please add some tests for the sflow datastream?

on my list for today.

@marioschaefer
Copy link
Contributor

@HaveSec @marioschaefer could you please add some tests for the sflow datastream?

on my list for today.

@pkoutsovasilis took a bit longer, but now finished. all tests pass.

@taylor-swanson
Copy link
Contributor

/test

@marioschaefer
Copy link
Contributor

/test

@taylor-swanson codeowner fixed

packages/goflow2/changelog.yml Outdated Show resolved Hide resolved
packages/goflow2/docs/README.md Outdated Show resolved Hide resolved
packages/goflow2/manifest.yml Outdated Show resolved Hide resolved
packages/goflow2/_dev/build/docs/README.md Outdated Show resolved Hide resolved
packages/goflow2/img/sample-screenshot.png Outdated Show resolved Hide resolved
packages/goflow2/img/sample-logo.svg Outdated Show resolved Hide resolved
Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

One other note, I'm checking to see if we need a fields/ecs.yml file or not. In the past, we did, otherwise elastic-package would complain about the ECS fields, but that doesn't seem like the case now.

@marioschaefer
Copy link
Contributor

@taylor-swanson could you pls check?

@taylor-swanson
Copy link
Contributor

/test

@elasticmachine
Copy link

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

Do we anticipate this list of fields ever to change? Specifically, could any of these fields become optional in the future?

# File: /etc/goflow2/mapping.yaml
formatter:
    fields: # list of fields to format in JSON
        - type
        - time_flow_start_ns
        - sampler_address
        - sequence_num
        - in_if
        - out_if
        - src_addr
        - dst_addr
        - etype
        - proto
        - src_port
        - dst_port
        - src_vlan
        - dst_vlan
        - sampling_rate
        - bytes

If yes, then I would advocate for null checks/ignore_missing on every (applicable) processor. Otherwise I'm fine with leaving those off for now. Since we've specified this in the documentation, we know they should be there and it isn't as critical to add null checks and ignore_missing everywhere.

@taylor-swanson
Copy link
Contributor

/test

Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link

💚 Build Succeeded

History

@taylor-swanson taylor-swanson merged commit 920aa51 into elastic:main Aug 8, 2024
5 checks passed
@elasticmachine
Copy link

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

@andrewkroh andrewkroh added the Integration:goflow2 GoFlow2 logs label Aug 12, 2024
jvalente-salemstate pushed a commit to jvalente-salemstate/integrations that referenced this pull request Aug 21, 2024
- Add the GoFlow2 integration to monitor goflow2 logs
- Add initial sflow data stream to ingest sflow logs from goflow2
- Add system and pipeline tests
---------

Co-authored-by: Christian Hilgers <[email protected]>
Co-authored-by: Mario Schäfer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:goflow2 GoFlow2 logs New Integration Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants