fbpx

15. Resource Control

N2WS Resource Control allows users to stop and start the Instance and RDS Database resources. Learn how to use it on demand or on a schedule.

Resource Control allows users to stop and start the Instance and RDS Database resources for each Account during the course of a week.

Note: RDS Aurora Clusters are not supported by Resource Control.

A Group is the controlling entity for the stopping and starting of selected resources. Resource Control allows for stopping on one day of a week and starting on another day of the same week. Once an Off/On schedule is configured for a Group, N2WS will automatically stop and start the selected resource targets.

Resources that are eligible and enabled for hibernation in AWS will be hibernated on an Off operation if their controlling Resource Control Group is enabled for hibernation. Hibernated instances are restarted by an On operation.

See AWS hibernation prerequisites in the User Guide for Linux Instances.

For enabling hibernation in N2WS, see the Hibernation description in section 15.1.

The stopping and starting of targets identified for each Group is independent of the backup schedule for an Account’s policy.

Ad hoc Off and On operations are available in addition to the Resource Control schedule.

Recommendation: N2WS recommends that you not execute a stop or start operation on critical servers.

The Resource Control button on the main screen of N2WS user interface contains two tabs:

Monitor – Lists the current operational status of Groups under Resource Control. The Log lists the details of the most recent operation for a Group.

Groups – Use the Groups tab to add and configure a Group: the account, the days and off/on times, which Resource Targets are subject to the Group control, and other features. You can also delete a group and activate Turn On ASAP/Turn Off ASAP controls.

After configuring a group, you can add resources in Resource Targets. See section 15.2.

Adding a Resource Control Group

In the Resource Control Groups tab, click New Group and complete the fields:

Group Name –Only alphanumeric characters and the underscore allowed (no spaces).

Note: A Group may belong to only one Account.

Account – Owner of Group. Users are configured for a maximum number of Resource Control entities. See section 18.

Description – Optional description of the Resource Control Group function.

Status – Whether the Group is enabled to run.

Auto Target Removal – Whether a target resource is automatically removed from the Group if the resource no longer exists in AWS.

Hibernation – Whether eligible instances will be hibernated. If enabled. Only instances within the Group’s target resources that are eligible for hibernation by AWS will be hibernated. See Note on limitations below.

If an enabled Group contains mixed types of instances, only some of which are eligible for hibernation, then the Off operation will ‘hibernate’ only the eligible instances, while the remaining instances will ‘stop’.

Note: Click the “hibernating-not-supported” link to view current AWS limitations on hibernating instances. During instance creation in AWS, hibernation would have been enabled and encryption configured. If the resource is eligible and the Group is enabled, instances that are ‘stopped’ move to ‘hibernation’ state.

Timeout – How long will operation wait in minutes until finished. Default is 30 minutes. Failure from exceeding the timeout does not necessarily mean that the operation of stopping or starting the resource has failed. The Log will show run status for each resource.

After adding a Group, configure the Resource Targets (section 15.2) and the Off/On Times (section 15.3).

Adding Resource Targets to a Group

In the Configure column of the Groups tab, click the Resource Targets button. The Resource Targets screen lists the resources belonging to the Group.

Instances and RDS Databases may be added to and removed from the Group.

Note: A Resource Target (Instance or RDS Database) may belong to only one Group.

The Status column shows whether a target is ‘running’ or ‘stopped’.

Off/On operations are not allowed for Groups with a status of ‘disabled’.

Eligible resources within a Group enabled for hibernation that has been stopped have a Status of ‘stopped-hibernation’.

Click an Add button to open a resource selection dialog box. The following instance types are omitted from Add Instances and not allowed to be part of a Group:

CPM

Instance-Store type

Worker (See section 22)

Note: It is important to not configure a critical server as part of a Group.

The Status column in the selection dialog shows whether the potential target is ‘running’ or ‘stopped’. After choosing targets by selecting their Add check box, click Add Selected.

Note: If the Resource Control target is an RDS database that is stopped, a regularly scheduled backup will fail.

Configuring Off/On Scheduler

In the Schedules column of the Groups tab, click the Off/On Times button for a Group and complete the Turn Off/On Times dialog box. There must be 60 minutes between each operation in order for them to work.

Overlapping of off and on times is invalid. For example:

A resource is turned off at 20:00 on Wednesday and turned on at 23:00 the same day.

Then, an attempt to schedule the same resource to be turned off on Wednesday at 9:00 and turned off at 22:00 on Wednesday will result in an invalid input error.

To initiate a stop or start action outside of the scheduled times for a Group, click the Turn On ASAP or Turn OFF ASAP button in the Resource Control Groups tab.

Using Scan Tags with Resource Control

Scan tags for Resource Control can be used to:

Create a new Group based on an existing Group’s configuration.

Add a resource to a Group.

Remove a tagged or untagged resource from a Group.

The tag format is:

Key: cpm_resource_control

with one of the following values:

Value: <group name> or <group name>:<based on group>

If the value in <group name> equals ‘g1’, the resource will be added to the g1 group.

The template <group name>:<based on group> means, in the case of g1:g2:

If g1 exists, add the resource to g1.

Otherwise, create a new group g1 based on group g2, and add the resource to it.

Value: no-resource-control – Remove the resource instance or RDS database from the Group whether it is tagged or not.

Value: <no value> – Remove the tagged resource instance or RDS database from the Group.

Resource Control Reporting

Resource Control provides individual logs of off and on operations and a summary report of all operations.

The log contains timestamps for each step within the operation, from firing to completion, and is downloadable as a CSV file. To view individual logs, in the Monitor tab, click the Open button in the Log column for an operation.

The Resource Control Operations Report contains information for all saved operations for all accounts. For each operation it contains:

Operation ID – A sequential number for each operation.

Account – The N2WS owner of the Resource Control Group.

AWS Account Number – The AWS account number of the owner of the resources.

Group – The N2WS Resource Control Group.

Operation – Turn Off/Turn On.

Status – Operation status.

Start Time – Start date and time.

End Time – End date and time.

To download the Resource Control Operations Report, click the resource control operations report link at the bottom of N2WS’ main screen.

Share this post →

Share on twitter
Share on linkedin
Share on facebook
Share on email