Skip to content

Commit 44bbfa6

Browse files
mergify[bot]theletterfcarsoniprogercoll
authored
Create gateway.yml sample (#8199) (#8250)
* Create gateway.yml sample This adds a sample configuration file for a standalone (nonK8s) Collector in Gateway mode. Configuration is based on the K8s one from https://github.com/elastic/elastic-agent/blob/e15fb713bde0254af089eccc09c01d9e00fa6f68/deploy/helm/edot-collector/kube-stack/values.yaml#L557 * Update internal/pkg/otel/samples/linux/gateway.yml * Update gateway.yml * Update internal/pkg/otel/samples/linux/gateway.yml --------- (cherry picked from commit 3b3c0af) Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> Co-authored-by: Carson Ip <[email protected]> Co-authored-by: Roger Coll <[email protected]>
1 parent 28432c0 commit 44bbfa6

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
receivers:
2+
# Receives data from other Collectors in Agent mode
3+
otlp:
4+
protocols:
5+
grpc:
6+
endpoint: 0.0.0.0:4317 # Listen on all interfaces
7+
http:
8+
endpoint: 0.0.0.0:4318 # Listen on all interfaces
9+
10+
connectors:
11+
# Routing connector splits infra metrics from other metrics and routes them to ECS-based pipeline
12+
# Other metrics are exported in OTel-native format to Elasticsearch
13+
routing:
14+
default_pipelines: [metrics/otel]
15+
error_mode: ignore
16+
table:
17+
- context: metric
18+
statement: route() where IsMatch(instrumentation_scope.name, "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/*")
19+
pipelines: [metrics/infra/ecs, metrics/otel]
20+
elasticapm: {} # Elastic APM Connector
21+
22+
processors:
23+
elasticinframetrics:
24+
add_system_metrics: true
25+
drop_original: true
26+
attributes/dataset:
27+
actions:
28+
- key: event.dataset
29+
from_attribute: data_stream.dataset
30+
action: upsert
31+
resource/process:
32+
attributes:
33+
- key: process.executable.name
34+
action: delete
35+
- key: process.executable.path
36+
action: delete
37+
batch:
38+
send_batch_size: 1000
39+
timeout: 1s
40+
send_batch_max_size: 1500
41+
batch/metrics:
42+
send_batch_max_size: 0 # Explicitly set to 0 to avoid splitting metrics requests
43+
timeout: 1s
44+
elastictrace: {} # Elastic Trace Processor
45+
46+
exporters:
47+
debug: {}
48+
elasticsearch/otel:
49+
endpoints:
50+
- ${ELASTIC_ENDPOINT} # Will be populated from environment variable
51+
api_key: ${ELASTIC_API_KEY} # Will be populated from environment variable
52+
logs_dynamic_index:
53+
enabled: true
54+
metrics_dynamic_index:
55+
enabled: true
56+
traces_dynamic_index:
57+
enabled: true
58+
# tls:
59+
# insecure_skip_verify: true
60+
mapping:
61+
mode: otel
62+
elasticsearch/ecs:
63+
endpoints:
64+
- ${ELASTIC_ENDPOINT} # Will be populated from environment variable
65+
api_key: ${ELASTIC_API_KEY} # Will be populated from environment variable
66+
mapping:
67+
mode: ecs
68+
69+
service:
70+
pipelines:
71+
metrics:
72+
receivers: [otlp]
73+
exporters: [routing]
74+
metrics/infra/ecs:
75+
receivers: [routing]
76+
processors:
77+
- elasticinframetrics
78+
- attributes/dataset
79+
- resource/process
80+
- batch/metrics
81+
exporters: [debug, elasticsearch/ecs]
82+
metrics/otel:
83+
receivers: [routing]
84+
processors: [batch/metrics]
85+
exporters: [debug, elasticsearch/otel]
86+
logs:
87+
receivers: [otlp]
88+
processors: [batch]
89+
exporters: [debug, elasticapm, elasticsearch/otel]
90+
traces:
91+
receivers: [otlp]
92+
processors: [batch, elastictrace]
93+
exporters: [debug, elasticapm, elasticsearch/otel]
94+
metrics/aggregated-otel-metrics:
95+
receivers:
96+
- elasticapm
97+
processors: [] # No processors defined in the original for this pipeline
98+
exporters:
99+
- debug
100+
- elasticsearch/otel

0 commit comments

Comments
 (0)