Original: ----
receivers:
  kubeletstats:
    auth_type: tls
    ca_file: /var/lib/microshift/certs/ca-bundle/client-ca.crt
    key_file: /var/lib/microshift/certs/admin-kubeconfig-signer/openshift-observability-client/client.key
    cert_file: /var/lib/microshift/certs/admin-kubeconfig-signer/openshift-observability-client/client.crt
    insecure_skip_verify: true
    collection_interval: 20s
    endpoint: "${env:K8S_NODE_NAME}:10250" <1>
    node: ${env:K8S_NODE_NAME}
    k8s_api_config:
      auth_type: kubeConfig
  k8s_events:
    auth_type: kubeConfig
  hostmetrics:
    root_path: /
    collection_interval: 10s
    scrapers:
      cpu:
      memory:
      network:
      disk:
      filesystem:
  journald:
    units:
      - microshift
      - microshift-observability
      - microshift-etcd
      - crio
      - openvswitch.service
      - ovsdb-server.service
      - ovs-vswitchd.service
processors:
  batch:
  resourcedetection/system:
    detectors: [ "system" ]
    system:
      hostname_sources: [ "os" ]

exporters:
  otlp:
    sending_queue:
      storage: file_storage
    endpoint: ${env:K8S_NODE_NAME}:4317
    tls:
      insecure: true

extensions:
  file_storage:
    directory: /var/lib/microshift-observability

service:
  extensions: [ file_storage ]
  pipelines:
    metrics/kubeletstats:
      receivers: [ kubeletstats ]
      processors: [ batch ]
      exporters: [ otlp ]
    metrics/hostmetrics:
      receivers: [ hostmetrics ]
      processors: [ resourcedetection/system, batch ]
      exporters: [ otlp ]
    logs/kube_events:
      receivers: [ k8s_events ]
      processors: [ resourcedetection/system, batch ]
      exporters: [ otlp ]
    logs/host:
      receivers: [ hostmetrics ]
      processors: [ resourcedetection/system ]
      exporters: [ otlp ]
    logs/journald:
      receivers: [ journald ]
      processors: [ resourcedetection/system ]
      exporters: [ otlp ]
  telemetry:
    metrics:
      readers:
        - periodic:
            exporter:
              otlp:

----
Revised: receivers:
kubeletstats:
auth_type: tls
ca_file: /var/lib/microshift/certs/ca-bundle/client-ca.crt
key_file: /var/lib/microshift/certs/admin-kubeconfig-signer/openshift-observability-client/client.key
cert_file: /var/lib/microshift/certs/admin-kubeconfig-signer/openshift-observability-client/client.crt
insecure_skip_verify: true
collection_interval: 10s
endpoint: "${env:K8S_NODE_NAME}:10250"
node: ${env:K8S_NODE_NAME}
k8s_api_config:
auth_type: kubeConfig
k8s_events:
auth_type: kubeConfig
hostmetrics:
root_path: /
collection_interval: 10s
scrapers:
cpu:
memory:
network:
disk:
filesystem:
journald:
units:
priority: info
prometheus:
config:
scrape_configs:
scrape_interval: 10s
kubernetes_sd_configs:
role: pod
relabel_configs:
# Only scrape Pods with annotation "prometheus.io/scrape": "true"
action: keep
regex: true
# Use value of "prometheus.io/path" annotation for scraping
action: replace
target_label: __metrics_path__
regex: (.+)
# Use value of "prometheus.io/port" annotation for scraping
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
target_label: __address__

processors:
batch:
resourcedetection/system:
detectors: [ "system" ]
system:
hostname_sources: [ "os" ]

exporters:
otlp:
sending_queue:
storage: file_storage
endpoint: ${env:K8S_NODE_NAME}:4317 <1>
tls:
insecure: true

extensions:
file_storage:
directory: /var/lib/microshift-observability

service:
extensions: [ file_storage ]
pipelines:
metrics/kubeletstats:
receivers: [ kubeletstats ]
processors: [ batch ]
exporters: [ otlp ]
metrics/hostmetrics:
receivers: [ hostmetrics ]
processors: [ resourcedetection/system, batch ]
exporters: [ otlp ]
logs/kube_events:
receivers: [ k8s_events ]
processors: [ resourcedetection/system, batch ]
exporters: [ otlp ]
logs/host:
receivers: [ hostmetrics ]
processors: [ resourcedetection/system ]
exporters: [ otlp ]
logs/journald:
receivers: [ journald ]
processors: [ resourcedetection/system ]
exporters: [ otlp ]
metrics/pods:
receivers: [ prometheus ]
processors: [ batch ]
exporters: [ otlp ]
telemetry:
metrics:
readers:
exporter:
otlp:
protocol: http/protobuf
endpoint: http://${env:K8S_NODE_NAME}:4318 <2>