Giter Club home page Giter Club logo

Comments (4)

altonotch avatar altonotch commented on August 24, 2024

I downloaded nightly build. It failed to run with error:

****** processing amazon-cloudwatch-agent ******
Got Home directory: /root I! Set home dir Linux: /root I! SDKRegionWithCredsMap region: us-east-2 Region: us-east-2 credsConfig: map[shared_credential_profile:default] Successfully fetched the config and saved in /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/ssm_AmazonCloudWatch-Config-External.tmp
Start configuration validation...
2023/12/05 22:18:45 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/ssm_AmazonCloudWatch-Config-External.tmp ...
2023/12/05 22:18:45 I! Valid Json input schema.
I! Detecting run_as_user...
Got Home directory: /root
Got Home directory: /root
I! Set home dir Linux: /root
I! SDKRegionWithCredsMap region:  us-east-2
No csm configuration found.
No metric configuration found.
Configuration validation first phase succeeded
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent -schematest -config /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml
Configuration validation second phase succeeded
Configuration validation succeeded
amazon-cloudwatch-agent has already been stopped

Tail on cloudwatch logs:

I! Set home dir Linux: /root
I! SDKRegionWithCredsMap region:
Got Home directory: /root
2023/12/05 22:18:52 E! Failed to generate configuration validation content.
2023/12/05 22:18:52 E! Failed to generate configuration validation content.
2023/12/05 22:18:52 Under path : /agent/ruleRegion/ | Error : Region info is missing for mode: onPrem
2023/12/05 22:18:52 Configuration validation first phase failed. Agent version: 1.0. Verify the JSON input is only using features supported by this version.

2023/12/05 22:18:52 I! Return exit error: exit code=1
2023/12/05 22:18:52 E! Cannot translate JSON config into TOML, ERROR is exit status 1

I modified the json configs to include region under agent section and now it runs w.o failing.

from amazon-cloudwatch-agent.

sethAmazon avatar sethAmazon commented on August 24, 2024

Not officially, but it will work. You need to set region in the config since this would be considered on prem install.

from amazon-cloudwatch-agent.

sethAmazon avatar sethAmazon commented on August 24, 2024

Oh, I see you set the region and it worked. That is as expected. The agent when running outside aws infra requires you to pass in a region because it can't find a default of where the instance of the agent is running.

from amazon-cloudwatch-agent.

okankoAMZ avatar okankoAMZ commented on August 24, 2024

Hello,
Did adding the region to the config fixed your issue? I will close this issue due to inactivity. If your issue is persistent please re-open this issue and we will assist you as soon as possible.

from amazon-cloudwatch-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.