Determine the Evaluation Order of Perspective Groups
search cancel

Determine the Evaluation Order of Perspective Groups

book

Article ID: 282690

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

As perspectives grow in complexity over time it can be difficult to determine the logic behind why an asset is not falling into an expected group.

IMPORTANT FACTORS

  • Perspectives Group rules are evaluated from top to bottom.  If an asset matches a rule filter, it will be held in that group and be unavailable for assignment within other groups.
  • When creating a Perspective rule based on 'Asset' or a specific Resource type we will automatically gather underlying linked assets in a gather tree type logic.
Eg:

A rule based on AwsInstance will pull in any related > ["AwsElasticIp""PagerdutyIncident""AwsVolume""InstanceFileSystem""AwsEmrClusterInstance""AwsSpotRequest"], "AwsVolume"=>["AwsSnapshot"]}

A rule based on AwsVolume will pull in related AwsSnapshots

If you need to perform a detailed investigation into the order of evaluation of your Perspective Groups, the Perspectives API is the preferred method to visualize the evaluation order.  It allows us to easily determine if a Perspective rule has been merged or if its rule order has been adjusted. 

----------------------------------------------------------------------------------------------------

To determine the order of evaluation of Perspective Rules we can dump the schema of a Perspective by running - 

"https://chapi.cloudhealthtech.com/v1/perspective_schemas/<perspective_id>?api_key=<api_key>"

See - Retrieve Perspective Schema

Resolution

Below are examples that reflect the effect of making perspective modifications.

1. Before any change is made to our Group/rule ordering:

UI view

 

API schema view

 

2. Let's change the Group order and view the results:

UI view

 

API schema view

 

After changing the Group order within the UI/API we can see that Group EBS_DOG is now the top Group within the UI and the top Group within the API schema "rules".

The order of the "rules" within a Perspective schema defines the order of evaluation so this has made an impact to the asset membership within the perspective. 

We can observe that some additional EBS Volumes tagged with Dog=Buddy are now falling within the EBS_DOG dynamic group as this group is now being evaluation evaluated before the EC2_DOG group after changing the Group/rules ordering.

 

If you are using the schema to review the order of evaluation the "rules" objects within the schema represent the current order of evaluation.

For details on the remaining schema sections please review - Understand Format of Perspectives Schema