Help EC2 CloudWatch and agent integration Windows agent deployment for EC2 instance

Windows agent installation

Compatability and prerequisites

Supported operating Systems

Our Windows agent supports the following server editions – Windows 2008, 2012, 2016 and their related service packs.

Processor architecture

  • Windows - 32-bit and 64-bit architecture

Agent version

  • Windows agent: version 18.1.5 and above

To install the Windows agent on the EC2 instance

In order to install the Windows agent on the instance, you need to first connect to you instance .

  • connect to your instance using the remote desktop (RDP) client.
  • Download the Site24x7 Windows Agent .MSI installer image
  • Open the .msi file to start the Site24x7 Window Agent Setup wizard
  • Enter your Device key (Device key can be obtained from Admin > Developer > Device Key) 
  • Select a installation folder where you want to place the agent
  • Then, follow the instructions to complete the installation procedure.

Install Windows agent while launching an already created Amazon Machine Image (AMI)

When you launch an Windows instance using the Amazon EC2 management console, you have the option of running a configuration script on the instance by passing user data. Copy the "Install Windows agent script" from the link, append the Device key, save the txt file and pass it as user data. The commands will be executed on the Windows instance at launch.

Follow the below mentioned steps to deploy the Windows agent during instance launch

  • Copy the "Install Windows agent script" from the link to an editor
  • Edit the script to include your DEVICE Key and save the text file on your machine.
    Device key can be obtained from Admin > Developer > Device Key. 
  • Now login to your AWS account, navigate to the EC2 management console
  • In the Create instance section, select launch instance.
  • Under the choose AMI tab, select the type of AMI to use.
  • Under the “Configure instance tab” select “Advance details” to expand the section.
  • Under the “User data” field, select the “As file” option
  • Click on the “choose file” option to upload the saved txt file from you local machine
  • Once you are done, review and launch the instance.
If you are launching more than one instance at a time, then the user data will be a available for all instances that are getting launched in that group

Windows agent installation via Cloud formation templates

Using AWS CloudFormation template, you can create Windows EC2 instances and other related application components for your stack. Here again you can pass the "Install Windows agent text file" to the EC2 instance using the User data property

To deploy the Windows Agent, append the device key to the below given script and add it as part of the User data property - found under the resource declaration section of your launch template, where you define your EC2 instance.

"UserData":{
"Fn::Base64":{
"Fn::Join":[",",[
"\n"
"(New-Object
Net.WebClient).DownloadFile('https://staticdownloads.site24x7.com/server/Site24x7Windows Agent.msi','Site24x7WindowsAgent.msi')\n"
"msiexec.exe/iSite24x7WindowsAgent.msiEDITA1=ENABLESILENT=YES REBOOT=ReallySuppress/qn\n"
"\n"
"true\n"
]
]
}
}

Windows agent installation during AutoScaling

By using the "Create launch configuration" option in the EC2 management console you can create and assign a new template to an AutoScaling group. Here you define the instance AMI ID, instance type, security group etc. The AutoScaling group will use this information to launch new EC2 instances.

You can pass the "Install Windows agent text file" using the user data property, to make sure the agent gets deployed in all the newly provisioned AutoScaling instances.

  • Copy the install Windows agent script from the link to an editor
  • Edit the script to include your DEVICE Key and save the text file in your local machine.
    Device key can be obtained from Admin > Developer > Device Key. 
  • Login into your AWS account and navigate to the EC2 management console
  • In the navigation pane under Auto Scaling select “Launch configuration” and click on “Create launch configuration”.
  • Under the “Choose AMI tab”, select the AMI you want to use, under the “Configure details” tab, select advanced details to expand the section
  • Select the “As file” option in the “User data” field. Browse and upload the saved txt file..
  • Now review and launch the newly created configuration, once done you can apply the launch configuration to your AutoScaling group.

Windows agent installation via AWS Command Line Interface

You can also use to the AWS Command Line Interface (CLI) to install the Windows agent

To install the AWS CLI on your machine, follow the steps mentioned here.

  • Now, copy the "Install Windows agent script" from the link to an editor
  • Edit the script to include your DEVICE Key and save the text file on your machine.
  • Run the following command in your CLI
ec2-run-instances --key KEYPAIR --user-data-file InstallWindowsagentscript.txt ami-bf5eb9d6
Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.

Help EC2 CloudWatch and agent integration Windows agent deployment for EC2 instance