k8s-research-monitoring/docker/opentelemetry/collector/config.yaml

45 lines
1.6 KiB
YAML

receivers:
mysql:
endpoint: "mysql-primary.eigen-erp-test.svc.cluster.local:3306" # Replace with your MySQL host and port
username: "root" # The dedicated MySQL user
password: "eigen3m!" # Use environment variable for password for security
collection_interval: 10s # How frequently to collect metrics (e.g., 10 seconds)
initial_delay: 1s # Initial delay before starting collection
# Optional: Configure statement events for detailed query metrics
statement_events:
digest_text_limit: 120
time_limit: 24h
limit: 250
processors:
# metricstransform:
# transforms:
# - include: mysql.* # Include all MySQL metrics
# match_type: regexp
# action: insert
# operations:
# - action: add_label
# new_label: cluster
# new_value: "internal.eigen.local"
batch:
send_batch_size: 10000
timeout: 10s
exporters:
# otlp:
# endpoint: "172.10.10.6:30641" # Or your OTLP backend endpoint (e.g., a tracing/metrics backend like Jaeger, Prometheus, or a vendor's OTLP endpoint)
# tls:
# insecure: true # Set to false and configure proper TLS for production
prometheusremotewrite:
endpoint: "http://172.10.10.6:30291/api/v1/receive" # Or your Prometheus remote write endpoint
external_labels:
cluster: internal.eigen.local
service:
pipelines:
metrics:
receivers: [mysql]
processors: [batch]
exporters: [prometheusremotewrite]
# If you also want to collect logs or traces from other sources, you'd add
# log and trace pipelines here as well.