Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 68 additions & 36 deletions iac/provider-gcp/nomad/configs/otel-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ receivers:
- job_name: nomad
scrape_interval: 15s
scrape_timeout: 5s
metrics_path: '/v1/metrics'
metrics_path: "/v1/metrics"
static_configs:
- targets: ['localhost:4646']
- targets: ["localhost:4646"]
params:
format: ['prometheus']
format: ["prometheus"]

hostmetrics:
root_path: /hostfs
Expand All @@ -30,15 +30,15 @@ receivers:
scrapers:
cpu:
metrics:
system.cpu.time: # counter of seconds spent
system.cpu.time: # counter of seconds spent
enabled: true
system.cpu.frequency:
enabled: false
system.cpu.logical.count:
enabled: true
system.cpu.physical.count:
enabled: true
system.cpu.utilization: # percentage utilized in the moment
system.cpu.utilization: # percentage utilized in the moment
enabled: false

# entirely disabled, so we omit the module
Expand Down Expand Up @@ -89,7 +89,7 @@ receivers:
enabled: true
system.linux.memory.available: # free memory
enabled: true
system.linux.memory.dirty: # data waiting to be written to disk
system.linux.memory.dirty: # data waiting to be written to disk
enabled: true
system.memory.limit: # total memory
enabled: true
Expand Down Expand Up @@ -156,36 +156,37 @@ receivers:
enabled: true

# entirely disabled, so we omit the module
#process:
# metrics:
# process.cpu.time:
# enabled: false
# process.disk.io:
# enabled: false
# process.memory.usage:
# enabled: false
# process.memory.virtual:
# enabled: false
# process.context_switches:
# enabled: false
# process.cpu.utilization:
# enabled: false
# process.disk.operations:
# enabled: false
# process.handles:
# enabled: false
# process.memory.utilization:
# enabled: false
# process.open_file_descriptors:
# enabled: false
# process.paging.faults:
# enabled: false
# process.signals_pending:
# enabled: false
# process.threads:
# enabled: false
# process.uptime:
# enabled: false
process:
Comment thread
dobrac marked this conversation as resolved.
mute_process_all_errors: true
metrics:
process.cpu.time:
enabled: false
process.disk.io:
enabled: false
process.memory.usage:
enabled: false
process.memory.virtual:
enabled: false
process.context_switches:
enabled: true
process.cpu.utilization:
enabled: false
process.disk.operations:
enabled: false
process.handles:
enabled: false
process.memory.utilization:
enabled: false
process.open_file_descriptors:
enabled: true
process.paging.faults:
enabled: false
process.signals_pending:
enabled: false
process.threads:
enabled: true
process.uptime:
enabled: false

# entirely disabled, so we omit the module
#system:
Expand Down Expand Up @@ -253,6 +254,36 @@ processors:
- state
aggregation_type: sum

metricstransform/aggregate_process_metrics:
transforms:
- include: "process.open_file_descriptors"
match_type: strict
action: update
new_name: "system.open_file_descriptors"
operations:
- action: aggregate_labels
label_set:
- node.id
aggregation_type: sum
- include: "process.context_switches"
match_type: strict
action: update
new_name: "system.context_switches"
operations:
- action: aggregate_labels
label_set:
- node.id
aggregation_type: sum
- include: "process.threads"
match_type: strict
action: update
new_name: "system.threads"
operations:
- action: aggregate_labels
label_set:
- node.id
aggregation_type: sum

resourcedetection:
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor
detectors: [gcp]
Expand Down Expand Up @@ -415,6 +446,7 @@ service:
processors:
- attributes/host_metrics_node
- metricstransform/single_cpu
- metricstransform/aggregate_process_metrics
- resourcedetection
- transform/set-name
- batch
Expand Down