diff --git a/client/config/config.go b/client/config/config.go
index dc0f97ea649c..fb9c7d1fc3cc 100644
--- a/client/config/config.go
+++ b/client/config/config.go
@@ -87,7 +87,7 @@ type Config struct {
// LogOutput is the destination for logs
LogOutput io.Writer
- // Logger provides a logger to thhe client
+ // Logger provides a logger to the client
Logger log.InterceptLogger
// Region is the clients region
diff --git a/command/agent/http_test.go b/command/agent/http_test.go
index 3871ac1a9867..6083779d2a41 100644
--- a/command/agent/http_test.go
+++ b/command/agent/http_test.go
@@ -944,11 +944,6 @@ func TestHTTPServer_Limits_Error(t *testing.T) {
t.Run(name, func(t *testing.T) {
t.Parallel()
- // Use a fake agent since the HTTP server should never start
- agent := &Agent{
- logger: testlog.HCLogger(t),
- }
-
conf := &Config{
normalizedAddrs: &Addresses{
HTTP: "localhost:0", // port is never used
@@ -962,6 +957,13 @@ func TestHTTPServer_Limits_Error(t *testing.T) {
},
}
+ // Use a fake agent since the HTTP server should never start
+ agent := &Agent{
+ logger: testlog.HCLogger(t),
+ httpLogger: testlog.HCLogger(t),
+ config: conf,
+ }
+
srv, err := NewHTTPServer(agent, conf)
require.Error(t, err)
require.Nil(t, srv)
diff --git a/website/content/docs/autoscaling/agent/source.mdx b/website/content/docs/autoscaling/agent/source.mdx
new file mode 100644
index 000000000000..b2601a07279a
--- /dev/null
+++ b/website/content/docs/autoscaling/agent/source.mdx
@@ -0,0 +1,27 @@
+---
+layout: docs
+page_title: source Stanza - Nomad Autoscaler Agent Configuration
+description: >-
+ The "source" block is used to configure scaling target sources.
+---
+
+# `source` Block
+
+
+
+The `source` block is used to configure scaling target sources.
+
+```hcl
+policy {
+ source "nomad" {
+ enabled = false
+ }
+}
+```
+
+Supported sources are `file` and `nomad`.
+
+### `source` Parameters
+
+- `enabled` `(bool: true)` - Defines if the scaling policy source should be
+ enabled or disabled.
diff --git a/website/content/docs/autoscaling/cli.mdx b/website/content/docs/autoscaling/cli.mdx
index 7a9c054ec0b2..b32b10f419a7 100644
--- a/website/content/docs/autoscaling/cli.mdx
+++ b/website/content/docs/autoscaling/cli.mdx
@@ -91,6 +91,11 @@ passed in via CLI arguments. The `agent` command accepts the following arguments
`cluster` and `horizontal` queues. Nomad Autoscaler Enterprise supports additional
`vertical_mem` and `vertical_cpu` queues.
+- `-policy-source-disable-file`: Disable the sourcing of policies from disk.
+
+- `-policy-source-disable-nomad`: Disable the sourcing of policies from the
+ Nomad API.
+
- `-telemetry-disable-hostname`: Specifies whether gauge values should be prefixed
with the local hostname.
diff --git a/website/content/docs/autoscaling/plugins/apm/datadog.mdx b/website/content/docs/autoscaling/plugins/apm/datadog.mdx
index c9b58a7fea39..68461db36678 100644
--- a/website/content/docs/autoscaling/plugins/apm/datadog.mdx
+++ b/website/content/docs/autoscaling/plugins/apm/datadog.mdx
@@ -18,6 +18,8 @@ apm "datadog" {
config = {
dd_api_key = ""
dd_app_key = ""
+
+ site = "app.datadoghq.eu"
}
}
```
@@ -28,6 +30,8 @@ apm "datadog" {
- `dd_app_key` `(string: )` - The Datadog application key to use for
authentication.
+- `site` `(string: "")` - The [Datadog site][datadog_sites] to connect to.
+
The Datadog plugin can also read its configuration options via environment
variables. The accepted keys are `DD_API_KEY` and `DD_APP_KEY`. The agent
configuration parameters take precedence over the environment variables.
@@ -43,4 +47,5 @@ check {
```
[datadog_homepage]: https://www.datadoghq.com/
+[datadog_sites]: https://docs.datadoghq.com/getting_started/site/
[datadog_timeseries]: https://docs.datadoghq.com/api/v1/metrics/#query-timeseries-points
diff --git a/website/content/docs/autoscaling/plugins/apm/prometheus.mdx b/website/content/docs/autoscaling/plugins/apm/prometheus.mdx
index 89de233c790f..e3a5c1f25320 100644
--- a/website/content/docs/autoscaling/plugins/apm/prometheus.mdx
+++ b/website/content/docs/autoscaling/plugins/apm/prometheus.mdx
@@ -17,6 +17,14 @@ apm "prometheus" {
config = {
address = "http://prometheus.my.endpoint.io:9090"
+
+ ca_cert = "/path/to/ca.crt"
+
+ basic_auth_user = "user"
+ basic_auth_password = "secret"
+
+ header_X-Scope-OrgID = "my-org"
+ header_X-Custom-Header = "custom-header"
}
}
```
@@ -24,6 +32,22 @@ apm "prometheus" {
- `address` `(string: "http://127.0.0.1:9090")` - The address of the Prometheus
endpoint used to perform queries.
+- `basic_auth_user` `(string: "")` - The HTTP basic auth user to use when
+ making requests to Prometheus.
+
+- `basic_auth_password` `(string: "")` - The HTTP basic auth password to use
+ when making requests to Prometheus.
+
+- `ca_cert` `(string: "")` - Path to a PEM encoded CA cert file to use to
+ connect to the Prometheus server.
+
+- `header_*` `(string: "")` - Additional HTTP headers to set when making
+ requests to Prometheus. Several headers may be specified and the final header
+ name will be set as the key with the `header_` prefix removed.
+
+- `skip_verify` `(bool: false)` - Do not verify TLS certificates when
+ connecting to the Prometheus server. This is strongly discouraged.
+
## Policy Configuration Options
```hcl
diff --git a/website/data/docs-nav-data.json b/website/data/docs-nav-data.json
index fb07905070bc..fcb121b7b819 100644
--- a/website/data/docs-nav-data.json
+++ b/website/data/docs-nav-data.json
@@ -1531,6 +1531,10 @@
"title": "policy_eval",
"path": "autoscaling/agent/policy_eval"
},
+ {
+ "title": "source",
+ "path": "autoscaling/agent/source"
+ },
{
"title": "strategy",
"path": "autoscaling/agent/strategy"