<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://bitpost.com/w/index.php?action=history&amp;feed=atom&amp;title=CloudWatch</id>
	<title>CloudWatch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://bitpost.com/w/index.php?action=history&amp;feed=atom&amp;title=CloudWatch"/>
	<link rel="alternate" type="text/html" href="https://bitpost.com/w/index.php?title=CloudWatch&amp;action=history"/>
	<updated>2026-04-19T06:58:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://bitpost.com/w/index.php?title=CloudWatch&amp;diff=4611&amp;oldid=prev</id>
		<title>M: Created page with &quot;            The AWS CloudWatch service allows logging from EC2 instances to be gathered in a central location.  It is available within Amazon&#039;s GovCloud environment....&quot;</title>
		<link rel="alternate" type="text/html" href="https://bitpost.com/w/index.php?title=CloudWatch&amp;diff=4611&amp;oldid=prev"/>
		<updated>2018-02-28T13:21:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;            The AWS CloudWatch service allows logging from EC2 instances to be gathered in a central location.  It is available within Amazon&amp;#039;s GovCloud environment....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;            The AWS CloudWatch service allows logging from EC2 instances to be gathered in a central location.  It is available within Amazon&amp;#039;s GovCloud environment.&lt;br /&gt;
&lt;br /&gt;
            You should set up an AWS CloudWatch service,&lt;br /&gt;
            and set up a CloudWatch agent on each endpoint for which you want to gather logs.&lt;br /&gt;
            Instructions are provided for linux and Windows.&lt;br /&gt;
            Mac systems may be able to follow linux instructions (to be verified).&lt;br /&gt;
&lt;br /&gt;
            Set up CloudWatch in a GovCloud VPC:&lt;br /&gt;
&lt;br /&gt;
                * Get a GovRamp account&lt;br /&gt;
                * Create some EC2 instances, recommended to be tagged with a &amp;quot;stack&amp;quot; tag, eg:&lt;br /&gt;
                    Name: mbehrnsm-stack    Value: cloudwatch1      (&amp;lt;-customize these)&lt;br /&gt;
                    * Set up a RHEL micro EC2 instance with CloudWatch monitoring initially set to enabled&lt;br /&gt;
                    * Set up a Windows 2016 micro EC2 instance with CloudWatch monitoring initially set to enabled&lt;br /&gt;
                * Set up a CloudWatch group in your target region, eg:&lt;br /&gt;
                    https://console.amazonaws-us-gov.com/cloudwatch/home?region=us-gov-west-1#logs:&lt;br /&gt;
                        Logs &amp;gt; Actions &amp;gt; Create log group &amp;gt; Log Group Name &amp;gt; MyCloudWatchGroup (&amp;lt;-customize this)&lt;br /&gt;
&lt;br /&gt;
                    * set up streams underneath the group, one for each EC2 Instance&lt;br /&gt;
                        Note that these streams may be autocreated when you run the instance agent, but you can also pre-create them:&lt;br /&gt;
                            select your group MyCloudWatchGroup &amp;gt; Create Log Stream &amp;gt; Log Stream Name &amp;gt; MyCloudWatch-linux-stream (&amp;lt;-customize this)&lt;br /&gt;
                            select your group MyCloudWatchGroup &amp;gt; Create Log Stream &amp;gt; Log Stream Name &amp;gt; MyCloudWatch-windows-stream (&amp;lt;-customize this)&lt;br /&gt;
&lt;br /&gt;
                * set up an IAM Role which will be used by agents to access CloudWatch resources&lt;br /&gt;
                    https://console.amazonaws-us-gov.com/iam (AS ADMINISTRATOR)&lt;br /&gt;
                        &amp;gt; Roles &amp;gt; Create new role &amp;gt; AWS Service Role &amp;gt; Amazon EC2 &amp;gt; Select&lt;br /&gt;
                            &amp;gt; Filter: CloudWatch &amp;gt; (select all)&lt;br /&gt;
                            &amp;gt; Filter: AmazonSSMFullAccess &amp;gt; (select - NOTE that this allows Run command to install Windows agent)&lt;br /&gt;
                        &amp;gt; Next &amp;gt; Create role &amp;gt; Name: MyCloudWatchAccess (&amp;lt;-customize this)&lt;br /&gt;
&lt;br /&gt;
            Set up linux CloudWatch agent:&lt;br /&gt;
&lt;br /&gt;
                * attach the CloudWatchAccess role to the EC2 instance&lt;br /&gt;
                    https://console.aws.amazon.com/ec2/&lt;br /&gt;
                        &amp;gt; right-click Instance &amp;gt; Instance Settings &amp;gt; Attach/Replace IAM role&lt;br /&gt;
                            &amp;gt; select MyCloudWatchAccess role &amp;gt; Apply&lt;br /&gt;
&lt;br /&gt;
                * Follow this guide to run a python script that installs the agent:&lt;br /&gt;
                    https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html&lt;br /&gt;
                    [ec2-user@ip-172-31-29-104 ~]$ sudo python ./awslogs-agent-setup.py --region us-gov-west-1&lt;br /&gt;
                        Destination Log Group name: mbehrnsm-cloudwatch1&lt;br /&gt;
                        Log Stream &amp;gt; 3 (custom) &amp;gt; MyCloudWatch-linux-stream&lt;br /&gt;
&lt;br /&gt;
            Set up windows CloudWatch agent:&lt;br /&gt;
&lt;br /&gt;
                * attach the CloudWatchAccess role to the EC2 instance&lt;br /&gt;
                    https://console.aws.amazon.com/ec2/&lt;br /&gt;
                        &amp;gt; right-click Instance &amp;gt; Instance Settings &amp;gt; Attach/Replace IAM role&lt;br /&gt;
                            &amp;gt; select MyCloudWatchAccess role &amp;gt; Apply&lt;br /&gt;
&lt;br /&gt;
                * use the AWS console to set up CloudWatch agent on the instance&lt;br /&gt;
                    EC2 &amp;gt; Systems Manager Services sidebar &amp;gt; Run Command&lt;br /&gt;
                    https://console.amazonaws-us-gov.com/ec2/home?region=us-gov-west-1#Commands:CommandId=9b65649f-82da-4b16-838c-c18644fbc211;sort=CommandId&lt;br /&gt;
&lt;br /&gt;
                        &amp;gt; Run a command &amp;gt;&lt;br /&gt;
                            select AWS-ConfigureCloudWatch&lt;br /&gt;
                            select the windows EC2 instance manually (if you don&amp;#039;t see it, review your IAM permissions, see above)&lt;br /&gt;
                            Execute on: 1&lt;br /&gt;
                            Stop after: 1&lt;br /&gt;
                            Status: Enabled&lt;br /&gt;
                            Properties: paste JSON&lt;br /&gt;
                                Follow this guide to generate a JSON file that defines the logging that will occur:&lt;br /&gt;
                                https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartWindows2016.html&lt;br /&gt;
                                See the attached example.&lt;/div&gt;</summary>
		<author><name>M</name></author>
	</entry>
</feed>