forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## This PR provides the following 1. Plugin infra for developing providers and functions 2. A local stdin provider only used for testing, I will remove it in the final version. 3. AWS provider and function types for: - Cloudwatch logs - SQS - Kinesis - Api web gateway proxy 4. License checker 5. Packaging of artifact 6. Runners 7. CLI infrastructure 8. CLI to push a cloudwatch logs function. 9. CLI to delete any function 10. Processors support. 11. Types to validate value from the users and the lambda function. ## What it doesn't provides - ECS and full event extraction. (NOT for v1) - Specifying the AWS credentials in the configuration - CLI for SQS, Kinesis, API - Robust CLI interaction with the API, rollback on failure / versioning. - Removal of not supported outputs - Removal of seccomp check - Integration tests - Updated build task to produce containing the user executable beat and the linux beats. - Concurrency / memory settings
- Loading branch information
Showing
80 changed files
with
4,884 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import json | ||
import csv | ||
import re | ||
import pdb | ||
import copy | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
.vscode | ||
/*/_meta/kibana.generated | ||
beatless | ||
beatless.test | ||
build | ||
data | ||
fields.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM golang:1.10.3 | ||
MAINTAINER Pier-Hugues Pellerin <ph@elastic.co> | ||
|
||
RUN set -x && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
netcat python-pip rsync virtualenv && \ | ||
apt-get clean | ||
|
||
RUN pip install --upgrade setuptools | ||
|
||
# Setup work environment | ||
ENV BEATLESS_PATH /go/src/github.com/elastic/beats/x-pack/beatless | ||
|
||
RUN mkdir -p $BEATLESS_PATH/build/coverage | ||
WORKDIR $BEATLESS_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
########################## Beatless Configuration ########################### | ||
|
||
# This file is a full configuration example documenting all non-deprecated | ||
# options in comments. For a shorter configuration example, that contains only | ||
# the most common options, please see beatless.yml in the same directory. | ||
# | ||
# You can find the full configuration reference here: | ||
# https://www.elastic.co/guide/en/beats/beatless/index.html | ||
# | ||
#============================ Provider =============================== | ||
# Configure functions to run on AWS Lambda, currently we assume that the credentials | ||
# are present in the environment to correctly create the function when using the CLI. | ||
# | ||
beatless.provider.aws.functions: | ||
# Define the list of function availables, each function required to have a unique name. | ||
- name: fn_cloudwatch_logs | ||
type: cloudwatch_logs | ||
|
||
# Description of the method to help identify them when you run multiples functions. | ||
description: "lambda function for cloudwatch logs" | ||
|
||
# Concurrency, is the reserved number of instances for that function. | ||
# Default is unreserved. | ||
# | ||
# Note: There is a hard limit of 1000 functions of any kind per account. | ||
#concurrency: 5 | ||
|
||
# The maximum memory allocated for this function, the configured size must be a factor of 64. | ||
# There is a hard limit of 3008MiB for each function. Default is 128MiB. | ||
#memory_size: 128MiB | ||
|
||
# Dead letter queue configuration, this must be set to an ARN pointing to a SQS queue. | ||
# dead_letter_config.target_arn: | ||
|
||
# Optional fields that you can specify to add additional information to the | ||
# output. Fields can be scalar values, arrays, dictionaries, or any nested | ||
# combination of these. | ||
#fields: | ||
# env: staging | ||
|
||
# List of cloudwatch log group registered to that function. | ||
triggers: | ||
- log_group_name: /aws/lambda/beatless-cloudwatch_logs | ||
filter_pattern: mylog_ | ||
|
||
# Define custom processors for this function. | ||
#processors: | ||
# - dissect: | ||
# tokenizer: "%{key1} %{key2}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
################### Beatless Configuration Example ######################### | ||
###################### Beatless Configuration Example ####################### | ||
|
||
############################# Beatless ###################################### | ||
# This file is an example configuration file highlighting only the most common | ||
# options. The beatless.reference.yml file from the same directory contains all the | ||
# supported options with more comments. You can use it as a reference. | ||
# | ||
# You can find the full configuration reference here: | ||
# https://www.elastic.co/guide/en/beats/beatless/index.html | ||
# | ||
|
||
beatless: | ||
#============================ Provider =============================== | ||
# Configure functions to run on AWS Lambda, currently we assume that the credentials | ||
# are present in the environment to correctly create the function when using the CLI. | ||
# | ||
beatless.provider.aws.functions: | ||
# Accepts events from a cloudwatch log group. | ||
- name: fn_cloudwatch_logs | ||
type: cloudwatch_logs | ||
# The IAM role that the lambda will take when executing your function. | ||
role: iam | ||
# List of cloudwatch streams registered to this function. | ||
triggers: | ||
- log_group_name: /aws/lambda/beatless-cloudwatch_logs | ||
filter_name: myfiltername | ||
filter_pattern: mylog_ | ||
|
||
# Accepts events from a SQS queue. | ||
# - name: fn_sqs | ||
# type: sqs | ||
# | ||
# Accepts events form a Kinesis stream | ||
# - name: fn_kinesis | ||
# type: kinesis | ||
# | ||
# Accepts events from an api gateway proxy call. | ||
# - name: fn_apigateway_proxy | ||
# type: api_gateway_proxy |
Oops, something went wrong.