eva.tuczai

Turbonomic REST API Series Part 3: Ready, Set, Actions!

Blog Post created by eva.tuczai on Feb 14, 2015

Continuing the REST API Series, this next one describes how to get Actions. The key value of Turbonomic is to be able to prescribe actions that will drive your infrastructure to the best state possible, and to prevent performance and inefficiency issues. Actions can be automated or extracted via VMT REST API to be consumed by another system.

 

This blog post will show you how to use the VMT REST API to give you the actions that you see in the User Interface To-do lists.

 

To get the actions that are prescribed and ready to be taken, as seen in the Turbonomic User Interface To-do lists, use this URL:

http://administrator:administrator@YOURVMTServer/vmturbo/api/actionlogs/Market_ActionLog/actionitems?complete=true

 

Note this call can be made against an aggregator server or a specific VMT Control Server instance. Use the ?complete=true parameter to see actions where the associated risk is in the “Notify” state.  You can also use the API to execute or delete actions, which will not be covered here.  See the Turbonomic REST API Guide for more details, searching on "actionlog".

 

The output will show you the Actions and the Risks associated with that Action with a variety of examples below that we will break down:

 

<ActionItems allowFixing="true" categoryList="Efficiency Improvement|Performance Assurance|Prevention|Compliance">

<ActionItem acceptTime="" actionType="MOVE" category="Performance Assurance" creationClassName="ActionItem" current="esxauto1.demo.vmturbo.com"currentClassName="PhysicalMachine" description="" displayName="MOVE : Move Virtual Machine 2K3 SysPrep (b42073ec-456f-4d8d-834f-f7fb87db4cad)"explanation="Move Virtual Machine "2K3 SysPrep (b42073ec-456f-4d8d-834f-f7fb87db4cad)" from Physical Machine "esxauto1.demo.vmturbo.com" to Physical Machine "esxauto3.demo.vmturbo.com", to prevent Mem congestion in "esxauto1.demo.vmturbo.com"" importance="572.42" name="ACTIONITEM-_EHZAMrBoEeS7jaL2sVD8uA"new="esxauto3.demo.vmturbo.com" newClassName="PhysicalMachine" problem="Mem congestion on Physical Machine "esxauto1.demo.vmturbo.com"problemDescription="Mem congestion on Physical Machine "esxauto1.demo.vmturbo.com" progress="0" recommendTime="1423869620579" savings="0.0"shortDescription="Move Virtual Machine" state="Pending Accept" target="2K3 SysPrep (b42073ec-456f-4d8d-834f-f7fb87db4cad)" targetClassName="VirtualMachine"targetUuid="4205efaa-edad-1479-fd80-5cda5eb1acec-vm-253" uuid="_4OprMLPWEeS7jaL2sVD8uA">

<Notification category="MarketProblem" description="Mem congestion on Physical Machine "esxauto1.demo.vmturbo.com" displayName="displayName" event="Mem Congestion" importance="572.42" name="PhysicalMachine::host-210::Mem Congestion" notificationObjectClassName="PhysicalMachine"notificationObjectDisplayName="esxauto1.demo.vmturbo.com" notificationObjectUuid="Virtual_ESX_420526e0-f665-3959-de7b-d80844c1f39f" severity="Critical"state="NOTIFY" subCategory="Performance Assurance" uuid="_4OtVkLPWEeS7jaL2sVD8uA" />

</ActionItem>

<ActionItem acceptTime="" actionType="MOVE" category="Prevention" creationClassName="ActionItem" current="esxprod2.demo.vmturbo.com"currentClassName="PhysicalMachine" description="" displayName="MOVE : Move Virtual Machine File1_H3" explanation="Move Virtual Machine "File1_H3" from Physical Machine "esxprod2.demo.vmturbo.com" to Physical Machine "esxprod1.demo.vmturbo.com", to improve workload distribution" importance="115.7"name="ACTIONITEM-_EGhdgrBoEeS7jaL2sVD8uA" new="esxprod1.demo.vmturbo.com" newClassName="PhysicalMachine" problem="Mem congestion on Physical Machine "esxprod2.demo.vmturbo.com"" problemDescription="Mem congestion on Physical Machine "esxprod2.demo.vmturbo.com"" progress="0" recommendTime="1423802335112"savings="0.0" shortDescription="Move Virtual Machine" state="Pending Accept" target="File1_H3" targetClassName="VirtualMachine" targetUuid="42055f90-9f50-30ef-e203-652c95c97bd9" uuid="_N6bwgLM6EeS7jaL2sVD8uA">

