apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-config
data:
collector-config.yaml: |
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'prometheus-federate'
scrape_interval: 60s
metrics_path: /federate
params:
match[]:
- '{job=~".+"}'
static_configs:
- targets: ['PROMETHEUS_TO_SCRAPE_URL:9090']
# Uncomment this to rename the metrics to include the company name so it's easier to identify in Metoro vs the inbuilt metrics
# processors:
# metricstransform:
# transforms:
# - include: '(.*)'
# match_type: regexp
# action: update
# new_name: 'COMPANY_NAME_$1'
# batch: {}
exporters:
otlphttp:
endpoint: "http://metoro-exporter.metoro.svc.cluster.local/api/v1/custom/otel"
tls:
# Disable TLS for in-cluster communication, this is safe because the endpoint is internal to the cluster, when data is sent from the exporter out, it is encrypted
insecure: true
encoding: json
service:
pipelines:
metrics:
receivers: [prometheus]
processors: [metricstransform, batch]
exporters: [otlphttp]