Skip to content

Commit

Permalink
# This is a combination of 7 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

# This is a combination of 6 commits.
# This is the 1st commit message:

Initial commit for GetMetricData query utilities

added configuration file for CWA test

inital commit for data collection/GetMetricData portion of test

initial commit for main test driver that starts agent and then calls data collection

changed test error to fatal if error is returned by data collection

added comments

removed unnecessary code that prints output

copy CWA config file to it's destination

changed log print to error return in utilities. few small formatting changes

implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code

fixed creation of metric names for query and added comments

fixed config spacing

fixed agent runtime

addressed more pull request comments. Moved config parsing to a new function

Performance Tracking Integration Test and Data Collection (aws#497)

* Initial commit for GetMetricData query utilities

added configuration file for CWA test

inital commit for data collection/GetMetricData portion of test

initial commit for main test driver that starts agent and then calls data collection

changed test error to fatal if error is returned by data collection

added comments

removed unnecessary code that prints output

* copy CWA config file to it's destination

* changed log print to error return in utilities. few small formatting changes

* implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code

* fixed creation of metric names for query and added comments

* fixed config spacing

* fixed agent runtime

* addressed more pull request comments. Moved config parsing to a new function

added statistics calculation and log monitoring to CWA config. test now writes to log files while CWA monitors

Initial commit for GetMetricData query utilities

added configuration file for CWA test

inital commit for data collection/GetMetricData portion of test

initial commit for main test driver that starts agent and then calls data collection

changed test error to fatal if error is returned by data collection

added comments

removed unnecessary code that prints output

copy CWA config file to it's destination

changed log print to error return in utilities. few small formatting changes

implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code

fixed creation of metric names for query and added comments

fixed config spacing

fixed agent runtime

addressed more pull request comments. Moved config parsing to a new function

Performance Tracking Integration Test and Data Collection (aws#497)

* Initial commit for GetMetricData query utilities

added configuration file for CWA test

inital commit for data collection/GetMetricData portion of test

initial commit for main test driver that starts agent and then calls data collection

changed test error to fatal if error is returned by data collection

added comments

removed unnecessary code that prints output

* copy CWA config file to it's destination

* changed log print to error return in utilities. few small formatting changes

* implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code

* fixed creation of metric names for query and added comments

* fixed config spacing

* fixed agent runtime

* addressed more pull request comments. Moved config parsing to a new function

Performance Tracking Integration Test and Data Collection (aws#497)

* Initial commit for GetMetricData query utilities

added configuration file for CWA test

inital commit for data collection/GetMetricData portion of test

initial commit for main test driver that starts agent and then calls data collection

changed test error to fatal if error is returned by data collection

added comments

removed unnecessary code that prints output

* copy CWA config file to it's destination

* changed log print to error return in utilities. few small formatting changes

* implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code

* fixed creation of metric names for query and added comments

* fixed config spacing

* fixed agent runtime

* addressed more pull request comments. Moved config parsing to a new function

fixed merge conflicts

# The commit message aws#2 will be skipped:

# Reduce timeout for scrapping IMDS and give instruction when fail to scrape IMDS inside container (aws#480)
#
# * Fix Aggregrator Shut Down Behavior
# 
# * Always setting hops to 2 if CloudWatchAgent is deployed as container
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instruction when fail to scrape IMDS inside container

# The commit message aws#3 will be skipped:

# Export Go Bin Path (aws#498)
#

# The commit message aws#4 will be skipped:

# Performance Tracking Integration Test and Data Collection (aws#497)
#
# * Initial commit for GetMetricData query utilities
# 
# added configuration file for CWA test
# 
# inital commit for data collection/GetMetricData portion of test
# 
# initial commit for main test driver that starts agent and then calls data collection
# 
# changed test error to fatal if error is returned by data collection
# 
# added comments
# 
# removed unnecessary code that prints output
# 
# * copy CWA config file to it's destination
# 
# * changed log print to error return in utilities. few small formatting changes
# 
# * implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
# 
# * fixed creation of metric names for query and added comments
# 
# * fixed config spacing
# 
# * fixed agent runtime
# 
# * addressed more pull request comments. Moved config parsing to a new function

# The commit message aws#5 will be skipped:

# Update release note V352 (aws#502)
#

# The commit message aws#6 will be skipped:

# Support escape path for MacOs, Linux (aws#499)
#
# * Support scrapt paths for Linux,MacOs
# 
# * Support escape path for MacOs, Linux

# The commit message aws#2 will be skipped:

# Initial commit for GetMetricData query utilities
#
# added configuration file for CWA test
#
# inital commit for data collection/GetMetricData portion of test
#
# initial commit for main test driver that starts agent and then calls data collection
#
# changed test error to fatal if error is returned by data collection
#
# added comments
#
# removed unnecessary code that prints output
#
# copy CWA config file to it's destination
#
# changed log print to error return in utilities. few small formatting changes
#
# implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
#
# fixed creation of metric names for query and added comments
#
# fixed config spacing
#
# fixed agent runtime
#
# addressed more pull request comments. Moved config parsing to a new function
#
# Performance Tracking Integration Test and Data Collection (aws#497)
#
# * Initial commit for GetMetricData query utilities
#
# added configuration file for CWA test
#
# inital commit for data collection/GetMetricData portion of test
#
# initial commit for main test driver that starts agent and then calls data collection
#
# changed test error to fatal if error is returned by data collection
#
# added comments
#
# removed unnecessary code that prints output
#
# * copy CWA config file to it's destination
#
# * changed log print to error return in utilities. few small formatting changes
#
# * implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
#
# * fixed creation of metric names for query and added comments
#
# * fixed config spacing
#
# * fixed agent runtime
#
# * addressed more pull request comments. Moved config parsing to a new function
#
# added statistics calculation and log monitoring to CWA config. test now writes to log files while CWA monitors
#
# Initial commit for GetMetricData query utilities
#
# added configuration file for CWA test
#
# inital commit for data collection/GetMetricData portion of test
#
# initial commit for main test driver that starts agent and then calls data collection
#
# changed test error to fatal if error is returned by data collection
#
# added comments
#
# removed unnecessary code that prints output
#
# copy CWA config file to it's destination
#
# changed log print to error return in utilities. few small formatting changes
#
# implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
#
# fixed creation of metric names for query and added comments
#
# fixed config spacing
#
# fixed agent runtime
#
# addressed more pull request comments. Moved config parsing to a new function
#
# Performance Tracking Integration Test and Data Collection (aws#497)
#
# * Initial commit for GetMetricData query utilities
#
# added configuration file for CWA test
#
# inital commit for data collection/GetMetricData portion of test
#
# initial commit for main test driver that starts agent and then calls data collection
#
# changed test error to fatal if error is returned by data collection
#
# added comments
#
# removed unnecessary code that prints output
#
# * copy CWA config file to it's destination
#
# * changed log print to error return in utilities. few small formatting changes
#
# * implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
#
# * fixed creation of metric names for query and added comments
#
# * fixed config spacing
#
# * fixed agent runtime
#
# * addressed more pull request comments. Moved config parsing to a new function
#
# Performance Tracking Integration Test and Data Collection (aws#497)
#
# * Initial commit for GetMetricData query utilities
#
# added configuration file for CWA test
#
# inital commit for data collection/GetMetricData portion of test
#
# initial commit for main test driver that starts agent and then calls data collection
#
# changed test error to fatal if error is returned by data collection
#
# added comments
#
# removed unnecessary code that prints output
#
# * copy CWA config file to it's destination
#
# * changed log print to error return in utilities. few small formatting changes
#
# * implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
#
# * fixed creation of metric names for query and added comments
#
# * fixed config spacing
#
# * fixed agent runtime
#
# * addressed more pull request comments. Moved config parsing to a new function
#
# fixed merge conflicts
#
# changed period in GetMetrics call 30->10

# The commit message aws#3 will be skipped:

# Reduce timeout for scrapping IMDS and give instruction when fail to scrape IMDS inside container (aws#480)
#
# * Fix Aggregrator Shut Down Behavior
# 
# * Always setting hops to 2 if CloudWatchAgent is deployed as container
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instrucstion when timeout--ammend
# 
# * Reduce timeout for scrapping IMDS and give instruction when fail to scrape IMDS inside container

# The commit message aws#4 will be skipped:

# Export Go Bin Path (aws#498)
#

# The commit message aws#5 will be skipped:

# Performance Tracking Integration Test and Data Collection (aws#497)
#
# * Initial commit for GetMetricData query utilities
# 
# added configuration file for CWA test
# 
# inital commit for data collection/GetMetricData portion of test
# 
# initial commit for main test driver that starts agent and then calls data collection
# 
# changed test error to fatal if error is returned by data collection
# 
# added comments
# 
# removed unnecessary code that prints output
# 
# * copy CWA config file to it's destination
# 
# * changed log print to error return in utilities. few small formatting changes
# 
# * implemented feedback from PR. Biggest change is dynamically grabbing metric names from config file instead of them being declared in the code
# 
# * fixed creation of metric names for query and added comments
# 
# * fixed config spacing
# 
# * fixed agent runtime
# 
# * addressed more pull request comments. Moved config parsing to a new function

# The commit message aws#6 will be skipped:

# Update release note V352 (aws#502)
#

# The commit message aws#7 will be skipped:

# Support escape path for MacOs, Linux (aws#499)
#
# * Support scrapt paths for Linux,MacOs
# 
# * Support escape path for MacOs, Linux
  • Loading branch information
gmealy1 committed Jul 7, 2022
1 parent 6451e8b commit 005cb1f
Show file tree
Hide file tree
Showing 25 changed files with 1,190 additions and 419 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: v1-go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}

- name: Test
run: make test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
path: |
~/Library/Caches/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: v1-go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}

- name: Test
run: make test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
path: |
%LocalAppData%\go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: v1-go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}

