mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
83 lines
2.8 KiB
Plaintext
83 lines
2.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// microshift_running_apps/microshift-observability-service.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="microshift-otel-config-medium_{context}"]
|
|
= Selecting a medium configuration
|
|
|
|
You can configure {microshift-short} Observability to collect performance and resource information from various sources by updating the YAML file.
|
|
|
|
.Procedure
|
|
|
|
. Select a medium configuration by adding the following information to the `/etc/microshift/observability/opentelemetry-collector.yaml` file:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
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
|
|
journald:
|
|
units:
|
|
- microshift
|
|
priority: info
|
|
processors:
|
|
batch:
|
|
resourcedetection/system:
|
|
detectors: [ "system" ]
|
|
system:
|
|
hostname_sources: [ "os" ]
|
|
exporters:
|
|
otlp:
|
|
sending_queue:
|
|
storage: file_storage
|
|
endpoint: ${env:OTEL_BACKEND}: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 ]
|
|
logs/kube_events:
|
|
receivers: [ k8s_events ]
|
|
processors: [ resourcedetection/system, batch ]
|
|
exporters: [ otlp ]
|
|
logs/journald:
|
|
receivers: [ journald ]
|
|
processors: [ resourcedetection/system ]
|
|
exporters: [ otlp ]
|
|
telemetry:
|
|
metrics:
|
|
readers:
|
|
- periodic:
|
|
exporter:
|
|
otlp:
|
|
protocol: http/protobuf
|
|
endpoint: http://${env:OTEL_BACKEND}:4318 <2>
|
|
----
|
|
<1> Replace the variable `${env:OTEL_BACKEND}` with the IP address or hostname of the remote back end. This IP address resolves to the local node's hostname. Any unreachable endpoint is reported in the `microshift-observability` service logs.
|
|
<2> Replace the variable `${env:OTEL_BACKEND}` with the IP address or hostname of the remote back end. This IP address resolves to the local node's hostname. Any unreachable endpoint is reported in the `microshift-observability` service logs.
|
|
|
|
. Restart {microshift-short} Observability to complete the configuration selection by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo systemctl restart microshift-observability
|
|
---- |