【问题标题】:REST API for Autoscaling in Bluemix doesn't have policyTriggers defined?Bluemix 中用于自动缩放的 REST API 没有定义 policyTriggers?
【发布时间】:2016-06-01 11:44:42
【问题描述】:

我需要通过 REST API 配置自动缩放,或者至少确保从文件位置选择策略配置。我现在看到的唯一配置它的方法是通过 UI。在REST API 中,policyTriggers 没有定义,我也看不到通过任何基于文件的配置来配置它的方法。

【问题讨论】:

    标签: ibm-cloud autoscaling


    【解决方案1】:

    似乎文档站点正在维护中,并且缺少 BlueMix Auto-scaling REST API 正在使用的许多信息元素定义。 PolicyTriggers 是一个 PolicyTrigger 数组,其中包括以下项(json 格式): == ==

                    policyTriggers   -  List<Trigger>    -  Required - Trigger setting for this policy, each trigger is defined as below 
                     metricType             -  String -  Required - enumerated type for this trigger, for Java application, they are: JVMHeapUsage, Memory, Throughput, ResponseTime. For other app, only Memory is available.
                     statWindow             -  int    -  Optional - interval to calculate statistics in seconds 
                     breachDuration         -  int    -  Optional - breach duration in seconds is divided by the periodicity of the metric to determine the number of data points that will result in a scaling event
                     lowerThreshold         -  int    -  Optional - lower threshold that will trigger a scaling event, usually scaling-in, for JVMHeapUsage and Memory it's percentage, for Throughput, it's request per second and for ResponseTime, it's milliseconds
                     upperThreshold         -  int    -  Optional - upper threshold that will trigger a scaling event, usually scaling-out. for JVMHeapUsage and Memory it's percentage, for Throughput, it's request per second and for ResponseTime, it's milliseconds
                     instanceStepCountDown  -  int    -  Optional - number of instances to reduce per scaling-in action
                     instanceStepCountUp    -  int    -  Optional - number of instances to increase per scaling-out action
                     stepDownCoolDownSecs   -  int    -  Optional - cool down period that prevent further scaling in action
                     stepUpCoolDownSecs     -  int    -  Optional - cool down period that prevent further scaling out  action 
    

    创建策略的另一种方法是使用 Auto-scaling CLI(https://console.ng.bluemix.net/docs/cli/plugins/auto-scaling/index.html),您可以打开保存的策略文件并查看 PolicyTriggers 的结构。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-19
      • 2022-12-11
      • 1970-01-01
      相关资源
      最近更新 更多