- name: Install make
run: choco install make
Expand Down
80 changes: 78 additions & 2 deletions .github/workflows/integrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
path: |
~/go/pkg/mod
~/.cache/go-build
key: v1-go-pkg-mod-${{ hashFiles('**/go.sum') }}
key: v1-go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}

- name: Cache binaries
id: cached_binaries
Expand Down Expand Up @@ -615,4 +615,80 @@ jobs:
max_attempts: 3
timeout_minutes: 8
retry_wait_seconds: 5
command: cd integration/terraform/ecs/linux && terraform destroy --auto-approve
command: cd integration/terraform/ecs/linux && terraform destroy --auto-approve

PerformanceTrackingTest:
name: "PerformanceTrackingTest"
needs: [MakeBinary, StartLocalStack, GenerateTestMatrix]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.TERRAFORM_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TERRAFORM_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Cache if success
id: performance-tracking
uses: actions/cache@v2
with:
path: go.mod
key: performance-tracking-test-${{ github.sha }}

- name: Echo Test Info
run: echo run performance-tracking
- name: Verify Terraform version
run: terraform --version
- name: Get SHA
id: sha
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Get git date
id: sha_date
run: echo "::set-output name=sha_date::$(git show -s --format=%ct ${{ steps.sha.outputs.sha_short }} )"
- name: Check env
run: echo "SHA ${{ steps.sha.outputs.sha_short }} | Date ${{ steps.sha_date.outputs.sha_date }} "
# nick-invision/retry@v2 starts at base dir
- name: Terraform apply
if: steps.performance-tracking.outputs.cache-hit != 'true'
uses: nick-invision/retry@v2
with:
max_attempts: 1
timeout_minutes: 50
retry_wait_seconds: 5
command: |
cd integration/terraform/ec2/linux
terraform init
if terraform apply --auto-approve \
-var="ssh_key=${PRIVATE_KEY}" -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \
-var="github_sha=${GITHUB_SHA}" -var="install_agent=rpm -U ./amazon-cloudwatch-agent.rpm" \
-var="user=ec2-user" \
-var="ami=cloudwatch-agent-integration-test-al2*" \
-var="ca_cert_path=/etc/ssl/certs/ca-bundle.crt" \
-var="arc=amd64" \
-var="binary_name=amazon-cloudwatch-agent.rpm" \
-var="local_stack_host_name=${{ needs.StartLocalStack.outputs.local_stack_host_name }}" \
-var="s3_bucket=${S3_INTEGRATION_BUCKET}" \
-var="vpc_security_group_ids=${VPC_SECURITY_GROUPS_IDS}" \
-var="key_name=${KEY_NAME}" \
-var="test_name=cw-integ-test-al2" \
-var="iam_instance_profile=${IAM_ROLE}" \
-var="sha=${{ steps.sha.outputs.sha_short }}" \
-var="sha_date=${{ steps.sha_date.outputs.sha_date }}" \
-var="test_dir=./integration/test/performancetest" ; then terraform destroy -auto-approve
else
terraform destroy -auto-approve && exit 1
fi
#This is here just in case workflow cancel
- name: Terraform destroy
if: ${{ cancelled() && steps.performance-tracking.outputs.cache-hit != 'true' }}
uses: nick-invision/retry@v2
with:
max_attempts: 3
timeout_minutes: 8
retry_wait_seconds: 5
command: cd integration/terraform/ec2/linux && terraform destroy --auto-approve
28 changes: 28 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
========================================================================
Amazon CloudWatch Agent 1.247352.0 (2022-05-26)
========================================================================

New features:
* Support log group retention in CloudWatch Logs for 6,7,8,9 years (#469)
* Add scraping ECS_CONTAINER_METADATA_URI_V4 for ECS (#453)
* Allow account ID as placeholder value for log configuration (#400)
* Restart agent on RPM upgrade to fix SSM feature to auto update CWAgent (#387)
* Increase dimension's maximum to 30 for each metrics (#361)
* Creates a system user, "aoc", for the AWS Distro for OpenTelemetry collector
without a shell, or updates an existing "aoc" user on the host so that the existing
"aoc" user has no shell.

Bug fixes:
* Avoid Windows Server 2022 and PowerShell ISE exit on stderr (#473)
* Enhance config validation for bad regex in CWAgent (#459)
* Delete log's state file when tailer terminates due to an error (#457)
* Auto_removal sends all remain logs before deleting the files (#452)
* Include metric name in warning message when value is negative (#445)
* Add writing to CWAgent's log before a panic (#421)
* Move conflicting log retention check to translator (#418)
* Fix race condition when creating log groups and log streams (ResourceAlreadyExists) (#416)
* Retry on network failure for detecting EC2 (#397)
* ECS Service Discovery: Fix implicit network mode (#385)
* Fix Windows event log messages truncated on Windows Server 2022 (#379)
* Make CloudWatch Logs's pusher to wait for the final flush to complete before returning (#350)

========================================================================
Amazon CloudWatch Agent 1.247350.0 (2022-01-19)
========================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ENV GO111MODULE=${GO111MODULE}
COPY go.mod /go/src/github.com/aws/amazon-cloudwatch-agent/
COPY go.sum /go/src/github.com/aws/amazon-cloudwatch-agent/
RUN go mod download -x

COPY . /go/src/github.com/aws/amazon-cloudwatch-agent/
RUN make build-for-docker-${TARGETARCH}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ spec:
hostPath:
path: /dev/disk/
terminationGracePeriodSeconds: 60
serviceAccountName: cloudwatch-agent
serviceAccountName: cloudwatch-agent
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func translateConfig() error {
log.Printf("I! Return exit error: exit code=%d\n", status.ExitStatus())

if status.ExitStatus() == config.ERR_CODE_NOJSONFILE {
log.Printf("I! there is no json configuration when running translator\n")
log.Printf("I! No json config files found, please provide config, exit now\n")
os.Exit(0)
}
}
Expand Down
17 changes: 10 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,20 @@ require (
github.com/Jeffail/gabs v1.4.0
github.com/Rican7/retry v0.1.1-0.20160712041035-272ad122d6e5
github.com/aws/aws-sdk-go v1.44.16
github.com/aws/aws-sdk-go-v2 v1.16.3
github.com/aws/aws-sdk-go-v2 v1.16.5
github.com/aws/aws-sdk-go-v2/config v1.15.3
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.9.4
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.1
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.4
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.15.7
github.com/aws/aws-sdk-go-v2/service/ec2 v1.29.0
github.com/aws/smithy-go v1.11.2
github.com/aws/smithy-go v1.11.3
github.com/bigkevmcd/go-configparser v0.0.0-20200217161103-d137835d2579
github.com/go-kit/kit v0.11.0
github.com/gobwas/glob v0.2.3
github.com/google/cadvisor v0.44.0
github.com/google/go-cmp v0.5.7
github.com/google/go-cmp v0.5.8
github.com/hashicorp/golang-lru v0.5.4
github.com/influxdata/telegraf v0.0.0-00010101000000-000000000000
github.com/influxdata/toml v0.0.0-20190415235208-270119a8ce65
Expand Down Expand Up @@ -121,11 +123,12 @@ require (
github.com/armon/go-metrics v0.3.10 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.3 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.13.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.26.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.3 // indirect
Expand Down
30 changes: 20 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQk
github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2 v1.13.0/go.mod h1:L6+ZpqHaLbAaxsqV0L4cvxZY7QupWJB4fhkf8LXvC7w=
github.com/aws/aws-sdk-go-v2 v1.16.2/go.mod h1:ytwTPBG6fXTZLxxeeCCWj2/EMYp/xDUgX+OET6TLNNU=
github.com/aws/aws-sdk-go-v2 v1.16.3 h1:0W1TSJ7O6OzwuEvIXAtJGvOeQ0SGAhcpxPN2/NK5EhM=
github.com/aws/aws-sdk-go-v2 v1.16.3/go.mod h1:ytwTPBG6fXTZLxxeeCCWj2/EMYp/xDUgX+OET6TLNNU=
github.com/aws/aws-sdk-go-v2 v1.16.5 h1:Ah9h1TZD9E2S1LzHpViBO3Jz9FPL5+rmflmb8hXirtI=
github.com/aws/aws-sdk-go-v2 v1.16.5/go.mod h1:Wh7MEsmEApyL5hrWzpDkba4gwAPc5/piwLVLFnCxp48=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 h1:SdK4Ppk5IzLs64ZMvr6MrSficMtjY2oS0WOORXTlxwU=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1/go.mod h1:n8Bs1ElDD2wJ9kCRTczA83gYbBmjSwZp3umc6zF4EeM=
github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw=
Expand All @@ -236,16 +236,20 @@ github.com/aws/aws-sdk-go-v2/config v1.15.3/go.mod h1:9YL3v07Xc/ohTsxFXzan9ZpFpd
github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ=
github.com/aws/aws-sdk-go-v2/credentials v1.11.2 h1:RQQ5fzclAKJyY5TvF+fkjJEwzK4hnxQCLOu5JXzDmQo=
github.com/aws/aws-sdk-go-v2/credentials v1.11.2/go.mod h1:j8YsY9TXTm31k4eFhspiQicfXPLZ0gYXA50i4gxPE8g=
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.9.4 h1:EoyeSOfbSuKh+bQIDoZaVJjON6PF+dsSn5w1RhIpMD0=
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.9.4/go.mod h1:bfCL7OwZS6owS06pahfGxhcgpLWj2W1sQASoYRuenag=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3 h1:LWPg5zjHV9oz/myQr4wMs0gi4CjnDN/ILmyZUFYXZsU=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3/go.mod h1:uk1vhHHERfSVCUnqSqz8O48LBYDSC+k6brng09jcMOk=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.5.3 h1:0O72494cCsazjpsGfo+LXezru6PMSp0HUB1m5UfpaRU=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.4/go.mod h1:XHgQ7Hz2WY2GAn//UXHofLfPXWh+s62MbMOijrg12Lw=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9 h1:onz/VaaxZ7Z4V+WIN9Txly9XLTmoOh1oJ8XcAC3pako=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9/go.mod h1:AnVH5pvai0pAF4lXRq0bmhbes1u9R8wTE+g+183bZNM=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 h1:Zt7DDk5V7SyQULUUwIKzsROtVzp/kVvcz15uQx/Tkow=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12/go.mod h1:Afj/U8svX6sJ77Q+FPWMzabJ9QjbwP32YlopgKALUpg=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.2.0/go.mod h1:BsCSJHx5DnDXIrOcqB8KN1/B+hXLG/bi4Y6Vjcx/x9E=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3 h1:9stUQR/u2KXU6HkFJYlqnZEjBnbgrVbG6I5HN09xZh0=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3/go.mod h1:ssOhaLpRlh88H3UmEcsBoVKq309quMvm3Ds8e9d4eJM=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 h1:eeXdGVtXEe+2Jc49+/vAzna3FAQnUD4AagAw8tzbmfc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6/go.mod h1:FwpAKI+FBPIELJIdmQzlLtRe8LQSOreMcM2wBsPMvvc=
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10 h1:by9P+oy3P/CwggN4ClnW2D4oL91QV7pBzBICi1chZvQ=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10/go.mod h1:8DcYQcz0+ZJaSxANlHIsbbi6S+zMwjwdDqwW3r9AzaE=
Expand All @@ -257,15 +261,19 @@ github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.1 h1:8PHGmLw1QbTdXfgEpXclO
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.18.1/go.mod h1:Z+8JhhltQDM1vIHvEtQLr1wVVAqQVLpvCDMVqYBrwr8=
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.4 h1:mBqjBKtZzvAc9j7gU+FEHbhTKSr02iqMOdQIL/7GZ78=
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.15.4/go.mod h1:R49Py2lGoKH7bCpwhjN9l7MfR/PU6zHXn1tCRR8cwOs=
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.14.0 h1:P+eF8PKkeaiTfN/VBe5GI3uNdhwCPVYCQxchRewJcWk=
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.15.7 h1:Ls6kDGWNr3wxE8JypXgTTonHpQ1eRVCGNqaFHY2UASw=
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.15.7/go.mod h1:+v2jeT4/39fCXUQ0ZfHQHMMiJljnmiuj16F03uAd9DY=
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.13.7 h1:o2HKntJx3vr3y11NK58RA6tYKZKQo5PWWt/bs0rWR0U=
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.13.7/go.mod h1:FAVtDKEl/8WxRDQ33e2fz16RO1t4zeEwWIU5kR29xXs=
github.com/aws/aws-sdk-go-v2/service/ec2 v1.29.0 h1:7jk4NfzDnnSbaR9E4mOBWRZXQThq5rsqjlDC+uu9dsI=
github.com/aws/aws-sdk-go-v2/service/ec2 v1.29.0/go.mod h1:HoTu0hnXGafTpKIZQ60jw0ybhhCH1QYf20oL7GEJFdg=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 h1:T4pFel53bkHjL2mMo+4DKE6r6AuoZnM0fg7k1/ratr4=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1/go.mod h1:GeUru+8VzrTXV/83XyMJ80KpH8xO89VPoUileyNQ+tc=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.2 h1:T/ywkX1ed+TsZVQccu/8rRJGxKZF/t0Ivgrb4MHTSeo=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.2/go.mod h1:RnloUnyZ4KN9JStGY1LuQ7Wzqh7V0f8FinmRdHYtuaA=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3 h1:I0dcwWitE752hVSMrsLCxqNQ+UdEp3nACx2bYNMQq+k=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3/go.mod h1:Seb8KNmD6kVTjwRjVEgOT5hPin6sq+v4C2ycJQDwuH8=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.3 h1:JUbFrnq5mEeM2anIJ2PUkaHpKPW/D+RYAQVv5HXYQg4=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.3/go.mod h1:lgGDXBzoot238KmAAn6zf9lkoxcYtJECnYURSbvNlfc=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.6 h1:JGrc3+kkyr848/wpG2+kWuzHK3H4Fyxj2jnXj8ijQ/Y=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.6/go.mod h1:zwvTysbXES8GDwFcwCPB8NkC+bCdio1abH+E+BRe/xg=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.7.0/go.mod h1:K/qPe6AP2TGYv4l6n7c88zh9jWBDf6nHhvg1fx/EWfU=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3 h1:Gh1Gpyh01Yvn7ilO/b/hr01WgNpaszfbKMUgqM186xQ=
Expand All @@ -289,8 +297,9 @@ github.com/aws/aws-sdk-go-v2/service/timestreamwrite v1.3.2 h1:1s/RRA5Owuz4/G/eW
github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/aws/smithy-go v1.10.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/aws/smithy-go v1.11.2 h1:eG/N+CcUMAvsdffgMvjMKwfyDzIkjM6pfxMJ8Mzc6mE=
github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM=
github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8=
github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/telegraf v0.10.2-0.20220502160831-c20ebe67c5ef h1:O53nKbZm2XpdudUywNdqbohwUxje9k4vE0xRXWeIVbE=
github.com/aws/telegraf v0.10.2-0.20220502160831-c20ebe67c5ef/go.mod h1:6maU8S0L0iMSa0ZvH5b2W7dBX1xjK0D5ONAqe7WTqXc=
github.com/aws/telegraf/patches/gopsutil/v3 v3.0.0-20220502160831-c20ebe67c5ef h1:iiO0qNErnQgaU6mJY+PRlwnoHp+s9VTk2Ax1A8KRoG4=
Expand Down Expand Up @@ -881,8 +890,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0=
github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
Expand Down
1 change: 1 addition & 0 deletions integration/terraform/ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ for how to easily generate a new policy.
"ec2:DescribeVpcs",
"ec2:GetPasswordData",
"ec2:ModifyInstanceAttribute",
"dynamodb:*",
"ec2:RunInstances",
"ec2:TerminateInstances",
"s3:ListBucket",
Expand Down
6 changes: 5 additions & 1 deletion integration/terraform/ec2/linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ resource "aws_instance" "integration-test" {
provisioner "remote-exec" {
inline = [
"cloud-init status --wait",
"echo sha ${var.sha}",
"echo clone and install agent",
"export PATH=$PATH:/usr/local/go/bin",
"git clone ${var.github_repo}",
"cd amazon-cloudwatch-agent",
"git reset --hard ${var.github_sha}",
Expand All @@ -25,7 +27,9 @@ resource "aws_instance" "integration-test" {
"echo run tests with the tag integration, one at a time, and verbose",
"cd ~/amazon-cloudwatch-agent",
"echo run sanity test && go test ./integration/test/sanity -p 1 -v --tags=integration",
"go test ${var.test_dir} -p 1 -v --tags=integration"
"export SHA=${var.sha}",
"export SHA_DATE=${var.sha_date}",
"go test ${var.test_dir} -p 1 -timeout 30m -v --tags=integration "
]
connection {
type = "ssh"
Expand Down
8 changes: 8 additions & 0 deletions integration/terraform/ec2/linux/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,12 @@ variable "test_name" {
variable "test_dir" {
type = string
default = ""
}
variable "sha" {
type = string
default = ""
}
variable "sha_date"{
type = string
default = ""
}
Loading

0 comments on commit 005cb1f

Please sign in to comment.