<Notification category="MarketProblem" description="Mem congestion on Physical Machine "esxprod2.demo.vmturbo.com"" displayName="displayName" event="Mem Congestion" importance="115.7" name="PhysicalMachine::host-255::Mem Congestion" notificationObjectClassName="PhysicalMachine"notificationObjectDisplayName="esxprod2.demo.vmturbo.com" notificationObjectUuid="Virtual_ESX_42053500-4db3-1808-a1a6-c5d7549279ee" severity="Major"state="NOTIFY" subCategory="Performance Assurance" uuid="_48d4grBqEeS7jaL2sVD8uA" />

</ActionItem>

<ActionItem acceptTime="" actionType="SUSPEND" category="Efficiency Improvement" creationClassName="ActionItem" current="RedHatDC-NFS"currentClassName="DataCenter" description="" displayName="SUSPEND : Suspend Physical Machine hp-dl594.eng.vmturbo.com" explanation="Suspend underutilized (idle/non-productive) Physical Machine "hp-dl594.eng.vmturbo.com" to save Space, Power and Cooling in Data Center "RedHatDC-NFS"" importance="0"name="ACTIONITEM-_EBjd8rBoEeS7jaL2sVD8uA" new="" newClassName="" problem="Physical Machine "hp-dl594.eng.vmturbo.com" is underutilized (idle or non-productive), yet continues to consume resources on Data Center "RedHatDC-NFS"" problemDescription="Physical Machine "hp-dl594.eng.vmturbo.com" is underutilized (idle or non-productive), yet continues to consume resources on Data Center "RedHatDC-NFS"" progress="0" recommendTime="1423679613039"savings="0.0" shortDescription="Suspend Physical Machine" state="Recommended" target="hp-dl594.eng.vmturbo.com" targetClassName="PhysicalMachine"targetUuid="bd49810e-24ba-4c8e-99dc-8066c2961b79" uuid="_e5iv8rIcEeS7jaL2sVD8uA">

<Notification category="MarketProblem" description="Physical Machine "hp-dl594.eng.vmturbo.com" is underutilized (idle or non-productive), yet continues to consume resources on Data Center "RedHatDC-NFS"" displayName="displayName" event="Over-provisioning" importance="0"name="PhysicalMachine::/api/hosts/bd49810e-24ba-4c8e-99dc-8066c2961b79::Over-provisioning" notificationObjectClassName="PhysicalMachine"notificationObjectDisplayName="hp-dl594.eng.vmturbo.com" notificationObjectUuid="bd49810e-24ba-4c8e-99dc-8066c2961b79" severity="Minor" state="NOTIFY"subCategory="Efficiency Improvement" uuid="_z3VAMLIWEeS7jaL2sVD8uA" />

</ActionItem>

<ActionItem acceptTime="" actionType="RESIZE" category="Efficiency Improvement" creationClassName="ActionItem" current="2.0 GB" currentClassName="Mem"description="" displayName="RIGHT_SIZE : Reduce Mem reservation 2k3clone" explanation="Reduce Mem reservation for Virtual Machine "2k3clone" to address underutilized Mem" importance="0" name="ACTIONITEM-42054c26-e92c-b1e6-f7ad-6217f651e2a3" new="1.0 GB" newClassName="Mem" problem="Underutilized Mem in Virtual Machine "2k3clone"" problemDescription="Underutilized Mem in Virtual Machine "2k3clone"" progress="0" recommendTime="1423494029604" savings="0.0"shortDescription="Reduce Mem reservation" state="Recommended" target="2k3clone" targetClassName="VirtualMachine" targetUuid="42054c26-e92c-b1e6-f7ad-6217f651e2a3" uuid="_Yz-nMLBsEeS7jaL2sVD8uA">

