github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/tools/autoscaling/agent/policy.mdx (about) 1 --- 2 layout: docs 3 page_title: policy Stanza - Nomad Autoscaler Agent Configuration 4 description: >- 5 The "policy" block configures the Nomad Autoscaler's policy handling. 6 --- 7 8 # `policy` Block 9 10 <Placement groups={['policy']} /> 11 12 The `policy` block configures the Nomad Autoscaler's policy handling. 13 14 ```hcl 15 policy { 16 dir = "/opt/nomad-autoscaler/policies" 17 default_cooldown = "2m" 18 19 source "nomad" { 20 enabled = false 21 } 22 } 23 ``` 24 25 ## `policy` Parameters 26 27 - `default_cooldown` `(string: "5m")` - The default cooldown that will be applied 28 to all scaling policies which do not specify a cooldown period. 29 30 - `default_evaluation_interval` `(string: "10s")` - The default evaluation interval 31 that will be applied to all scaling policies which do not specify an evaluation 32 interval. 33 34 - `dir` `(string: "")` - The path to a directory used to load scaling policies. 35 36 - `source` <code>([Source](#source-parameters))</code> - Configures policy 37 sources. The `nomad` source is enabled by default and the `file` source is 38 automatically enabled if `dir` is set. 39 40 ### `source` Parameters 41 42 The `source` block is used to configure scaling policies sources. Supported 43 sources are `file` and `nomad`. 44 45 ```hcl 46 policy { 47 source "nomad" { 48 enabled = false 49 } 50 } 51 ``` 52 53 - `enabled` `(bool: true)` - Defines if the scaling policy source should be 54 enabled or disabled.