Skip to content

Commit 03a81c0

Browse files
authored
[EDOT][windows] add missing samples for windows (#10728)
* add docs and changelog * remove redundant
1 parent 12b1f1c commit 03a81c0

File tree

6 files changed

+462
-0
lines changed

6 files changed

+462
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Add sample config files for Windows ES and mOTLP ingestion.
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component:
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
#pr: https://github.com/owner/repo/1234
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
issue: https://github.com/elastic/elastic-agent/issues/10540
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
receivers:
2+
windowseventlog:
3+
channel: application
4+
5+
# Receiver for CPU, Disk, Memory, and Filesystem metrics
6+
hostmetrics/system:
7+
collection_interval: 60s
8+
scrapers:
9+
filesystem:
10+
memory:
11+
metrics:
12+
system.memory.utilization:
13+
enabled: true
14+
# process scraper is disabled for now: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/39423
15+
#process:
16+
# mute_process_exe_error: true
17+
# mute_process_io_error: true
18+
# mute_process_user_error: true
19+
# metrics:
20+
# process.threads:
21+
# enabled: true
22+
# process.open_file_descriptors:
23+
# enabled: true
24+
# process.memory.utilization:
25+
# enabled: true
26+
# process.disk.operations:
27+
# enabled: true
28+
network:
29+
processes:
30+
load:
31+
32+
# Receiver for logs, traces, and metrics from SDKs
33+
otlp/fromsdk:
34+
protocols:
35+
grpc:
36+
http:
37+
38+
extensions:
39+
file_storage:
40+
directory: ${env:STORAGE_DIR}
41+
42+
processors:
43+
resourcedetection:
44+
detectors: ["system"]
45+
system:
46+
hostname_sources: ["os"]
47+
resource_attributes:
48+
host.name:
49+
enabled: true
50+
host.id:
51+
enabled: false
52+
host.arch:
53+
enabled: true
54+
host.ip:
55+
enabled: true
56+
host.mac:
57+
enabled: true
58+
host.cpu.vendor.id:
59+
enabled: true
60+
host.cpu.family:
61+
enabled: true
62+
host.cpu.model.id:
63+
enabled: true
64+
host.cpu.model.name:
65+
enabled: true
66+
host.cpu.stepping:
67+
enabled: true
68+
host.cpu.cache.l2.size:
69+
enabled: true
70+
os.description:
71+
enabled: true
72+
os.type:
73+
enabled: true
74+
75+
exporters:
76+
otlp/ingest_logs:
77+
endpoint: ${env:ELASTIC_OTLP_ENDPOINT}
78+
headers:
79+
Authorization: ApiKey ${env:ELASTIC_API_KEY}
80+
sending_queue:
81+
enabled: true
82+
sizer: bytes
83+
queue_size: 50000000 # 50MB uncompressed
84+
block_on_overflow: true
85+
batch:
86+
flush_interval: 1s
87+
min_size: 1_000_000 # 1MB uncompressed
88+
max_size: 4_000_000 # 4MB uncompressed
89+
otlp/ingest_metrics_traces:
90+
endpoint: ${env:ELASTIC_OTLP_ENDPOINT}
91+
headers:
92+
Authorization: ApiKey ${env:ELASTIC_API_KEY}
93+
sending_queue:
94+
enabled: true
95+
sizer: bytes
96+
queue_size: 50000000 # 50MB uncompressed
97+
block_on_overflow: true
98+
batch:
99+
flush_interval: 1s
100+
min_size: 1_000_000 # 1MB uncompressed
101+
max_size: 4_000_000 # 4MB uncompressed
102+
103+
service:
104+
extensions: [file_storage]
105+
pipelines:
106+
traces/fromsdk:
107+
receivers: [otlp/fromsdk]
108+
processors: []
109+
exporters: [otlp/ingest_metrics_traces]
110+
111+
metrics/fromsdk:
112+
receivers: [otlp/fromsdk]
113+
processors: []
114+
exporters: [otlp/ingest_metrics_traces]
115+
116+
logs/fromsdk:
117+
receivers: [otlp/fromsdk]
118+
processors: []
119+
exporters: [otlp/ingest_logs]
120+
121+
metrics/hostmetrics:
122+
receivers: [hostmetrics/system]
123+
processors: [resourcedetection]
124+
exporters: [otlp/ingest_metrics_traces]
125+
126+
logs/platformlogs:
127+
receivers: [windowseventlog]
128+
processors: [resourcedetection]
129+
exporters: [otlp/ingest_logs]
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
receivers:
2+
windowseventlog:
3+
channel: application
4+
5+
processors:
6+
resourcedetection:
7+
detectors: ["system"]
8+
system:
9+
hostname_sources: ["os"]
10+
resource_attributes:
11+
host.name:
12+
enabled: true
13+
host.id:
14+
enabled: false
15+
host.arch:
16+
enabled: true
17+
host.ip:
18+
enabled: true
19+
host.mac:
20+
enabled: true
21+
host.cpu.vendor.id:
22+
enabled: true
23+
host.cpu.family:
24+
enabled: true
25+
host.cpu.model.id:
26+
enabled: true
27+
host.cpu.model.name:
28+
enabled: true
29+
host.cpu.stepping:
30+
enabled: true
31+
host.cpu.cache.l2.size:
32+
enabled: true
33+
os.description:
34+
enabled: true
35+
os.type:
36+
enabled: true
37+
38+
exporters:
39+
# Exporter to print the first 5 logs/metrics and then every 1000th
40+
debug:
41+
verbosity: detailed
42+
sampling_initial: 5
43+
sampling_thereafter: 1000
44+
45+
# Exporter to send logs and metrics to Elasticsearch Managed OTLP Input
46+
otlp/ingest:
47+
endpoint: ${env:ELASTIC_OTLP_ENDPOINT}
48+
headers:
49+
Authorization: ApiKey ${env:ELASTIC_API_KEY}
50+
sending_queue:
51+
enabled: true
52+
sizer: bytes
53+
queue_size: 50000000 # 50MB uncompressed
54+
block_on_overflow: true
55+
batch:
56+
flush_interval: 1s
57+
min_size: 1_000_000 # 1MB uncompressed
58+
max_size: 4_000_000 # 4MB uncompressed
59+
60+
service:
61+
pipelines:
62+
logs/platformlogs:
63+
receivers: [windowseventlog]
64+
processors: [resourcedetection]
65+
exporters: [debug, otlp/ingest]
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
receivers:
2+
windowseventlog:
3+
channel: application
4+
5+
# Receiver for CPU, Disk, Memory, and Filesystem metrics
6+
hostmetrics/system:
7+
collection_interval: 60s
8+
scrapers:
9+
filesystem:
10+
memory:
11+
metrics:
12+
system.memory.utilization:
13+
enabled: true
14+
# process scraper is disabled for now: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/39423
15+
#process:
16+
# mute_process_exe_error: true
17+
# mute_process_io_error: true
18+
# mute_process_user_error: true
19+
# metrics:
20+
# process.threads:
21+
# enabled: true
22+
# process.open_file_descriptors:
23+
# enabled: true
24+
# process.memory.utilization:
25+
# enabled: true
26+
# process.disk.operations:
27+
# enabled: true
28+
network:
29+
processes:
30+
load:
31+
32+
processors:
33+
resourcedetection:
34+
detectors: ["system"]
35+
system:
36+
hostname_sources: ["os"]
37+
resource_attributes:
38+
host.name:
39+
enabled: true
40+
host.id:
41+
enabled: false
42+
host.arch:
43+
enabled: true
44+
host.ip:
45+
enabled: true
46+
host.mac:
47+
enabled: true
48+
host.cpu.vendor.id:
49+
enabled: true
50+
host.cpu.family:
51+
enabled: true
52+
host.cpu.model.id:
53+
enabled: true
54+
host.cpu.model.name:
55+
enabled: true
56+
host.cpu.stepping:
57+
enabled: true
58+
host.cpu.cache.l2.size:
59+
enabled: true
60+
os.description:
61+
enabled: true
62+
os.type:
63+
enabled: true
64+
65+
exporters:
66+
# Exporter to send logs and metrics to Elasticsearch Managed OTLP Input
67+
otlp/ingest:
68+
endpoint: ${env:ELASTIC_OTLP_ENDPOINT}
69+
headers:
70+
Authorization: ApiKey ${env:ELASTIC_API_KEY}
71+
sending_queue:
72+
enabled: true
73+
sizer: bytes
74+
queue_size: 50000000 # 50MB uncompressed
75+
block_on_overflow: true
76+
batch:
77+
flush_interval: 1s
78+
min_size: 1_000_000 # 1MB uncompressed
79+
max_size: 4_000_000 # 4MB uncompressed
80+
81+
service:
82+
pipelines:
83+
metrics/hostmetrics:
84+
receivers: [hostmetrics/system]
85+
processors: [resourcedetection]
86+
exporters: [otlp/ingest]
87+
logs/platformlogs:
88+
receivers: [windowseventlog]
89+
processors: [resourcedetection]
90+
exporters: [otlp/ingest]
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
receivers:
2+
windowseventlog:
3+
channel: application
4+
5+
processors:
6+
resourcedetection:
7+
detectors: ["system"]
8+
system:
9+
hostname_sources: ["os"]
10+
resource_attributes:
11+
host.name:
12+
enabled: true
13+
host.id:
14+
enabled: false
15+
host.arch:
16+
enabled: true
17+
host.ip:
18+
enabled: true
19+
host.mac:
20+
enabled: true
21+
host.cpu.vendor.id:
22+
enabled: true
23+
host.cpu.family:
24+
enabled: true
25+
host.cpu.model.id:
26+
enabled: true
27+
host.cpu.model.name:
28+
enabled: true
29+
host.cpu.stepping:
30+
enabled: true
31+
host.cpu.cache.l2.size:
32+
enabled: true
33+
os.description:
34+
enabled: true
35+
os.type:
36+
enabled: true
37+
38+
exporters:
39+
# Exporter to print the first 5 logs/metrics and then every 1000th
40+
debug:
41+
verbosity: detailed
42+
sampling_initial: 5
43+
sampling_thereafter: 1000
44+
45+
# Exporter to send logs and metrics to Elasticsearch
46+
elasticsearch/otel:
47+
endpoints: ["${env:ELASTIC_ENDPOINT}"]
48+
api_key: ${env:ELASTIC_API_KEY}
49+
mapping:
50+
mode: otel
51+
52+
service:
53+
pipelines:
54+
logs/platformlogs:
55+
receivers: [windowseventlog]
56+
processors: [resourcedetection]
57+
exporters: [debug, elasticsearch/otel]

0 commit comments

Comments
 (0)