<Notification category="MarketProblem" description="Underutilized Mem in Virtual Machine "2k3clone"" displayName="displayName" event="Mem Over-provisioning" importance="0" name="VirtualMachine::vm-222::Mem Over-provisioning" notificationObjectClassName="VirtualMachine"notificationObjectDisplayName="2k3clone" notificationObjectUuid="42054c26-e92c-b1e6-f7ad-6217f651e2a3" severity="Minor" state="NOTIFY"subCategory="Efficiency Improvement" uuid="_Y0DfsLBsEeS7jaL2sVD8uA" />

</ActionItem>

<ActionItem acceptTime="" actionType="RESIZE" category="Performance Assurance" creationClassName="ActionItem" current="7.99 GB" currentClassName="VStorage"description="" displayName="RIGHT_SIZE : Increase VStorage capacity Test_Reservation_PersistsA_C0" explanation="Increase VStorage partition "C:\" capacity for Virtual Machine "Test_Reservation_PersistsA_C0" to address high VStorage" importance="20000" name="ACTIONITEM-421e6bfe-7c5a-f22f-00ea-e6111094a0d1"new="12.99 GB" newClassName="VStorage" problem="VStorage congestion on partition "C:\" in Virtual Machine "Test_Reservation_PersistsA_C0""problemDescription="VStorage congestion on partition "C:\" in Virtual Machine "Test_Reservation_PersistsA_C0"" progress="0" recommendTime="1423495787195"savings="-0.24414062" shortDescription="Increase VStorage capacity" state="Recommended" target="Test_Reservation_PersistsA_C0"targetClassName="VirtualMachine" targetUuid="421e6bfe-7c5a-f22f-00ea-e6111094a0d1" uuid="_etrBoLBwEeS7jaL2sVD8uA">

<Notification category="MarketProblem" description="VStorage congestion on partition "C:\" in Virtual Machine "Test_Reservation_PersistsA_C0""displayName="displayName" event="VStorage Congestion on partition "C:\"" importance="20000" name="VirtualMachine::vm-1041::VStorage Congestion on partition "C:\"" notificationObjectClassName="VirtualMachine" notificationObjectDisplayName="Test_Reservation_PersistsA_C0"notificationObjectUuid="421e6bfe-7c5a-f22f-00ea-e6111094a0d1" severity="Major" state="NOTIFY" subCategory="Performance Assurance"uuid="_etsPwLBwEeS7jaL2sVD8uA" />

</ActionItem>

 

Let’s break down the actions and focus on some key points:

actionType such as Move, Change (Storage Move), Resize, Start (where workload is started), Suspend (where supply is underutilized), and Provision.

explanation which is the description of what are the key issues addressed with this action, and is the same as seen in the User Interface To-do list

category of the action whether this is an action to address a Performance Assurance risk, Prevention of a risk, or Improve Efficiency which of course involves opportunities to reclaim unused resources.

notification category which describes the type of risk this action is associated with.

description of the risk

severity of the risk, where it can be Critical, Major, Minor, Normal

state where Notify means an active risk, Clear means the risk has been addressed (either by an action taken, or the conditions of the risk have changed that this risk is no longer valid).

 

This API call reflects a way to pull a list of actions from any Market running.  "Market" is the real time market and will give you the actions that you see in the User Interface To-do lists.

 

You can also extract action items from a Plan that you run, since a Plan represents running an offline Market analysis on a snapshot.

 

First find your plan market name with this API call that will show you all active markets (including plans), and an example shown below:

http://administrator:administrator@YOURVMTServer/vmturbo/api/markets

 

<TopologyElements>

<TopologyElement creationClassName="Market" displayName="Market_Default" name="Market_Default" state="STOPPED" uuid="_0x8t8EglEd-gHc4L513yOB" />

<TopologyElement creationClassName="Market" displayName="Market" name="Market" state="RUNNING" uuid="_0x3OYUglEd-gHc4L513yOA" />

