diff --git a/docs/Public_API.rst b/docs/Public_API.rst index 3d0612aeb..feaeda288 100644 --- a/docs/Public_API.rst +++ b/docs/Public_API.rst @@ -16,7 +16,7 @@ Scaling History API Route ''''' - GET /v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/scaling\_histories + GET /v1/apps/:guid/scaling\_histories Parameters '''''''''' @@ -122,10 +122,10 @@ Application Metric API ---------------------- **List instance metrics of an application** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **GET /v1/apps/:guid/metric_histories/:metric_type** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **Request** ^^^^^^^^^^^ @@ -133,28 +133,27 @@ Application Metric API Route ''''' - GET /v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/metric_histories/memoryused + GET /v1/apps/:guid/metric_histories/memoryused Parameters '''''''''' - -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| Name | Description | Valid values | Required | Example values | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| guid | The GUID of the application | | true | | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| metric-type | The metric type | String, memoryused,memoryutil,responsetime, throughput | true | metric-type=memoryused | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| start-time | The start time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default 0 | start-time=1494989539138350432 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| end-time | The end time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default "now" | end-time=1494989549117047288 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| order-direction | The order type. The scaling history will be order by timestamp asc or desc. | string,”asc” or "desc" | false. default desc | order-direction=asc | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| page | The page number to query | int | false, default 1 | page=1 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| results-per-page | The number of results per page | int | false, default 50 | results-per-page=10 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| Name | Description | Valid values | Required | Example values | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| guid | The GUID of the application | | true | | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| metric_type | The metric type | String, memoryused,memoryutil,responsetime, throughput or custom metric's name | true | metric_type=memoryused | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| start-time | The start time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default 0 | start-time=1494989539138350432 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| end-time | The end time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default "now" | end-time=1494989549117047288 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| order-direction | The order type. The metric history will be ordered by timestamp asc or desc. | string,”asc” or "desc" | false. default desc | order-direction=asc | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| page | The page number to query | int | false, default 1 | page=1 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| results-per-page | The number of results per page | int | false, default 50 | results-per-page=10 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ Headers ''''''' @@ -229,13 +228,13 @@ Body ] -*List aggregated metrics of an application** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +**List aggregated metrics of an application** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AutoScaler collects the instances' metrics of an application, and aggregate the raw data into an accumulated value for evaluation. This API is used to return the aggregated metric result of an application. **GET /v1/apps/:guid/aggregated_metric_histories/:metric_type** -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ **Request** ^^^^^^^^^^^ @@ -243,28 +242,28 @@ AutoScaler collects the instances' metrics of an application, and aggregate the Route ''''' - GET /v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/aggregated_metric_histories/memoryused + GET /v1/apps/:guid/aggregated_metric_histories/memoryused Parameters '''''''''' -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| Name | Description | Valid values | Required | Example values | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| guid | The GUID of the application | | true | | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| metric-type | The metric type | String, memoryused,memoryutil,responsetime, throughput | true | metric-type=memoryused | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| start-time | The start time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default 0 | start-time=1494989539138350432 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| end-time | The end time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default "now" | end-time=1494989549117047288 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| order-direction | The order type. The scaling history will be order by timestamp asc or desc. | string,”asc” or "desc" | false. default desc | order-direction=asc | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| page | The page number to query | int | false, default 1 | page=1 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| results-per-page | The number of results per page | int | false, default 50 | results-per-page=10 | -+--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| Name | Description | Valid values | Required | Example values | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| guid | The GUID of the application | | true | | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| metric_type | The metric type | String, memoryused,memoryutil,responsetime, throughput or custom metric's name | true | metric_type=memoryused | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| start-time | The start time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default 0 | start-time=1494989539138350432 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| end-time | The end time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default "now" | end-time=1494989549117047288 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| order-direction | The order type. The metric history will be ordered by timestamp asc or desc. | string,”asc” or "desc" | false. default desc | order-direction=asc | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| page | The page number to query | int | false, default 1 | page=1 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ +| results-per-page | The number of results per page | int | false, default 50 | results-per-page=10 | ++--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ Headers ''''''' @@ -335,8 +334,8 @@ Body Policy API ---------- -Set Policy -~~~~~~~~~~ +Create Policy +~~~~~~~~~~~~~ PUT /v1/apps/:guid/policy ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -545,7 +544,7 @@ cURL "https://[the-api-server-url]:[port]/v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/policy" \\ | -d @policy.json \\ | -X PUT \\ - | -H "Content-Type: application/json" + | -H "Content-Type: application/json" \\ | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MSIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTd9.p3cHAMwwVASl1RWxrQuOMLYRZRe4rTbaIH1RRux3Q5Y" Response @@ -989,6 +988,167 @@ Body } + +Custom metric API +----------------- + +To scale with custom metric, your application need to emit its own metric to `App Autoscaler`'s metric server. + +Given the metric submission is proceeded inside an application, an `App Autoscaler` specific credential is required to authorize the access. + +If `App Autoscaler` is offered as a service, the credential and autoscaler metric server's URL are injected into VCAP_SERVICES by service binding directly. + +If `App Autoscaler` is offered as a Cloud Foundry extension, the credential need to be generated explictly. + +**Create credential** +~~~~~~~~~~~~~~~~~~~~~ + +**PUT /v1/apps/:guid/credential** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Optional. A credential with random username/password will be generated by this API by default. Also it is supported to define credential with a specific pair of username and password with below JSON payload. + +**Request** +^^^^^^^^^^^ + +Route +''''' + + PUT /v1/apps/:guid/credential + +Body +'''' + + { + + "username": "username", + + "password": "password" + + } + +Headers +''''''' + Authorization: bearer + eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + +cURL +'''' + | curl "https://[the-api-server-url]:[port]/v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/credential" \\ + | -X PUT \\ + | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o" + + +Response +^^^^^^^^ + +Status +'''''' + + 200 OK + +Body +'''' + + { + "app_id": "", + + "username": "MY_USERNAME", + + "password": "MY_PASSWORD", + + "url": "" + + } + + +**Delete credential** +~~~~~~~~~~~~~~~~~~~~~ + +**DELETE /v1/apps/:guid/credential** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Request** +^^^^^^^^^^^ + +Route +''''' + + DELETE /v1/apps/:guid/credential + +Headers +''''''' + Authorization: bearer + eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + +cURL +'''' + | curl "https://[the-api-server-url]:[port]/v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/credential" \\ + | -X DELETE \\ + | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o" + + +Response +^^^^^^^^ + +Status +'''''' + + 200 OK + + +**Submit custom metric to Autoscaler metric server** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**PUT /v1/apps/:guid/metrics** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Request** +^^^^^^^^^^^ + +Route +''''' + + PUT /v1/apps/:guid/metrics + +Body +'''' + +A JSON payload is required to emit your own metrics with the metric value and the correspondng instance index. + + { + "instance_index": , + + "metrics": [{ + + "name": "", + + "value": + + }] + + } + +Headers +''''''' + Basic authorization of autoscaler credential is required when submitting your own metrics to Autoscaler metric server. + +cURL +'''' + | curl "https://[the-autoscaler-metric-server-url]:[port]/v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/metrics" \\ + | -X PUT \\ + | -d @metric.json \\ + | -H "Content-Type: application/json" \\ + | -H "Authorization: basic xxxx" + +Response +^^^^^^^^ + +Status +'''''' + + 200 OK + Error Response ------------------- diff --git a/docs/Readme.md b/docs/Readme.md index 938959d0b..51390764c 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -14,7 +14,7 @@ The [Cloud Foundry App Auto-Scaler][git] automatically adjust the instance numbe The Cloud Foundry [Admin or Space Developers role][userrole] is needed to manage the autoscaling policy, query metric values and scaling events. --- -## Autoscaling policy +## Concepts of Autoscaling policy Autoscaling policy is represented in JSON and consists of the following parts. Refer to the [policy specification][policy] for the detailed definition. @@ -49,6 +49,11 @@ The following are the built-in metrics that you can use to scale your applicatio * **throughput** "throughput" is the total number of the processed requests in a given time period. The unit of "throughput" is "rps" (requests per second). + +* **custom metric** + + Custom emtric is supported since [app-autoscaler v3.0.0 release][app-autoscaler-v3.0.0]. You can define your own metric name and emit your own metric to `App Autoscaler` to trigger further dynamic scaling. + #### Threshold and Adjustment @@ -98,12 +103,13 @@ For example, in the following schedule rule, `App AutoScaler` will set your appl ``` ---- -## Create Autoscaling policy +## Create Autoscaling Policy JSON File The following gives some policy examples for you to start with. Refer to [Policy speficication][policy] for the detailed JSON format of the autoscaling policy. -* [Autoscaling policy with dynamic scaling rules][policy-dynamic] -* [Autoscaling policy with dynamic scaling rules and schedules][policy-all] +* [Autoscaling policy example for dynamic scaling rules][policy-dynamic] +* [Autoscaling policy example for custom metrics ][policy-dynamic-custom] +* [Autoscaling policy example for both dynamic scaling rules and schedules][policy-all] ---- @@ -112,7 +118,7 @@ The following gives some policy examples for you to start with. Refer to [Policy `App-AutoScaler` can be offered as a Cloud Foundry service or an extension of your Cloud Foundry platform. Consult your Cloud Foundry provider for how it is offered. ### As a Cloud Foundry extension -When `App AutoScaler` is offered as Cloud Foudnry platform extension, you don't need to connect your application to autoscaler, go directly to next section on how to configure your policy. +When `App AutoScaler` is offered as Cloud Foundry platform extension, you don't need to connect your application to autoscaler, go directly to next section to attach autoscaling policy to your application with CLI. ### As a Cloud Foundry service When `App AutoScaler` is offered as a Cloud Foundry service via [open service broker api][osb] , you need to provision and bind `App AutoScaler` service through [Cloud Foundry CLI][cfcli] first. @@ -139,7 +145,7 @@ This section gives how to use the command line interface to manage autoscaling p ### Getting started with AutoScaler CLI * Install [AutoScaler CLI plugin][cli] -* Set App AutoScaler API endpoint (optional) +* Set App AutoScaler API endpoint (Optional) AutoScaler CLI plugin interacts with `App AutoScaler` through its [public API][api]. @@ -150,21 +156,21 @@ This section gives how to use the command line interface to manage autoscaling p ### Attach policy -Create or update auto-scaling policy for your application with command +Create or update autoscaling policy for your application with command. ``` cf aasp ``` ### Detach policy -Remove auto-scaling policy to disable `App Autoscaler` with command +Remove autoscaling policy to disable `App Autoscaler` with command ``` cf dasp ``` ### View policy -To retrieve the current auto-scaling policy, use command below +To retrieve the current autoscaling policy, use command below ``` cf asp ``` @@ -190,11 +196,91 @@ To query your application's scaling events, use command below Refer to [AutoScaler CLI user guide][cli] for advanced options to specify the time range, the number of events to return and display order. +### Create autoscaling credential before submitting custom metric + +Create custom metric credential for an application. The credential will be displayed in JSON format. +``` +cf create-autoscaling-credential +``` +Refer to [AutoScaler CLI user guide][cli] for more details. + +### Delete autoscaling credential +Delete custom metric credential when unncessary. +``` +cf delete-autoscaling-credential +``` + +---- +## Auto-scale your application with custom metrics + +With custom metric support, you can scale your application with your own metrics with below steps. + +* Claim custom metric in your policy + +First, you need to define a dynamic scaling rule with a customized metric name, refer to [Autoscaling policy example for custom metrics][policy-dynamic-custom]. + +* Create credential for your application + +To scale with custom metric, your application need to emit its own metric to `App Autoscaler`'s metric server. +Given the metric submission is proceeded inside an application, an `App Autoscaler` specific credential is required to authorize the access. + +If `App Autoscaler` is offered as a service, the credential and autoscaler metric server's URL are injected into VCAP_SERVICES by service binding directly. + +If `App Autoscaler` is offered as a Cloud Foundry extension, the credential need to be generated explictly with command `cf create-autoscaling-credential` as below example: + +``` +>>>cf create-autoscaling-credential --output +... +>>> cat +{ + "app_id": "c99f4f6d-2d67-4eb6-897f-21be90e0dee5", + "username": "9bb48dd3-9246-4d7e-7827-b478e9bbedcd", + "password": "c1e47d80-e9a0-446a-782b-63fe9f974d4c", + "url": "https://autoscalermetrics.bosh-lite.com" +} +``` + +Then, you need to configure the credential to your application as an environment variable by `cf set-env` command +or through user-provided-service approach as below: + +``` +>>> cf create-user-provided-service -p +... +>>> cf bind-service +... +TIP: Use 'cf restage ' to ensure your env variable changes take effect +``` +With the user-provided-service aproach, you can consume the credential from VCAP_SERVICES environments. + +* Emit your own metrics to autoscaler + +You need to emit your own metric for scaling to the "URL" specified in credential JSON file with below API endpoint. + +``` +PUT /v1/apps/:guid/metrics +``` + +A JSON payload is required with above API to submit metric name, value and the correspondng instance index. +``` + { + "instance_index": , + "metrics": [ + { + "name": "", + "value": + } + ] + } +``` + +Please refer to [Emit metric API Spec][emit-metric-api] for more information. + [git]:https://github.com/cloudfoundry/app-autoscaler [cli]: https://github.com/cloudfoundry/app-autoscaler-cli-plugin#install-plugin [policy]: policy.md [policy-dynamic]: dynamicpolicy.json +[policy-dynamic-custom]: customemetricpolicy.json [policy-all]: fullpolicy.json [api]: Public_API.rst [osb]: https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md @@ -204,4 +290,5 @@ Refer to [AutoScaler CLI user guide][cli] for advanced options to specify the t [sunbind]:https://docs.cloudfoundry.org/devguide/services/managing-services.html#unbind [sdeprovision]:https://docs.cloudfoundry.org/devguide/services/managing-services.html#delete [userrole]:https://docs.cloudfoundry.org/concepts/roles.html#spaces - +[app-autoscaler-v3.0.0]: https://bosh.io/releases/github.com/cloudfoundry-incubator/app-autoscaler-release?all=1#latest +[emit-metric-api]:https://github.com/cloudfoundry/app-autoscaler/blob/develop/docs/Public_API.rst#submit-custom-metric-to-autoscaler-metric-server diff --git a/docs/policy.md b/docs/policy.md index afa6dc0ef..bae085207 100644 --- a/docs/policy.md +++ b/docs/policy.md @@ -16,7 +16,7 @@ | Name | Type | Required|Description | |:---------------------|--------------|---------|---------------------------------------------------------------------------------| -| metric_type | String | true |one of the following metric types:memoryused,memoryutil,responsetime, throughput, cpu| +| metric_type | String | true |one of system-default metric types `memoryused`,`memoryutil`,`responsetime`, `throughput`, `cpu` or user-defined custom metric type| | threshold | int | true |the boundary when metric value exceeds is considered as a breach | | operator | String | true |>, <, >=, <= | | adjustment | String | true |the adjustment approach for instance count with each scaling. Support regex format `^[-+][1-9]+[0-9]*[%]?$`, i.e. +5 means adding 5 instances, -50% means shrinking to the half of current size. | @@ -68,9 +68,13 @@ ## Sample Policy * [Autoscaling policy with dynamic scaling rules][policy-dynamic] +* [Autoscaling policy with dynamic scaling rules defined by custom metrics ][policy-dynamic-custom] * [Autoscaling policy with dynamic scaling rules and schedules][policy-all] [a]:https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html -[policy-dynamic]: /app-autoscaler/dynamicpolicy.json -[policy-all]: /app-autoscaler/fullpolicy.json +[policy-dynamic]: /docs/dynamicpolicy.json +[policy-dynamic-custom]: /docs/customemetricpolicy.json +[policy-all]: /docs/fullpolicy.json + +