Skip to content

Commit

Permalink
🔄 synced local 'assets/conf.d/examples/' with remote 'otelcol-examples/'
Browse files Browse the repository at this point in the history
  • Loading branch information
sumologic-sanyaku-apps committed Sep 27, 2024
1 parent f939d71 commit 7cbccc6
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions assets/conf.d/examples/mongodb.yaml.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
receivers:
mongodb/localhost:
hosts:
- endpoint: localhost:27017
username: admin
password: password
collection_interval: 1m
tls:
insecure: true
insecure_skip_verify: true
metrics:
mongodb.document.operation.count:
enabled: true
mongodb.operation.repl.count:
enabled: true
mongodb.uptime:
enabled: true
mongodb.operation.latency.time:
enabled: true
filelog/mongodb/localhost:
storage: file_storage
include_file_name: false
include_file_path: true
operators:
- type: json_parser
- type: move
from: attributes["log.file.path"]
to: resource["log.file.path"]
Expand All @@ -24,16 +43,38 @@ processors:
- key: _contentType
value: OpenTelemetry
action: insert
- key: db.node.name
action: insert
from_attribute: host.name
- key: db.cluster.name
value: test
action: insert
resource/mongodb_resource_attributes/metrics/localhost:
attributes:
- key: _source
value: mongodb/mongodb
action: insert
- key: _sourceName
value: mongodb
action: insert
resource/mongodb_resource_attributes/logs/localhost:
attributes:
- key: _source
value: mongodb/filelog
action: insert
service:
pipelines:
metrics/mongodb/localhost:
receivers:
- mongodb/localhost
processors:
- memory_limiter
- resourcedetection/system
- resource/mongodb_resource_attributes/localhost
- resource/mongodb_resource_attributes/metrics/localhost
- batch
exporters:
- sumologic
logs/mongodb/localhost:
receivers:
- filelog/mongodb/localhost
Expand Down

0 comments on commit 7cbccc6

Please sign in to comment.