<TopologyElement creationClassName="Market" displayName="_dhClUUm4EeS8hvxXFQQT8w_BasePlanProjection" name="_dhClUUm4EeS8hvxXFQQT8w_BasePlanProjection"state="SUCCEEDED" uuid="_e_rhMLB8EeS7jaL2sVD8uA" />

<TopologyElement creationClassName="Market" displayName="Market_Capacity" name="Market_Capacity" state="RUNNING" uuid="_xLyeMLKeEeS7jaL2sVD8uA" />

<TopologyElement creationClassName="Market" displayName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak"state="SUCCEEDED" uuid="__uYoYLR0EeS7jaL2sVD8uA" />

</TopologyElements>

 

 

A plan market will use the following naming convention:

userUUID_{PlanTypeName} and  you can use this name to identify which plan you have run reflecting which plan type you started from, and the state.  Once a Plan has a state=”SUCCEEDED” you can use the name or the uuid to pass in the api call to get the ActionLog.

 

Different plan type names will be one of the following that reflect which plan type you were working with in the User Interface.  The only difference between these are the workflows to simulate modifications, and some are designed to focus you on certain changes:

BasePlanProjection = plans run from the Projection tab

BasePlanPlantoPeak = plans run from the High Workload Demand tab

WorkloadDistribution = plans run from the Workload Distribution tab

HardwareReplace= plans run from the Hardware Replacement

 

Construct the api call with the plan name or UUID:

/vmturbo/api/actionlogs/{plan market name or UUID}/actionitems

 

and resulting actions include what you are already familiar with: Move, Change (Storage Move), Resize, Start (where workload is started) and Provision where the action describes supply resources needed to meet the demand in the plan scenario:

 

ActionItem acceptTime="1423937638685" actionType="PROVISION" category="Performance Assurance" creationClassName="ActionItem" current="" currentClassName=""description="" displayName="PROVISION : Provision new Physical Machine vmturbocloud6.demo.vmturbo.com" explanation="Provision new Physical Machine similar to vmturbocloud6.demo.vmturbo.com to reduce critical Mem and CPU utilization" importance="167.7" name="ACTIONITEM-__2KEUbR0EeS7jaL2sVD8uA"new="vmturbocloud6.demo.vmturbo.com" newClassName="PhysicalMachine" problem="" problemDescription="" progress="0" recommendTime="1423937638684" savings="0.0"shortDescription="Provision new Physical Machine" state="Succeeded" target="vmturbocloud6.demo.vmturbo.com" targetClassName="PhysicalMachine"targetUuid="__2KEUbR0EeS7jaL2sVD8uA" uuid="_Pt2VwLR1EeS7jaL2sVD8uA"

 

Looking for Plan details? Use the following API calls using the /vmturbo/api/markets string:

/vmturbo/api/markets/{plan market name or UUID}/hostcomparison

to get Compute requirements as show in the example below.

Then use

/vmturbo/api/markets/{plan market name or UUID}/storagecomparison

for Storage requirements.

 

Example output for hostcomparison:

<ServiceEntities>

<ServiceEntity CPU_utilization_Current="28.35" CPU_utilization_Target="27.13" IOThroughput_utilization_Current="0.03" IOThroughput_utilization_Target="0.03"Mem_utilization_Current="74.42" Mem_utilization_Target="51.89" NetThroughput_utilization_Current="1.34" NetThroughput_utilization_Target="0"VMsOnHost_Current="22" VMsOnHost_Target="16" creationClassName="PhysicalMachine" displayName="vmturbocloud4.demo.vmturbo.com" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-1125__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" priceIndex_Current="15.28" priceIndex_Target="4.32"state_Current="ACTIVE" state_Target="ACTIVE" uuid="__wSs4bR0EeS7jaL2sVD8uA" />

