{"id":15113774,"url":"https://github.com/sattyagrah/awscloudwatchagent","last_synced_at":"2026-01-19T00:32:52.859Z","repository":{"id":253040347,"uuid":"842279898","full_name":"sattyagrah/AWSCloudwatchAgent","owner":"sattyagrah","description":"Install CloudWatch agent (along with its configuration) in EC2 Linux instances. ","archived":false,"fork":false,"pushed_at":"2024-09-30T16:13:50.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T18:16:09.407Z","etag":null,"topics":["aws-ec2","bash-script","cloudwatch","cloudwatch-agent","cloudwatch-metrics","linux","linux-shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sattyagrah.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-14T03:10:38.000Z","updated_at":"2024-09-30T16:13:54.000Z","dependencies_parsed_at":"2024-08-17T12:45:29.635Z","dependency_job_id":null,"html_url":"https://github.com/sattyagrah/AWSCloudwatchAgent","commit_stats":null,"previous_names":["mrsatya21/cloudwatchagent","sattyagrah/cloudwatchagent"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sattyagrah%2FAWSCloudwatchAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sattyagrah%2FAWSCloudwatchAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sattyagrah%2FAWSCloudwatchAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sattyagrah%2FAWSCloudwatchAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sattyagrah","download_url":"https://codeload.github.com/sattyagrah/AWSCloudwatchAgent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378140,"owners_count":20929296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-ec2","bash-script","cloudwatch","cloudwatch-agent","cloudwatch-metrics","linux","linux-shell"],"created_at":"2024-09-26T01:23:12.431Z","updated_at":"2026-01-19T00:32:52.819Z","avatar_url":"https://github.com/sattyagrah.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to use\n\n#### Considerations\n\n\u003e [!IMPORTANT]\n\u003e \n\u003e + The script is tested on the following architecture and only works on the following OS : \n\u003e\n\u003e    \u003e ```\n\u003e    \u003e x86_64 (amd64): Amazon Linux 2, Amazon Linux 2023, SLES 12/15, RHEL 8/9, Ubuntu 20/22/24, Debian\n\u003e    \u003e aarch64 (arm64): Amazon Linux 2, Amazon Linux 2023, SLES 12/15, RHEL 8/9, Ubuntu 20/22/24\n\u003e    \u003e ``` \n\n#### Prerequisites\n\n\u003e [!WARNING]\n\u003e\n\u003e 1. Please make sure that the EC2 instance(s) have **[necessary permission](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent-commandline.html)** attached to it.\n\n#### Download the script \n\n```sh \ncurl \"https://raw.githubusercontent.com/sattyagrah/CloudWatchAgent/main/configuration.sh\" -o \"configuration.sh\"\n```\nand\n\n```sh\ncurl \"https://raw.githubusercontent.com/sattyagrah/CloudWatchAgent/main/cwagentinstall.sh\" -o \"cwagentinstall.sh\"\n```\n\n#### Give executable permission\n\n```sh\nchmod u+x cwagentinstall.sh\n```\n\n#### Execute the script\n\n```sh\n./cwagentinstall.sh\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e - If users want to change the configuration file of Cloudwatch agent or set the configuration file using wizards, they can do so by following the steps below : \n\u003e\n\u003e 1. Before executimg *(after downloading)* the **cwagentinstall.sh** file, make sure to comment the line [42](https://github.com/mrsatya21/CloudWatchAgent/blob/main/cwagentinstall.sh#L42) and [43](https://github.com/mrsatya21/CloudWatchAgent/blob/main/cwagentinstall.sh#L43). \n\u003e \n\u003e 2. Log in to your EC2 instance. \n\u003e\n\u003e 3. Run the command :\n\u003e    \u003e ```sh\n\u003e    \u003e sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard\n\u003e    \u003e ```\n\u003e\n\u003e 4. Follow the prompt and answer the questions asked and your configuration file will be ready.\n\u003e\n\u003e 5. After that you need to run the command *(to start the CloudWatch agent)* : \n\u003e    \u003e ```sh\n\u003e    \u003e sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -s\n\u003e    \u003e ```\n\u003e\n\u003e 6. Bingo! You are all set now. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsattyagrah%2Fawscloudwatchagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsattyagrah%2Fawscloudwatchagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsattyagrah%2Fawscloudwatchagent/lists"}