Installing and monitoring AWS (EC2 instances) with SQL Sentry

The following information is meant to assist with setting up SQL Sentry within this cloud based environment.

In order to proceed with the SQL Sentry setup, the following prerequisites must be completed:

• Spin up server/SQL Server for SQL Sentry installation

• Spin up server(s) to be monitored.

Once you have your servers set up, the following directions will allow you to set up SQL Sentry and begin monitoring in the cloud:

1. Allocate and associate Elastic IP addresses to each of your EC2 servers.

This can be done by selecting the Elastic IP’s link under the Network & Security node on the EC2 Dashboard.

Once this link opens, you will want to proceed as follows:

1. Select the Allocate New Address button from the top of the window

2. A pop up box will appear asking you if you want to allocate a new IP address; you will want to make sure EC2 is selected and click the Yes, Allocate button

3. At this point you will want to select the Associate Address button at the top of the window

4. Another pop up box will appear asking you to select an Instance to associate the IP address to; you will want to select an instance from the drop down menu and click the Yes, Associate button

These steps should be repeated for each EC2 instance that has been set up.

2. Creating Security Group Rules

This can be done by selecting the Security Groups link under the Network & Security node on the EC2 Dashboard.

Once this link opens, you will want to proceed as follows:

1. Select the name of the Security Group that was defined when the EC2 instance(s) had been created

- This will cause the Details and Inbound tabs to show up towards the bottom of the window

2. You will now want to select the Inbound tab and do the following:

- Select the Delete action on all ports that have a source IP of except for TCP Port 3389

This is done because an IP source of is open to all traffic.

Port 3389 is left open to allow you the ability to use the remote desktop to log in to the EC2 instance 

3. You will now add Custom TCP Rules that match the ports necessary for SQL Sentry to monitor and collect information from the EC2 instances.

These ports are listed in a post from our Q/A forum located here:

- Make sure that as these ports/ port ranges are entered, you specify the Elastic IP addresses of your instances in the Source Field.

- This format should be followed by a /32 which is the default used when adding the Source IP.

Please note that you will have to enter each port number for each Source/Elastic IP address that you will be using

- You will then select the Add Rule button for each entry

- When you have finished adding all of the ports for each instance, you will want to select the Apply Rule Changes button.

3. Edit the host file to allow correct mapping of EC2 instances in the cloud

You will want to use the Remote Desktop to log into your EC2 instance(s) that will be hosting the SQL Sentry software and edit the hosts file. This will allow for the correct mapping of your EC2 instances to facilitate connection by the SQL Sentry software.

To access the hosts file, you will want to navigate to C:\\Windows\\System32\\drivers\\etc\\hosts. Please note that the hosts file should be opened with Notepad.

Once the hosts file is open, you will see examples of how to edit this file. For simplicity’s sake, here is an example of a host file entry: AMAZONA-APS3JGA.

4. Change the password on each of the EC2 instances to reflect one single Administrator Password

Upon creation of the EC2 instances, you will be provided with the Login and Password for each instance. As the Login is defined as Administrator and the passwords for each instance are different, the passwords will have to be changed to reflect one single password across all EC2 instances. This is the equivalent of Pass Through Authentication

5. Limit the dynamic ports that are used by WMI to collect performance metrics

Some environments may require that only a limited amount of ports be open in their firewall. To address this issue, you will want to perform the following:

Run the following in the command window of each instance and reboot the instances: ‘netsh int ipv4 set dynamicport tcp start=x num=x’.

An example of this would be to run the following: netsh int ipv4 set dynamicport tcp start=50000 num=500.

This allows you to limit the dynamic ports that Windows Management Instrumentation (WMI) will use from ports 50000-50500.

6. Install SQL Sentry on the desired EC2 instance(s)

Install SentryOne on the desired instances by going to the Customer Portal and downloading the latest build. You will then follow the instructions on the subsequent pages. You can read more about the installation process here.

Have more questions? Submit a request


Please sign in to leave a comment.