From 07e5d63760ebbeb97163f05319b16bfe209a5e21 Mon Sep 17 00:00:00 2001 From: mtojek Date: Fri, 19 Feb 2021 14:23:45 +0100 Subject: [PATCH] Support policy groups --- code/go/pkg/validator/validator_test.go | 1 + test/packages/policy_groups/changelog.yml | 5 + test/packages/policy_groups/docs/README.md | 1 + test/packages/policy_groups/docs/dynamodb.md | 1 + test/packages/policy_groups/docs/ec2.md | 1 + test/packages/policy_groups/manifest.yml | 119 +++++++++++++++++++ 6 files changed, 128 insertions(+) create mode 100644 test/packages/policy_groups/changelog.yml create mode 100644 test/packages/policy_groups/docs/README.md create mode 100644 test/packages/policy_groups/docs/dynamodb.md create mode 100644 test/packages/policy_groups/docs/ec2.md create mode 100644 test/packages/policy_groups/manifest.yml diff --git a/code/go/pkg/validator/validator_test.go b/code/go/pkg/validator/validator_test.go index f9922a82c..500cb66b8 100644 --- a/code/go/pkg/validator/validator_test.go +++ b/code/go/pkg/validator/validator_test.go @@ -39,6 +39,7 @@ func TestValidateFile(t *testing.T) { }, }, "input_template": {}, + "policy_groups": {}, } for pkgName, test := range tests { diff --git a/test/packages/policy_groups/changelog.yml b/test/packages/policy_groups/changelog.yml new file mode 100644 index 000000000..274a8fa73 --- /dev/null +++ b/test/packages/policy_groups/changelog.yml @@ -0,0 +1,5 @@ +- version: 1.0.0 + changes: + - description: initial release + type: enhancement + link: https://github.com/elastic/package-spec/pull/0 \ No newline at end of file diff --git a/test/packages/policy_groups/docs/README.md b/test/packages/policy_groups/docs/README.md new file mode 100644 index 000000000..372b90867 --- /dev/null +++ b/test/packages/policy_groups/docs/README.md @@ -0,0 +1 @@ +README for integration \ No newline at end of file diff --git a/test/packages/policy_groups/docs/dynamodb.md b/test/packages/policy_groups/docs/dynamodb.md new file mode 100644 index 000000000..33118d582 --- /dev/null +++ b/test/packages/policy_groups/docs/dynamodb.md @@ -0,0 +1 @@ +DynamoDB README file \ No newline at end of file diff --git a/test/packages/policy_groups/docs/ec2.md b/test/packages/policy_groups/docs/ec2.md new file mode 100644 index 000000000..370d47128 --- /dev/null +++ b/test/packages/policy_groups/docs/ec2.md @@ -0,0 +1 @@ +EC2 README file \ No newline at end of file diff --git a/test/packages/policy_groups/manifest.yml b/test/packages/policy_groups/manifest.yml new file mode 100644 index 000000000..f4c2bbd47 --- /dev/null +++ b/test/packages/policy_groups/manifest.yml @@ -0,0 +1,119 @@ +format_version: 1.0.0 +name: aws +title: AWS +version: 0.3.17 +license: basic +description: AWS Integration +type: integration +categories: + - aws + - cloud + - network + - security +release: beta +conditions: + kibana.version: '^7.9.0' +icons: + - src: /img/logo_aws.svg + title: logo aws + size: 32x32 + type: image/svg+xml +screenshots: + - src: /img/filebeat-aws-cloudtrail.png + title: filebeat aws cloudtrail + size: 1702x1063 + type: image/png + - src: /img/filebeat-aws-elb-overview.png + title: filebeat aws elb overview + size: 5120x2704 + type: image/png +vars: + - name: access_key_id + type: text + title: Access Key ID + - name: secret_access_key + type: text + title: Secret Access Key +policy_templates: + - name: ec2 + title: AWS EC2 + description: Collect logs and metrics from EC2 service + inputs: + - type: s3 + title: Collect logs from EC2 service + description: Collecting EC2 logs using S3 input + policy_group: ec2_logs + vars: + - name: visibility_timeout + type: text + title: Visibility Timeout + description: The duration that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. The maximum is 12 hours. + - name: api_timeout + type: text + title: API Timeout + description: The maximum duration of AWS API can take. The maximum is half of the visibility timeout value. + - type: aws/metrics + title: Collect metrics from EC2 service + description: Collecting EC2 metrics using AWS CloudWatch + policy_group: ec2_metrics + vars: + - name: endpoint + type: text + title: Endpoint + default: "amazonaws.com" + description: URL of the entry point for an AWS web service. + icons: + - src: /img/aws-ec2.svg + title: AWS EC2 logo + size: 32x32 + type: image/svg+xml + screenshots: + - src: /img/aws-ec2-overview.png + title: AWS EC2 Overview + size: 1702x1063 + type: image/png + vars: + - name: ec2_foobar_property + type: bool + title: EC2 Specific Property + - name: dynamodb + title: AWS DynamoDB + description: Collect logs and metrics from DynamoDB service + inputs: + - type: s3 + title: Collect logs from the DynamoDB service + description: Collecting DynamoDB logs using S3 input + policy_group: dynamodb_logs + - type: aws/metrics + title: Collect metrics from DynamoDB service + description: Collecting DynamoDB metrics using AWS CloudWatch + policy_group: dynamodb_metrics + icons: + - src: /img/aws-dynamodb.svg + title: AWS DynamoDB logo + size: 32x32 + type: image/svg+xml + screenshots: + - src: /img/aws-dynamodb-overview.png + title: AWS DynamoDB Overview + size: 1702x1063 + type: image/png + vars: + - name: dynamodb_foobar_property + type: bool + title: DynamoDB Specific Property +policy_groups: + - name: ec2_logs + title: "Logs" + description: "Collect logs from EC2 service" + - name: ec2_metrics + title: "Metrics" + description: "Collect metrics from EC2 service" + - name: dynamodb_logs + title: "Logs" + description: "Collect logs from DynamoDB service" + - name: dynamodb_metrics + title: "Metrics" + description: "Collect metrics from DynamoDB service" +owner: + github: elastic/integrations-platforms