-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[otel] Add basic configuration samples #5002
Changes from all commits
4cd4900
853d93b
f6caafe
ecfbdf3
094785a
44c9188
9e7920d
0f7bfdb
c9ead48
498fa2e
4832ecf
871ad33
dfc070f
fbe3d7d
9cbef7d
51bb3ad
1839dbf
90376a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
receivers: | ||
# Receiver for platform specific log files | ||
filelog/platformlogs: | ||
include: [ /var/log/*.log ] | ||
# start_at: beginning | ||
|
||
# Receiver for CPU, Disk, Memory, and Filesystem metrics | ||
hostmetrics/system: | ||
collection_interval: 30s | ||
scrapers: | ||
disk: | ||
filesystem: | ||
cpu: | ||
memory: | ||
|
||
processors: | ||
elasticinframetrics: | ||
resourcedetection: | ||
detectors: ["system"] | ||
system: | ||
hostname_sources: ["os"] | ||
resource_attributes: | ||
host.name: | ||
enabled: true | ||
host.id: | ||
enabled: false | ||
host.arch: | ||
enabled: true | ||
host.ip: | ||
enabled: true | ||
host.mac: | ||
enabled: true | ||
host.cpu.vendor.id: | ||
enabled: true | ||
host.cpu.family: | ||
enabled: true | ||
host.cpu.model.id: | ||
enabled: true | ||
host.cpu.model.name: | ||
enabled: true | ||
host.cpu.stepping: | ||
enabled: true | ||
host.cpu.cache.l2.size: | ||
enabled: true | ||
os.description: | ||
enabled: true | ||
os.type: | ||
enabled: true | ||
|
||
exporters: | ||
elasticsearch: | ||
endpoints: ["${env:ELASTIC_ENDPOINT}"] | ||
api_key: ${env:ELASTIC_API_KEY} | ||
mapping: | ||
mode: ecs | ||
logs_dynamic_index: | ||
enabled: true | ||
metrics_dynamic_index: | ||
enabled: true | ||
traces_dynamic_index: | ||
enabled: true | ||
|
||
service: | ||
pipelines: | ||
metrics/hostmetrics: | ||
receivers: [hostmetrics/system] | ||
processors: [elasticinframetrics, resourcedetection] | ||
exporters: [elasticsearch] | ||
|
||
logs/platformlogs: | ||
receivers: [filelog/platformlogs] | ||
processors: [resourcedetection] | ||
exporters: [elasticsearch] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
receivers: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file has everything that the above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding traces requires adding a listening port so i think it makes sense for it to be optional |
||
|
||
# Receiver for platform specific log files | ||
filelog/platformlogs: | ||
include: [ /var/log/*.log ] | ||
# start_at: beginning | ||
|
||
# Receiver for CPU, Disk, Memory, and Filesystem metrics | ||
hostmetrics/system: | ||
collection_interval: 30s | ||
scrapers: | ||
disk: | ||
filesystem: | ||
cpu: | ||
memory: | ||
|
||
# Receiver for logs, traces, and metrics from SDKs | ||
otlp/fromsdk: | ||
protocols: | ||
grpc: | ||
http: | ||
|
||
processors: | ||
elasticinframetrics: | ||
resourcedetection: | ||
detectors: ["system"] | ||
system: | ||
hostname_sources: ["os"] | ||
resource_attributes: | ||
host.name: | ||
enabled: true | ||
host.id: | ||
enabled: false | ||
host.arch: | ||
enabled: true | ||
host.ip: | ||
enabled: true | ||
host.mac: | ||
enabled: true | ||
host.cpu.vendor.id: | ||
enabled: true | ||
host.cpu.family: | ||
enabled: true | ||
host.cpu.model.id: | ||
enabled: true | ||
host.cpu.model.name: | ||
enabled: true | ||
host.cpu.stepping: | ||
enabled: true | ||
host.cpu.cache.l2.size: | ||
enabled: true | ||
os.description: | ||
enabled: true | ||
os.type: | ||
enabled: true | ||
|
||
exporters: | ||
|
||
otlp/apm: | ||
endpoint: "${env:APM_ENDPOINT}" | ||
headers: | ||
# Elastic APM Server secret token or API key | ||
Authorization: "Bearer ${env:APM_SECRET_KEY}" | ||
|
||
elasticsearch: | ||
endpoints: ["${env:ELASTIC_ENDPOINT}"] | ||
api_key: ${env:ELASTIC_API_KEY} | ||
mapping: | ||
mode: ecs | ||
michalpristas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
logs_dynamic_index: | ||
enabled: true | ||
metrics_dynamic_index: | ||
enabled: true | ||
traces_dynamic_index: | ||
enabled: true | ||
|
||
service: | ||
pipelines: | ||
traces/fromsdk: | ||
receivers: [otlp/fromsdk] | ||
processors: [] | ||
exporters: [otlp/apm] | ||
|
||
metrics/fromsdk: | ||
receivers: [otlp/fromsdk] | ||
processors: [] | ||
exporters: [otlp/apm] | ||
|
||
metrics/hostmetrics: | ||
receivers: [hostmetrics/system] | ||
processors: [elasticinframetrics, resourcedetection] | ||
exporters: [elasticsearch] | ||
|
||
logs/fromsdk: | ||
receivers: [otlp/fromsdk] | ||
processors: [] | ||
exporters: [otlp/apm] | ||
|
||
logs/platformlogs: | ||
receivers: [filelog/platformlogs] | ||
processors: [resourcedetection] | ||
exporters: [elasticsearch] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
receivers: | ||
# Receiver for platform specific log files | ||
filelog/platformlogs: | ||
include: [ /var/log/*.log ] | ||
# start_at: beginning | ||
|
||
|
||
processors: | ||
resourcedetection: | ||
detectors: ["system"] | ||
system: | ||
hostname_sources: ["os"] | ||
resource_attributes: | ||
host.name: | ||
enabled: true | ||
host.id: | ||
enabled: false | ||
host.arch: | ||
enabled: true | ||
host.ip: | ||
enabled: true | ||
host.mac: | ||
enabled: true | ||
host.cpu.vendor.id: | ||
enabled: true | ||
host.cpu.family: | ||
enabled: true | ||
host.cpu.model.id: | ||
enabled: true | ||
host.cpu.model.name: | ||
enabled: true | ||
host.cpu.stepping: | ||
enabled: true | ||
host.cpu.cache.l2.size: | ||
enabled: true | ||
os.description: | ||
enabled: true | ||
os.type: | ||
enabled: true | ||
|
||
exporters: | ||
# Exporter to print the first 5 logs/metrics and then every 1000th | ||
debug: | ||
verbosity: detailed | ||
sampling_initial: 5 | ||
sampling_thereafter: 1000 | ||
|
||
# Exporter to send logs and metrics to Elasticsearch | ||
elasticsearch: | ||
endpoints: ["${env:ELASTIC_ENDPOINT}"] | ||
api_key: ${env:ELASTIC_API_KEY} | ||
mapping: | ||
mode: ecs | ||
logs_dynamic_index: | ||
enabled: true | ||
metrics_dynamic_index: | ||
enabled: true | ||
traces_dynamic_index: | ||
enabled: true | ||
|
||
service: | ||
pipelines: | ||
logs/platformlogs: | ||
receivers: [filelog/platformlogs] | ||
processors: [resourcedetection] | ||
exporters: [debug, elasticsearch] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
receivers: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another version of the same file as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed the first one |
||
# Receiver for platform specific log files | ||
filelog/platformlogs: | ||
include: [ /var/log/*.log ] | ||
# start_at: beginning | ||
|
||
# Receiver for CPU, Disk, Memory, and Filesystem metrics | ||
hostmetrics/system: | ||
collection_interval: 30s | ||
scrapers: | ||
disk: | ||
filesystem: | ||
cpu: | ||
memory: | ||
|
||
processors: | ||
resourcedetection: | ||
detectors: ["system"] | ||
system: | ||
hostname_sources: ["os"] | ||
resource_attributes: | ||
host.name: | ||
enabled: true | ||
host.id: | ||
enabled: false | ||
host.arch: | ||
enabled: true | ||
host.ip: | ||
enabled: true | ||
host.mac: | ||
enabled: true | ||
host.cpu.vendor.id: | ||
enabled: true | ||
host.cpu.family: | ||
enabled: true | ||
host.cpu.model.id: | ||
enabled: true | ||
host.cpu.model.name: | ||
enabled: true | ||
host.cpu.stepping: | ||
enabled: true | ||
host.cpu.cache.l2.size: | ||
enabled: true | ||
os.description: | ||
enabled: true | ||
os.type: | ||
enabled: true | ||
|
||
exporters: | ||
# Exporter to print the first 5 logs/metrics and then every 1000th | ||
debug: | ||
verbosity: detailed | ||
sampling_initial: 5 | ||
sampling_thereafter: 1000 | ||
|
||
# Exporter to send logs and metrics to Elasticsearch | ||
elasticsearch: | ||
endpoints: ["${env:ELASTIC_ENDPOINT}"] | ||
api_key: ${env:ELASTIC_API_KEY} | ||
mapping: | ||
mode: ecs | ||
logs_dynamic_index: | ||
enabled: true | ||
metrics_dynamic_index: | ||
enabled: true | ||
traces_dynamic_index: | ||
enabled: true | ||
|
||
service: | ||
pipelines: | ||
metrics/hostmetrics: | ||
receivers: [hostmetrics/system] | ||
processors: [resourcedetection] | ||
exporters: [debug, elasticsearch] | ||
logs/platformlogs: | ||
receivers: [filelog/platformlogs] | ||
processors: [resourcedetection] | ||
exporters: [debug, elasticsearch] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same file as the above
logs_host_metrics.yml
, right? 🙂There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i wanted to do resource enrichment but i will take it out