ScalingGroupsResource


Create a scaling group


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Parameter Type Default Value Description
keepinmaintenance Boolean false If true, put the scaling group into maintenance mode after creation

Content-Type : scalinggroup Accept : scalinggroup

Error Codes

  • GEN-4 - Not enough permissions to perform this action

Example

List scaling groups


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups

Roles : [ROLE_VDC_ENUMERATE, ROLE_VDC_MANAGE_VAPP]

Accept : scalinggroups

Delete a scaling group


DELETE https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Parameter Type Default Value Description
force boolean false If true, force the deletion of a non-empty scaling group

Example

Get a scaling group


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}

Roles : [ROLE_VDC_ENUMERATE, ROLE_VDC_MANAGE_VAPP]

Accept : scalinggroup

Error Codes

  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

Update a scaling group


PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Content-Type : scalinggroup Accept : scalinggroup

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • SCALING-GROUP-16 - The scaling group must be in maintenance mode in order to apply the requested operation

Example

End maintenance mode in a scaling group


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/action/endmaintenance

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Example

Scale in


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/action/scalein

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Accept : scalinggroup

Error Codes

  • SCALING-GROUP-19 - Unable to scale in if the scaling group is in maintenance mode

Example

Scale out


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/action/scaleout

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Accept : scalinggroup

Error Codes

  • SCALING-GROUP-18 - Unable to scale out if the scaling group is in maintenance mode

Example

Start maintenance mode in a scaling group


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/action/startmaintenance

Roles : [ROLE_MANAGE_SCALING_GROUPS]

Example

Move a scaling group to virtual appliance


PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/action/vappmove

Roles : [ROLE_VAPP_DEPLOY_UNDEPLOY, ROLE_VM_RESTRICT]

Content-Type : links

Example

Search for alarms on a scaling group


Retrieve alarms from the scaling group, and with the recursive option include the alarms of the following entities on the cloud path:
  • Virtual machines of the scaling group

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/alarms

Roles : [ROLE_USERS_VIEW_ALARMS]

Parameter Type Default Value Description
startwith Integer 0 First element to retrieve, by default 0.
by String alarm Field to order by. Possible values: 'alarm', 'entity_type', 'metric', 'time_range', 'datapoints_limit', 'statistic', 'formula', 'threshold', 'description'. Uses 'alarm' as default.
limit Integer 25 Number of alarms to return. By default 25.
asc Boolean true If true, sort in ascending order of the field specified with the 'by' parameter; otherwise, sort in descending order.
alarm String Filter alarms by name, accepts wildcards. Empty by default.
metric String Filter alarm by metric name, accepts wildcards. Empty by default.
state String Filter by alarm state. Possible values: 'all', 'active' or 'inactive'
recursive Boolean false If true, the search will be recursive. False by default.

Accept : alarms

Error Codes

  • GEN-4 - Not enough permissions to perform this action

Example

Create a metric metadata on a scaling group


Creates new metadata for a metric on a scaling group

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : metricmetadata Accept : metricmetadata

Error Codes

  • MONITORING-2 - Unable to create a new metric with null or empty name
  • MONITORING-9 - The metric name '51a4ee9f-f129-4de8-a9d9-8a7697ccaff4' is already in use.
  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

List metrics metadata on a scaling group


Returns the metadata of all the available, built-in, and custom metrics for the given scaling group

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics

Roles : [ROLE_USERS_SHOW_METRICS]

Accept : metricsmetadata

Error Codes

  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

Push collectd values on a scaling group


Push values gathered by collectd. If the metric metadata does not exist, the system will create it automatically.

The pushed data is expected as JSON format.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/collectd

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : application/json

Example

Get a metric metadata on a scaling group


Returns the metadata of a metric (built-in or custom) on a scaling group

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}

Roles : [ROLE_USERS_SHOW_METRICS]

Accept : metricmetadata

Error Codes

  • MONITORING-1 - Unknown metric 'e92196f1-6368-4e5b-947a-0a62209d4d30' for ScalingGroup with id '53'
  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

Get a metric statistics on a scaling group


By default, this query retrieves the available datapoints for the last hour using the 'Average' aggregator with a granularity of 60 seconds. All the defaults can be overridden.

Metric dimensions to filter by can be specified with query parameters in two ways:

  • Comma separated values: ?key1=value1,value2&key2=value3
  • Duplicated key parameters: ?key1=value1&key1=value2&key2=value3

Unknown metric dimensions are filtered and ignored.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}

Roles : [ROLE_USERS_SHOW_METRICS]

Parameter Type Default Value Description
startrelative String Relative start time following the ISO 8601 duration (cannot contain years or months)
startabsolute Long Absolute start time, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
endabsolute Long Absolute end time, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
granularity Integer Granularity of the aggregator in seconds. A minimum of 60 seconds.
statistic Enum : average, maximum, minimum, sum, count, dev Aggregator to apply to the datapoints in the given time range

Accept : metric

