Skip to content

Instantly share code, notes, and snippets.

@prabhatsharma
Created May 17, 2024 21:12
Show Gist options
  • Save prabhatsharma/0316162dd8b517dfdad2a77cc859d2d2 to your computer and use it in GitHub Desktop.
Save prabhatsharma/0316162dd8b517dfdad2a77cc859d2d2 to your computer and use it in GitHub Desktop.
otel config yaml for windows
receivers:
sqlserver:
collection_interval: 10s
hostmetrics:
collection_interval: 30s
scrapers:
cpu:
disk:
filesystem:
load:
memory:
network:
paging:
processes:
# process: # a bug in the process scraper causes the collector to throw errors so disabling it for now
windowsperfcounters/memory:
metrics:
bytes.committed:
description: the number of bytes committed to memory
unit: By
gauge:
collection_interval: 30s
perfcounters:
- object: Memory
counters:
- name: Committed Bytes
metric: bytes.committed
windowsperfcounters/processor:
collection_interval: 1m
metrics:
processor.time:
description: active and idle time of the processor
unit: "%"
gauge:
perfcounters:
- object: "Processor"
instances: "*"
counters:
- name: "% Processor Time"
metric: processor.time
attributes:
state: active
- object: "Processor"
instances: [1, 2]
counters:
- name: "% Idle Time"
metric: processor.time
attributes:
state: idle
windowseventlog/application:
channel: application
windowseventlog/security:
channel: security
windowseventlog/setup:
channel: setup
windowseventlog/system:
channel: system
processors:
resourcedetection/system:
detectors: ["system"]
system:
hostname_sources: ["os"]
memory_limiter:
check_interval: 1s
limit_percentage: 75
spike_limit_percentage: 15
batch:
send_batch_size: 10000
timeout: 10s
extensions:
zpages: {}
memory_ballast:
size_mib: 512
exporters:
otlphttp/openobserve:
endpoint: $URL
headers:
stream-name: windows
Authorization: "Basic $AUTH_KEY"
service:
extensions: [zpages, memory_ballast]
pipelines:
metrics:
receivers: [sqlserver, windowsperfcounters/processor, windowsperfcounters/memory, hostmetrics]
processors: [resourcedetection/system, memory_limiter, batch]
exporters: [otlphttp/openobserve]
logs:
receivers: [windowseventlog/application,windowseventlog/security,windowseventlog/setup,windowseventlog/system]
processors: [resourcedetection/system, memory_limiter, batch]
exporters: [otlphttp/openobserve]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment