Skip to content

Commit 3a7d1d2

Browse files
authored
Correct api-key to api_key. (#2437)
api_key is the correct syntax and is what is actually used in most of our example documentation.
1 parent 96f3fa1 commit 3a7d1d2

7 files changed

+25
-25
lines changed

_meta/config/common.p2.yml.tmpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ outputs:
55
default:
66
type: elasticsearch
77
hosts: [127.0.0.1:9200]
8-
api-key: "example-key"
8+
api_key: "example-key"
99
# username: "elastic"
1010
# password: "changeme"
1111

@@ -18,17 +18,17 @@ inputs:
1818
data_stream.namespace: default
1919
use_output: default
2020
streams:
21-
- metricsets:
21+
- metricsets:
2222
- cpu
2323
# Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
2424
data_stream.dataset: system.cpu
25-
- metricsets:
25+
- metricsets:
2626
- memory
2727
data_stream.dataset: system.memory
28-
- metricsets:
28+
- metricsets:
2929
- network
3030
data_stream.dataset: system.network
31-
- metricsets:
31+
- metricsets:
3232
- filesystem
3333
data_stream.dataset: system.filesystem
3434

_meta/config/common.reference.p2.yml.tmpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ outputs:
55
default:
66
type: elasticsearch
77
hosts: [127.0.0.1:9200]
8-
api-key: "example-key"
8+
api_key: "example-key"
99
# username: "elastic"
1010
# password: "changeme"
1111

@@ -18,17 +18,17 @@ inputs:
1818
data_stream.namespace: default
1919
use_output: default
2020
streams:
21-
- metricsets:
21+
- metricsets:
2222
- cpu
2323
# Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
2424
data_stream.dataset: system.cpu
25-
- metricsets:
25+
- metricsets:
2626
- memory
2727
data_stream.dataset: system.memory
28-
- metricsets:
28+
- metricsets:
2929
- network
3030
data_stream.dataset: system.network
31-
- metricsets:
31+
- metricsets:
3232
- filesystem
3333
data_stream.dataset: system.filesystem
3434

elastic-agent.reference.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ outputs:
1111
default:
1212
type: elasticsearch
1313
hosts: [127.0.0.1:9200]
14-
api-key: "example-key"
14+
api_key: "example-key"
1515
# username: "elastic"
1616
# password: "changeme"
1717

@@ -24,17 +24,17 @@ inputs:
2424
data_stream.namespace: default
2525
use_output: default
2626
streams:
27-
- metricsets:
27+
- metricsets:
2828
- cpu
2929
# Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
3030
data_stream.dataset: system.cpu
31-
- metricsets:
31+
- metricsets:
3232
- memory
3333
data_stream.dataset: system.memory
34-
- metricsets:
34+
- metricsets:
3535
- network
3636
data_stream.dataset: system.network
37-
- metricsets:
37+
- metricsets:
3838
- filesystem
3939
data_stream.dataset: system.filesystem
4040

elastic-agent.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ outputs:
1111
default:
1212
type: elasticsearch
1313
hosts: [127.0.0.1:9200]
14-
api-key: "example-key"
14+
api_key: "example-key"
1515
# username: "elastic"
1616
# password: "changeme"
1717

@@ -24,17 +24,17 @@ inputs:
2424
data_stream.namespace: default
2525
use_output: default
2626
streams:
27-
- metricsets:
27+
- metricsets:
2828
- cpu
2929
# Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
3030
data_stream.dataset: system.cpu
31-
- metricsets:
31+
- metricsets:
3232
- memory
3333
data_stream.dataset: system.memory
34-
- metricsets:
34+
- metricsets:
3535
- network
3636
data_stream.dataset: system.network
37-
- metricsets:
37+
- metricsets:
3838
- filesystem
3939
data_stream.dataset: system.filesystem
4040

internal/pkg/config/loader_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestExternalConfigLoading(t *testing.T) {
4242
"default": map[string]interface{}{
4343
"type": "elasticsearch",
4444
"hosts": []interface{}{"127.0.0.1:9201"},
45-
"api-key": "my-secret-key",
45+
"api_key": "my-secret-key",
4646
},
4747
},
4848
"agent": map[string]interface{}{
@@ -67,7 +67,7 @@ func TestExternalConfigLoading(t *testing.T) {
6767
"default": map[string]interface{}{
6868
"type": "elasticsearch",
6969
"hosts": []interface{}{"127.0.0.1:9201"},
70-
"api-key": "my-secret-key",
70+
"api_key": "my-secret-key",
7171
},
7272
},
7373
"inputs": []interface{}{
@@ -125,7 +125,7 @@ func TestExternalConfigLoading(t *testing.T) {
125125
"default": map[string]interface{}{
126126
"type": "elasticsearch",
127127
"hosts": []interface{}{"127.0.0.1:9201"},
128-
"api-key": "my-secret-key",
128+
"api_key": "my-secret-key",
129129
},
130130
},
131131
"inputs": []interface{}{

internal/pkg/config/testdata/standalone-with-inputs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ outputs:
22
default:
33
type: elasticsearch
44
hosts: [127.0.0.1:9201]
5-
api-key: "my-secret-key"
5+
api_key: "my-secret-key"
66

77
inputs:
88
- type: system/metrics

internal/pkg/config/testdata/standalone1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ outputs:
22
default:
33
type: elasticsearch
44
hosts: [127.0.0.1:9201]
5-
api-key: "my-secret-key"
5+
api_key: "my-secret-key"
66

0 commit comments

Comments
 (0)