Error Codes

  • MONITORING-1 - Metadata for metric '0bc9590d-12dc-486c-ae5f-16dd550a82ed' in namespace 'scalinggroup' not found
  • MONITORING-3 - End time must be later than start time
  • MONITORING-38 - The relative start time must be shorter than configured in 'abiquo.monitoring.max.statistic.period.days' property
  • MONITORING-39 - Absolute or relative queries are allowed but not both
  • MONITORING-4 - The supplied relative time contains years or months
  • MONITORING-6 - The supplied relative start time is invalid
  • MONITORING-8 - The minimum granularity is 60 seconds
  • SCALING-GROUP-12 - The requested scaling group does not exist

Get composite metric statistics on a scaling group


By default, this query retrieves the available datapoints for the last hour using the 'Average' aggregator with a granularity of 60 seconds. All the defaults can be overridden.

Metric dimensions to filter by can be specified with query parameters in two ways:

  • Comma separated values: ?key1=value1,value2&key2=value3
  • Duplicated key parameters: ?key1=value1&key1=value2&key2=value3/li>

Unknown metric dimensions are filtered and ignored.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}

Roles : [ROLE_USERS_SHOW_METRICS]

Parameter Type Default Value Description
startrelative String Relative start time following the ISO 8601 duration (cannot contain years or months)
startabsolute Long Absolute start time, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
endabsolute Long Absolute end time, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
granularity Integer Granularity of the aggregator in seconds. A minimum of 60 seconds.
statistic Enum : average, maximum, minimum, sum, count, dev Aggregator to apply to the datapoints in the given time range

Accept : compositemetric

Push metric datapoints on a scaling group


Push metric datapoints to a custom metric. If the metric metadata does not exist, the system will create it automatically.

Push is not allowed for built-in metrics.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : datapoints

Example

Update a metric metadata on a scaling group


Updates existing metric metadata of a metric on a scaling group

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}

Roles : [ROLE_USERS_PUSH_METRICS]

Content-Type : metricmetadata Accept : metricmetadata

Example

Create an alarm on a scaling group


Create a new alarm for an existing metric (built-in or custom)

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}/alarms

Roles : [ROLE_USERS_MANAGE_ALARMS]

Parameter Type Default Value Description
allowunknowndimensions boolean false If true, the given dimensions are not validated against the available dimensions in the metric metadata. False by default.

Content-Type : alarm Accept : alarm

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • MONITORING-1 - Metadata for metric '4ca690cd-29bc-4556-8b76-53654325945e' in namespace 'scalinggroup' not found
  • MONITORING-16 - The alarm name is required
  • MONITORING-17 - The alarm formula is required
  • MONITORING-18 - The alarm statistic is required
  • MONITORING-21 - The supplied formula does not exist
  • MONITORING-22 - The supplied statistic does not exist
  • MONITORING-40 - The alarm time range must be >= 1
  • MONITORING-41 - The datapoints limit must be >= 1
  • MONITORING-47 - Unable to create alarm with unknown metric dimensions
  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

List alarms on a scaling group


List the alarms associated with an existing metric

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}/alarms

Roles : [ROLE_USERS_VIEW_ALARMS]

Accept : alarms

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

Delete an alarm from a scaling group


DELETE https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}/alarms/{alarm}

Roles : [ROLE_USERS_MANAGE_ALARMS]

Example

Get an alarm on a scaling group


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}/alarms/{alarm}

Roles : [ROLE_USERS_VIEW_ALARMS]

Accept : alarm

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • MONITORING-13 - Alarm with uuid bc490196-de26-49e9-ab36-55110c667d19 not found
  • SCALING-GROUP-12 - The requested scaling group does not exist

Example

Update an alarm on a scaling group


Update an existing alarm

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/scalinggroups/{scalinggroup}/metrics/{metric}/alarms/{alarm}

Roles : [ROLE_USERS_MANAGE_ALARMS]

Parameter Type Default Value Description
allowunknowndimensions boolean false If true, the given dimensions are not validated against the available dimensions in the metric metadata. False by default.

Content-Type : alarm Accept : alarm

Error Codes

  • GEN-4 - Not enough permissions to perform this action
  • MONITORING-13 - Alarm '63c3f5dc-29cf-4b2e-a360-b8de3998aed4' not found for metric 'b0d9401a-9d8b-4df6-873f-4036e8ca710a-77' in namespace 'scalinggroup'
  • MONITORING-16 - The alarm name is required
  • MONITORING-17 - The alarm formula is required
  • MONITORING-18 - The alarm statistic is required
  • MONITORING-21 - The supplied formula does not exist
  • MONITORING-22 - The supplied statistic does not exist
  • MONITORING-40 - The alarm time range must be >= 1
  • MONITORING-41 - The datapoints limit must be >= 1
  • MONITORING-47 - Unable to create alarm with unknown metric dimensions
  • SCALING-GROUP-12 - The requested scaling group does not exist

Example