Skip to content

Commit f17c328

Browse files
feat: add snapshot tests for bundled config
1 parent bb65b80 commit f17c328

File tree

8 files changed

+1199
-1
lines changed

8 files changed

+1199
-1
lines changed

integration/scripts/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
fabric==3.2.2
2+
pytest-snapshot==0.9.0
Lines changed: 366 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,366 @@
1+
connectors:
2+
count: null
3+
exporters:
4+
debug: null
5+
nop: null
6+
otlphttp/observe:
7+
compression: zstd
8+
endpoint: https://123456789.collect.observe-eng.com/v2/otel
9+
headers:
10+
authorization: Bearer abcdefghijklmnopqrst:OWt0SXV4YTlqYUhpSHZjSlhXUDVkRXpl
11+
x-observe-target-package: Host Explorer
12+
retry_on_failure:
13+
enabled: true
14+
sending_queue:
15+
num_consumers: 4
16+
queue_size: 100
17+
otlphttp/observetracing:
18+
compression: zstd
19+
endpoint: https://123456789.collect.observe-eng.com/v2/otel
20+
headers:
21+
authorization: Bearer abcdefghijklmnopqrst:OWt0SXV4YTlqYUhpSHZjSlhXUDVkRXpl
22+
x-observe-target-package: Tracing
23+
retry_on_failure:
24+
enabled: true
25+
sending_queue:
26+
num_consumers: 4
27+
queue_size: 100
28+
prometheusremotewrite/observe:
29+
endpoint: https://123456789.collect.observe-eng.com/v1/prometheus
30+
headers:
31+
authorization: Bearer abcdefghijklmnopqrst:OWt0SXV4YTlqYUhpSHZjSlhXUDVkRXpl
32+
x-observe-target-package: Host Explorer
33+
resource_to_telemetry_conversion:
34+
enabled: true
35+
send_metadata: true
36+
extensions:
37+
file_storage:
38+
directory: /var/lib/observe-agent/filestorage
39+
health_check:
40+
endpoint: localhost:12345
41+
path: /test-status
42+
processors:
43+
batch:
44+
timeout: 5s
45+
deltatocumulative: null
46+
filter/count:
47+
error_mode: ignore
48+
metrics:
49+
metric:
50+
- IsMatch(name, ".*")
51+
memory_limiter:
52+
check_interval: 1s
53+
limit_percentage: 80
54+
spike_limit_percentage: 20
55+
resourcedetection:
56+
detectors:
57+
- env
58+
- system
59+
system:
60+
hostname_sources:
61+
- dns
62+
- os
63+
resource_attributes:
64+
host.arch:
65+
enabled: true
66+
host.cpu.cache.l2.size:
67+
enabled: true
68+
host.cpu.family:
69+
enabled: true
70+
host.cpu.model.id:
71+
enabled: true
72+
host.cpu.model.name:
73+
enabled: true
74+
host.cpu.stepping:
75+
enabled: true
76+
host.cpu.vendor.id:
77+
enabled: true
78+
host.id:
79+
enabled: false
80+
host.name:
81+
enabled: true
82+
os.description:
83+
enabled: true
84+
os.type:
85+
enabled: true
86+
resourcedetection/cloud:
87+
detectors:
88+
- ec2
89+
- test
90+
override: false
91+
timeout: 2s
92+
transform/truncate:
93+
log_statements:
94+
- context: log
95+
statements:
96+
- truncate_all(attributes, 4095)
97+
- truncate_all(resource.attributes, 4095)
98+
trace_statements:
99+
- context: span
100+
statements:
101+
- truncate_all(attributes, 4095)
102+
- truncate_all(resource.attributes, 4095)
103+
receivers:
104+
filelog/agent-config:
105+
include:
106+
- /etc/observe-agent/connections/common/base.yaml.tmpl
107+
include_file_path: true
108+
multiline:
109+
line_end_pattern: ENDOFLINEPATTERN
110+
poll_interval: 5m
111+
start_at: beginning
112+
filelog/host_monitoring:
113+
exclude:
114+
- exclude1
115+
- exclude2
116+
include:
117+
- include1
118+
- include2
119+
include_file_path: true
120+
max_log_size: 4MiB
121+
operators:
122+
- expr: body matches "otel-contrib"
123+
type: filter
124+
retry_on_failure:
125+
enabled: true
126+
storage: file_storage
127+
filestats/agent:
128+
collection_interval: 5m
129+
include: /etc/observe-agent/connections/common/base.yaml.tmpl
130+
initial_delay: 60s
131+
hostmetrics/host-monitoring-host:
132+
collection_interval: 60s
133+
root_path: /hostfs
134+
scrapers:
135+
cpu:
136+
metrics:
137+
system.cpu.frequency:
138+
enabled: true
139+
system.cpu.logical.count:
140+
enabled: true
141+
system.cpu.physical.count:
142+
enabled: true
143+
system.cpu.utilization:
144+
enabled: true
145+
disk: null
146+
filesystem:
147+
metrics:
148+
system.filesystem.utilization:
149+
enabled: true
150+
load: null
151+
memory:
152+
metrics:
153+
system.linux.memory.available:
154+
enabled: true
155+
system.memory.utilization:
156+
enabled: true
157+
network: null
158+
paging:
159+
metrics:
160+
system.paging.utilization:
161+
enabled: true
162+
processes: null
163+
hostmetrics/host-monitoring-process:
164+
collection_interval: 60s
165+
root_path: /hostfs
166+
scrapers:
167+
process:
168+
metrics:
169+
process.context_switches:
170+
enabled: true
171+
process.cpu.utilization:
172+
enabled: true
173+
process.disk.operations:
174+
enabled: true
175+
process.memory.utilization:
176+
enabled: true
177+
process.open_file_descriptors:
178+
enabled: true
179+
process.paging.faults:
180+
enabled: true
181+
process.signals_pending:
182+
enabled: true
183+
process.threads:
184+
enabled: true
185+
mute_process_exe_error: true
186+
mute_process_io_error: true
187+
mute_process_name_error: true
188+
mute_process_user_error: true
189+
journald/agent:
190+
priority: info
191+
units:
192+
- observe-agent
193+
journald/host_monitoring:
194+
priority: info
195+
units:
196+
- cron
197+
- ssh
198+
- systemd-networkd
199+
- systemd-resolved
200+
- systemd-login
201+
- multipathd
202+
- systemd-user-sessions
203+
- ufw
204+
- observe-agent
205+
nop: null
206+
otlp:
207+
protocols:
208+
grpc:
209+
endpoint: localhost:4317
210+
http:
211+
endpoint: localhost:4318
212+
prometheus/agent:
213+
config:
214+
scrape_configs:
215+
- job_name: otelcol
216+
metric_relabel_configs:
217+
- action: drop
218+
regex: .*grpc_io.*
219+
source_labels:
220+
- __name__
221+
scrape_interval: 10s
222+
static_configs:
223+
- targets:
224+
- 0.0.0.0:8888
225+
service:
226+
extensions:
227+
- health_check
228+
- file_storage
229+
pipelines:
230+
logs/agent-config:
231+
exporters:
232+
- otlphttp/observe
233+
processors:
234+
- memory_limiter
235+
- transform/truncate
236+
- resourcedetection
237+
- resourcedetection/cloud
238+
- batch
239+
receivers:
240+
- filelog/agent-config
241+
logs/agent-journald:
242+
exporters:
243+
- otlphttp/observe
244+
- count
245+
processors:
246+
- memory_limiter
247+
- transform/truncate
248+
- resourcedetection
249+
- resourcedetection/cloud
250+
- batch
251+
receivers:
252+
- journald/agent
253+
logs/forward:
254+
exporters:
255+
- otlphttp/observe
256+
- count
257+
processors:
258+
- resourcedetection
259+
- resourcedetection/cloud
260+
receivers:
261+
- otlp
262+
logs/host_monitoring-file:
263+
exporters:
264+
- otlphttp/observe
265+
- count
266+
processors:
267+
- memory_limiter
268+
- transform/truncate
269+
- resourcedetection
270+
- resourcedetection/cloud
271+
- batch
272+
receivers:
273+
- filelog/host_monitoring
274+
logs/host_monitoring-journald:
275+
exporters:
276+
- otlphttp/observe
277+
- count
278+
processors:
279+
- memory_limiter
280+
- transform/truncate
281+
- resourcedetection
282+
- resourcedetection/cloud
283+
- batch
284+
receivers:
285+
- journald/host_monitoring
286+
metrics/agent-filestats:
287+
exporters:
288+
- prometheusremotewrite/observe
289+
processors:
290+
- resourcedetection
291+
- resourcedetection/cloud
292+
receivers:
293+
- filestats/agent
294+
metrics/agent-internal:
295+
exporters:
296+
- prometheusremotewrite/observe
297+
processors:
298+
- memory_limiter
299+
- transform/truncate
300+
- resourcedetection
301+
- resourcedetection/cloud
302+
- deltatocumulative
303+
- batch
304+
receivers:
305+
- prometheus/agent
306+
- count
307+
metrics/count-nop-in:
308+
exporters:
309+
- count
310+
receivers:
311+
- nop
312+
metrics/count-nop-out:
313+
exporters:
314+
- nop
315+
receivers:
316+
- count
317+
metrics/forward:
318+
exporters:
319+
- prometheusremotewrite/observe
320+
processors:
321+
- resourcedetection
322+
- resourcedetection/cloud
323+
- deltatocumulative
324+
- batch
325+
receivers:
326+
- otlp
327+
metrics/host_monitoring_host:
328+
exporters:
329+
- prometheusremotewrite/observe
330+
processors:
331+
- memory_limiter
332+
- resourcedetection
333+
- resourcedetection/cloud
334+
- batch
335+
receivers:
336+
- hostmetrics/host-monitoring-host
337+
metrics/host_monitoring_process:
338+
exporters:
339+
- prometheusremotewrite/observe
340+
processors:
341+
- memory_limiter
342+
- resourcedetection
343+
- resourcedetection/cloud
344+
- batch
345+
receivers:
346+
- hostmetrics/host-monitoring-process
347+
traces/forward:
348+
exporters:
349+
- otlphttp/observetracing
350+
processors:
351+
- resourcedetection
352+
- resourcedetection/cloud
353+
receivers:
354+
- otlp
355+
telemetry:
356+
logs:
357+
level: ERROR
358+
metrics:
359+
level: normal
360+
readers:
361+
- pull:
362+
exporter:
363+
prometheus:
364+
host: 0.0.0.0
365+
port: 12346
366+

0 commit comments

Comments
 (0)