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

[Filebeat] Add cloudwatch fileset in aws module #16579

Merged
merged 11 commits into from
Mar 12, 2020
Merged

[Filebeat] Add cloudwatch fileset in aws module #16579

merged 11 commits into from
Mar 12, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Feb 25, 2020

What does this PR do?

This PR is to add cloudwatch fileset into aws module to parse logs from CloudWatch AWS. There are different kinds of logs can be sent to CloudWatch from different services. This PR is only focusing on EC2 logs.

Why is it important?

Users can use Amazon CloudWatch Logs to monitor, store, and access log files from Amazon EC2 instances, AWS CloudTrail, Route 53, and other sources. This fileset enables users to export logs into s3 bucket and parse logs using this fileset.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Related issues

@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner February 25, 2020 20:59
@kaiyan-sheng kaiyan-sheng added Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. Team:Platforms Label for the Integrations - Platforms team labels Feb 25, 2020
@kaiyan-sheng kaiyan-sheng self-assigned this Feb 25, 2020
@exekias
Copy link
Contributor

exekias commented Feb 27, 2020

I understand cloudwatch is more like an input, right @kaiyan-sheng? Where the actual logs (coming from log groups) can be of many kinds.

Would it make sense to create specific filesets for these different cloudwatch logs sources? For instance, the examples you are putting here probably map to the system module, that can be reused if configured with the right input.

Then we have a plethora of other services that are AWS specific and we don't yet support as filesets.

@kaiyan-sheng
Copy link
Contributor Author

kaiyan-sheng commented Feb 27, 2020

I understand cloudwatch is more like an input, right @kaiyan-sheng? Where the actual logs (coming from log groups) can be of many kinds.

Yes, cloudwatch is more like an input. Different services can send logs into CW.

Would it make sense to create specific filesets for these different cloudwatch logs sources? For instance, the examples you are putting here probably map to the system module, that can be reused if configured with the right input.

That would be better for sure! The examples are logs sent to CloudWatch from EC2 instance. Should we rename this fileset something like cloudwatch_ec2?

Then we have a plethora of other services that are AWS specific and we don't yet support as filesets.

Great! That's why I added %{TIMESTAMP_ISO8601:_tmp.timestamp} %{GREEDYDATA:message} in grok pattern.

@exekias
Copy link
Contributor

exekias commented Feb 28, 2020

That would be better for sure! The examples are logs sent to CloudWatch from EC2 instance. Should we rename this fileset something like cloudwatch_ec2?

That sounds great! I wonder if we should keep the “cloudwatch” prefix or do just ec2. At the end, I foresee these filesets being shared between Filebeat & Functionbeat at some point (through the integrations project). If you call it ec2 now you can just make it clear in the docs & configs that this one comes from cloudwatch

@kaiyan-sheng
Copy link
Contributor Author

That sounds great! I wonder if we should keep the “cloudwatch” prefix or do just ec2. At the end, I foresee these filesets being shared between Filebeat & Functionbeat at some point (through the integrations project). If you call it ec2 now you can just make it clear in the docs & configs that this one comes from cloudwatch

Yeah if we ever decides to add cloudwatch as a separate Filebeat input, these filesets can be shared there too. I will change the fileset name to ec2 in next commit. Thanks! Will you be ok with cloudwatch as the fileset name for the default %{TIMESTAMP_ISO8601:_tmp.timestamp} %{GREEDYDATA:message} format logs?

@exekias
Copy link
Contributor

exekias commented Mar 3, 2020

Yeah if we ever decides to add cloudwatch as a separate Filebeat input, these filesets can be shared there too. I will change the fileset name to ec2 in next commit. Thanks! Will you be ok with cloudwatch as the fileset name for the default %{TIMESTAMP_ISO8601:_tmp.timestamp} %{GREEDYDATA:message} format logs?

I think this is a good idea!

@kaiyan-sheng
Copy link
Contributor Author

@exekias @mtojek This PR is ready for another review (when you get a chance). Thanks!

@exekias
Copy link
Contributor

exekias commented Mar 11, 2020

btw this needs a make update

@kaiyan-sheng kaiyan-sheng merged commit ad4597c into elastic:master Mar 12, 2020
@kaiyan-sheng kaiyan-sheng deleted the cw_fileset branch March 12, 2020 12:37
@kaiyan-sheng kaiyan-sheng added v7.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Mar 12, 2020
kaiyan-sheng added a commit that referenced this pull request Mar 17, 2020
…odule (#16978)

* [Filebeat] Add cloudwatch fileset in aws module (#16579)

* Add cloudwatch fileset in aws module

(cherry picked from commit ad4597c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat Team:Platforms Label for the Integrations - Platforms team v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filebeat] Add support for AWS CloudWatch logs
4 participants