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

Add module for GCP VPC flow logs #12747

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Jul 2, 2019

This module ingests Google Cloud VPC flow logs that have been exported by Stackdriver to a Google Cloud Pub/Sub topic sink.

The published LogEntry objects have this format: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

The structured data in the flow logs have this format: https://cloud.google.com/vpc/docs/using-flow-logs#record_format

@elasticmachine
Copy link
Collaborator

Pinging @elastic/secops

@andrewkroh andrewkroh force-pushed the feature/fb/google-vpc-flowlogs-module branch from a89ffa5 to 83027d7 Compare July 2, 2019 05:33
This module ingests Google Cloud VPC flow logs that have been exported by Stackdriver to a Google Cloud Pub/Sub topic sink.

The published LogEntry objects have this format: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

The structured data in the flow logs have this format: https://cloud.google.com/vpc/docs/using-flow-logs#record_format
@andrewkroh andrewkroh force-pushed the feature/fb/google-vpc-flowlogs-module branch from 83027d7 to e27540b Compare July 2, 2019 19:06
@andrewkroh
Copy link
Member Author

This is smaller now and easier to review. I rebased it to remove all of other merged PRs that this was built upon.


*`var.credentials_file`*::

Path to a JSON file containing the credentials and key used to subscribe.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but eventually we'll want to support the secrets store for this?

Copy link
Member Author

@andrewkroh andrewkroh Jul 2, 2019

Choose a reason for hiding this comment

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

Yeah, the underlying input supports the keystore via credentials_json, where you can embed the whole json blob as string/bytes in the config this way the keystore is supported. But I didn't expose the param in the module, but probably should in the future.


# IP Autonomous System (AS) Lookup
- geoip:
database_file: GeoLite2-ASN.mmdb
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these come by default with the maxmind installation? Will it degrade somewhat gracefully if the files are not found?

Copy link
Member Author

Choose a reason for hiding this comment

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

They come with Elasticsearch by default. (source)

The database filename in the geoip config directory. The ingest-geoip module ships with the GeoLite2-City.mmdb, GeoLite2-Country.mmdb and GeoLite2-ASN.mmdb files.

I assume the pipeline would fail if someone removed them.

Copy link
Contributor

@tsg tsg left a comment

Choose a reason for hiding this comment

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

LGMT, nice work! I left a couple of questions, but this should be good to merge and backport.

@andrewkroh andrewkroh merged commit 983564f into elastic:master Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants