Skip to content

fix: add latest changes from CWAgent#7

Merged
yimuniao merged 6 commits intoaws:masterfrom
pxaws:development
Jun 25, 2020
Merged

fix: add latest changes from CWAgent#7
yimuniao merged 6 commits intoaws:masterfrom
pxaws:development

Conversation

@pxaws
Copy link
Copy Markdown
Contributor

@pxaws pxaws commented Jun 24, 2020

As global endpoint is under the deprecation path, we will use regional STS endpoint
by default. To make sure our current customers will not be affected by this change,
whenever regional STS endpoint is not available, we will always fallback to the STS
endpoint of a particular partition which is always active.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

As global endpoint is under the deprecation path, we will use regional STS endpoint
by default. To make sure our current customers will not be affected by this change,
whenever regional STS endpoint is not available, we will always fallback to the STS
endpoint of a particular partition which is always active.
@pxaws pxaws requested review from haojhcwa and yimuniao June 24, 2020 22:47
pxaws added 2 commits June 24, 2020 17:48
With this change, customer can specify a aws region placeholder
in the log group/stream name like this:
"logs": {
        "logs_collected": {
            "files": {
                "collect_list": [
                    {
                        "file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log",
                        "log_group_name": "{hostname}-{aws_region}",
                        "log_stream_name": "{aws_region}"
                    }
                ]
            }
        }
    }

config-translator will replace the placeholder with proper values
@pxaws pxaws changed the title fix: add STS regional Endpoint support with fallback path fix: add latest changes from CWAgent Jun 25, 2020
pxaws added 3 commits June 24, 2020 20:20
File state folder contains the state files generated by agent. These files
keep track of the reading offset for the log files tracked by agent. Users
are not supposed to monitor the files in the file state folder. With some
misconfiguration, if the state files are also monitored by agent, new state
files tracking existing state files will be created. This is not desired
behavior and should be not allowed.
@yimuniao yimuniao merged commit f127a75 into aws:master Jun 25, 2020
gmealy1 added a commit to gmealy1/amazon-cloudwatch-agent that referenced this pull request Jul 7, 2022
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants