How to Add Resources to a Scrutinizer EC2 Instance

Overview

As needs change, an instance could become over-utilized if it is too small. If this is the case, the size can be modified. For example, if an instance named t2.micro is resource strapped, it can be changed to an m3.medium instance. When an instance is resized, an instance type that is compatible with the configuration of the instance must be selected. If the instance type is not compatible with the instance configuration, the application must be migrated to a new instance.

  1. SSH to the instance

  2. Stop all of the services using the interactive Scrutinizer utility:

    [ec2-user@supportami ~]$ sudo su
    [root@supportami ec2-user]# cd /home/plixer/scrutinizer/bin/
    [root@supportami bin]# ./scrut_util.exe

    Scrutinizer 17.11.20.74951 (Mon Nov 20 11:09:35 2017) scrut_util 17.11.20.74666 (2017-11-03 12:34:14 -0400 (Fri, 03 Nov 2017))

    SCRUTINIZER> services all stop

    (stop) plixer_flow_collector … DONE.
    (stop) httpd … DONE.
    (stop) plixer_syslogd … DONE.
    (stop) plixer_db … DONE.

    Done (75.896102 seconds)

    SCRUTINIZER> quit

    Exiting…

  3. Power off the operating system:

    [root@supportami bin]# shutdown -h now

  4. Open the Amazon EC2 console. In the navigation pane, choose Instances, and select the instance.

    [EC2-Classic] If the instance has an associated Elastic IP address, write down the Elastic IP address and the instance ID shown in the details pane.

  5. Choose Actions, select Instance State, and then choose Stop.

    ../_images/aws_resources_1.png

    In the confirmation dialog box, choose Yes, Stop. It can take a few minutes for the instance to stop.

    [EC2-Classic] When the instance state becomes stopped, the Elastic IP, Public DNS (IPv4), Private DNS, and Private IPs fields in the details pane are blank to indicate that the old values are no longer associated with the instance.

  6. With the instance still selected, choose Actions, select Instance Settings, and then choose Change Instance Type. Note that this action is disabled if the instance state is not stopped.

    ../_images/aws_resources_2.png
  7. From Instance Type, select the instance type desired. If the desired instance type does not appear in the list, then it is not compatible with the configuration of the instance (for example, because of virtualization type).

    ../_images/aws_resources_3.png

    Choose Apply to accept the new settings.

  8. To restart the stopped instance, select the instance, choose Actions, select Instance State, and then choose Start.

    In the confirmation dialog box, choose Yes, Start. It can take a few minutes for the instance to enter the running state.

    [EC2-Classic] When the instance state is running, the Public DNS (IPv4), Private DNS, and Private IPs fields in the details pane contain the new values that we assigned to the instance. If an instance had an associated Elastic IP address, it must be reassociated as follows:

    In the navigation pane, choose Elastic IPs. Select the Elastic IP address that was written down in the above step before the instance was stopped. Choose Actions and then choose Associate address. From Instance, select the instance ID that was written down before the instance was stopped, then choose Associate.

  9. SSH into the instance and use the interactive utility to retune the instance:

    [root@supportami ec2-user]# cd /home/plixer/scrutinizer/bin/
    [root@supportami bin]# ./scrut_util.exe

    Scrutinizer 17.11.20.74951 (Mon Nov 20 11:09:35 2017)
    scrut_util 17.11.20.74666 (2017-11-03 12:34:14 -0400 (Fri, 03 Nov 2017))

    SCRUTINIZER> check tuning

    then

    SCRUTINIZER> set tuning