File tree 7 files changed +73
-6
lines changed
7 files changed +73
-6
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ type Config struct {
87
87
// LogOutput is the destination for logs
88
88
LogOutput io.Writer
89
89
90
- // Logger provides a logger to thhe client
90
+ // Logger provides a logger to the client
91
91
Logger log.InterceptLogger
92
92
93
93
// Region is the clients region
Original file line number Diff line number Diff line change @@ -944,11 +944,6 @@ func TestHTTPServer_Limits_Error(t *testing.T) {
944
944
t .Run (name , func (t * testing.T ) {
945
945
t .Parallel ()
946
946
947
- // Use a fake agent since the HTTP server should never start
948
- agent := & Agent {
949
- logger : testlog .HCLogger (t ),
950
- }
951
-
952
947
conf := & Config {
953
948
normalizedAddrs : & Addresses {
954
949
HTTP : "localhost:0" , // port is never used
@@ -962,6 +957,13 @@ func TestHTTPServer_Limits_Error(t *testing.T) {
962
957
},
963
958
}
964
959
960
+ // Use a fake agent since the HTTP server should never start
961
+ agent := & Agent {
962
+ logger : testlog .HCLogger (t ),
963
+ httpLogger : testlog .HCLogger (t ),
964
+ config : conf ,
965
+ }
966
+
965
967
srv , err := NewHTTPServer (agent , conf )
966
968
require .Error (t , err )
967
969
require .Nil (t , srv )
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout : docs
3
+ page_title : source Stanza - Nomad Autoscaler Agent Configuration
4
+ description : >-
5
+ The "source" block is used to configure scaling target sources.
6
+ ---
7
+
8
+ # ` source ` Block
9
+
10
+ <Placement groups = { [' policy' , ' source' ]} />
11
+
12
+ The ` source ` block is used to configure scaling target sources.
13
+
14
+ ``` hcl
15
+ policy {
16
+ source "nomad" {
17
+ enabled = false
18
+ }
19
+ }
20
+ ```
21
+
22
+ Supported sources are ` file ` and ` nomad ` .
23
+
24
+ ### ` source ` Parameters
25
+
26
+ - ` enabled ` ` (bool: true) ` - Defines if the scaling policy source should be
27
+ enabled or disabled.
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ passed in via CLI arguments. The `agent` command accepts the following arguments
91
91
` cluster ` and ` horizontal ` queues. Nomad Autoscaler Enterprise supports additional
92
92
` vertical_mem ` and ` vertical_cpu ` queues.
93
93
94
+ - ` -policy-source-disable-file ` : Disable the sourcing of policies from disk.
95
+
96
+ - ` -policy-source-disable-nomad ` : Disable the sourcing of policies from the
97
+ Nomad API.
98
+
94
99
- ` -telemetry-disable-hostname ` : Specifies whether gauge values should be prefixed
95
100
with the local hostname.
96
101
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ apm "datadog" {
18
18
config = {
19
19
dd_api_key = "<api key>"
20
20
dd_app_key = "<app key>"
21
+
22
+ site = "app.datadoghq.eu"
21
23
}
22
24
}
23
25
```
@@ -28,6 +30,8 @@ apm "datadog" {
28
30
- ` dd_app_key ` ` (string: <required>) ` - The Datadog application key to use for
29
31
authentication.
30
32
33
+ - ` site ` ` (string: "") ` - The [ Datadog site] [ datadog_sites ] to connect to.
34
+
31
35
The Datadog plugin can also read its configuration options via environment
32
36
variables. The accepted keys are ` DD_API_KEY ` and ` DD_APP_KEY ` . The agent
33
37
configuration parameters take precedence over the environment variables.
@@ -43,4 +47,5 @@ check {
43
47
```
44
48
45
49
[ datadog_homepage ] : https://www.datadoghq.com/
50
+ [ datadog_sites ] : https://docs.datadoghq.com/getting_started/site/
46
51
[ datadog_timeseries ] : https://docs.datadoghq.com/api/v1/metrics/#query-timeseries-points
Original file line number Diff line number Diff line change @@ -17,13 +17,37 @@ apm "prometheus" {
17
17
18
18
config = {
19
19
address = "http://prometheus.my.endpoint.io:9090"
20
+
21
+ ca_cert = "/path/to/ca.crt"
22
+
23
+ basic_auth_user = "user"
24
+ basic_auth_password = "secret"
25
+
26
+ header_X-Scope-OrgID = "my-org"
27
+ header_X-Custom-Header = "custom-header"
20
28
}
21
29
}
22
30
```
23
31
24
32
- ` address ` ` (string: "http://127.0.0.1:9090") ` - The address of the Prometheus
25
33
endpoint used to perform queries.
26
34
35
+ - ` basic_auth_user ` ` (string: "") ` - The HTTP basic auth user to use when
36
+ making requests to Prometheus.
37
+
38
+ - ` basic_auth_password ` ` (string: "") ` - The HTTP basic auth password to use
39
+ when making requests to Prometheus.
40
+
41
+ - ` ca_cert ` ` (string: "") ` - Path to a PEM encoded CA cert file to use to
42
+ connect to the Prometheus server.
43
+
44
+ - ` header_* ` ` (string: "") ` - Additional HTTP headers to set when making
45
+ requests to Prometheus. Several headers may be specified and the final header
46
+ name will be set as the key with the ` header_ ` prefix removed.
47
+
48
+ - ` skip_verify ` ` (bool: false) ` - Do not verify TLS certificates when
49
+ connecting to the Prometheus server. This is strongly discouraged.
50
+
27
51
## Policy Configuration Options
28
52
29
53
``` hcl
Original file line number Diff line number Diff line change 1531
1531
"title" : " policy_eval" ,
1532
1532
"path" : " autoscaling/agent/policy_eval"
1533
1533
},
1534
+ {
1535
+ "title" : " source" ,
1536
+ "path" : " autoscaling/agent/source"
1537
+ },
1534
1538
{
1535
1539
"title" : " strategy" ,
1536
1540
"path" : " autoscaling/agent/strategy"
You can’t perform that action at this time.
0 commit comments