<ServiceEntity CPU_utilization_Current="30.09" CPU_utilization_Target="28.27" IOThroughput_utilization_Current="0.02" IOThroughput_utilization_Target="0.02"Mem_utilization_Current="46.91" Mem_utilization_Target="50.16" NetThroughput_utilization_Current="0.99" NetThroughput_utilization_Target="0"VMsOnHost_Current="13" VMsOnHost_Target="21" creationClassName="PhysicalMachine" displayName="vmturbocloud6.demo.vmturbo.com" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-1031__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" priceIndex_Current="3.55" priceIndex_Target="4.03"state_Current="ACTIVE" state_Target="ACTIVE" uuid="__2KEUbR0EeS7jaL2sVD8uA" />

<ServiceEntity CPU_utilization_Current="43.95" CPU_utilization_Target="31.82" IOThroughput_utilization_Current="0.01" IOThroughput_utilization_Target="0.01"Mem_utilization_Current="56.19" Mem_utilization_Target="49.94" NetThroughput_utilization_Current="2.13" NetThroughput_utilization_Target="3.11"VMsOnHost_Current="25" VMsOnHost_Target="18" creationClassName="PhysicalMachine" displayName="vmturbocloud5.demo.vmturbo.com" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-641__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" priceIndex_Current="5.21" priceIndex_Target="3.99"state_Current="ACTIVE" state_Target="ACTIVE" uuid="__1R6kbR0EeS7jaL2sVD8uA" />

<ServiceEntity CPU_utilization_Target="31.3" IOThroughput_utilization_Target="0.02" Mem_utilization_Target="49.76" NetThroughput_utilization_Target="0"VMsOnHost_Target="15" creationClassName="PhysicalMachine" displayName="vmturbocloud6.demo.vmturbo.com_Clone_86" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-1031__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak_Clone_86" priceIndex_Target="3.96" state_Target="ACTIVE"uuid="_Pt280bR1EeS7jaL2sVD8uA" />

<ServiceEntity CPU_utilization_Current="25.01" CPU_utilization_Target="14.29" IOThroughput_utilization_Current="0.01" IOThroughput_utilization_Target="0.01"Mem_utilization_Current="71.66" Mem_utilization_Target="49.09" NetThroughput_utilization_Current="0.5" NetThroughput_utilization_Target="0"VMsOnHost_Current="17" VMsOnHost_Target="14" creationClassName="PhysicalMachine" displayName="vmturbocloud1.demo.vmturbo.com" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-62__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" priceIndex_Current="12.45" priceIndex_Target="3.86"state_Current="ACTIVE" state_Target="ACTIVE" uuid="__1k1gbR0EeS7jaL2sVD8uA" />

<ServiceEntity CPU_utilization_Current="13.57" CPU_utilization_Target="21.67" IOThroughput_utilization_Current="0.02" IOThroughput_utilization_Target="0.02"Mem_utilization_Current="23.04" Mem_utilization_Target="48.6" NetThroughput_utilization_Current="0.29" NetThroughput_utilization_Target="0"VMsOnHost_Current="6" VMsOnHost_Target="53" creationClassName="PhysicalMachine" displayName="vmturbocloud2.demo.vmturbo.com" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-119__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" priceIndex_Current="1.69" priceIndex_Target="3.79"state_Current="ACTIVE" state_Target="ACTIVE" uuid="__ynoIbR0EeS7jaL2sVD8uA" />

<ServiceEntity CPU_utilization_Current="37.16" CPU_utilization_Target="15.8" IOThroughput_utilization_Current="0.01" IOThroughput_utilization_Target="0.01"Mem_utilization_Current="69.15" Mem_utilization_Target="36.22" NetThroughput_utilization_Current="0.76" NetThroughput_utilization_Target="0"VMsOnHost_Current="21" VMsOnHost_Target="11" creationClassName="PhysicalMachine" displayName="vmturbocloud3.demo.vmturbo.com" marketName="_d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" name="host-154__d75uUjn_EeSDAbAe-Y1B6A_BasePlanPlanToPeak" priceIndex_Current="10.51" priceIndex_Target="2.46"state_Current="ACTIVE" state_Target="ACTIVE" uuid="__3YzYbR0EeS7jaL2sVD8uA" />

</ServiceEntities>

 

See the Turbonomic REST API Guide for more details.

 

Go back to the the REST API Series Part 1 here.

 

Stay Green

Eva

Outcomes