Skip to content
mricher edited this page Aug 25, 2016 · 2 revisions

A rule is an instruction used by the scaler to take a scaling decision based on the probe value.

Rules are specified under the rules: section of the configuration file. Here's a sample from the test configuration:

rules:
    whoami-cpu-scale:          # name of the rule, must be unique
        probe: "mock.sin"      # related probe
        up: "> 0.5"            # up condition
        down: "< 0.5"          # down condition
        scaler: whoami-compose # related scaler
        refresh: 3s            # refresh rate

Decision process

The specified probe retrieve a float64 value. This value is tested against up and down rules. If it:

  • matches both up and down, nothing happen
  • matches up rule only, call the Up() function of the related scaler
  • matches down rule only, call the Down() function of the related scaler

Then the scaler forward the order to the orchestrator.

Syntax

Related probe

String parameter probe. See the related wiki page for available probes and parameters.

Related scaler

String parameter scaler. Must be defined beforehand, else the parser check will fail. See the related wiki page.

Refresh rate

Golang time.Duration parsable, parameter of refresh. Duration between each probe polling and rule update.

Up and down conditions

up and down entries. String parameter is defined by a comparative symbol among >, <, == or != followed by a float64 value. Float "==" and "!=" check are performed as exact equality

up: "< 5.0"
down: "!= 1.0"
Clone this wiki locally