Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions packaging/observability/opentelemetry-collector-large.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This configuration exports:
# - Container, Pod, Volume, and Node metrics
# - Kubernetes Events (Warnings only)
# - Host's CPU, Mem, Disk, and Network Metrics
# Following file contains OpenTelemetry Collector configuration that exports:
# - Resource usage metrics of MicroShift's Containers, Pods, Volumes, and Node
# - Kubernetes Events
# - Host's CPU, memory, disk, and network usage metrics
# - System journals for selected MicroShift services and dependencies, priority < Info
# - Individual Pods' metrics if they have "prometheus.io/scrape": "true" annotation
# - Metrics exposed by Pods that have "prometheus.io/scrape": "true" annotation

receivers:
kubeletstats:
Expand Down Expand Up @@ -37,6 +37,7 @@ receivers:
- openvswitch.service
- ovsdb-server.service
- ovs-vswitchd.service
priority: info
prometheus:
config:
scrape_configs:
Expand Down Expand Up @@ -73,10 +74,11 @@ exporters:
otlp:
sending_queue:
storage: file_storage
# Endpoint must point to an ip or hostname and port of an otlp service. Here, the K8S_NODE_NAME is used because it
# will be resolved to the local node's hostname automatically. An unreachable endpoint will reported in the logs
# of the microshift-observability service.
endpoint: ${env:K8S_NODE_NAME}:4317
# Endpoint must point an IP or hostname, and port of an OTLP backend service.
# Here, the OTEL_BACKEND env var is used. It should be changed to point to the backend.
# Unless replaced in config or defined in service file, it'll be empty and OTEL will use 'localhost' instead.
# An unreachable endpoint will be reported in the logs of the microshift-observability service.
endpoint: ${env:OTEL_BACKEND}:4317
tls:
insecure: true

Expand Down Expand Up @@ -117,8 +119,9 @@ service:
- periodic:
exporter:
otlp:
# Endpoint must point to an ip or hostname and port of an otlp service. Here, the K8S_NODE_NAME is used
# because it will be resolved to the local node's hostname automatically. An unreachable endpoint will
# reported in the logs of the microshift-observability service.
# Endpoint must point an IP or hostname, and port of an OTLP backend service.
# Here, the OTEL_BACKEND env var is used. It should be changed to point to the backend.
# Unless replaced in config or defined in service file, it'll be empty and OTEL will use 'localhost' instead.
# An unreachable endpoint will be reported in the logs of the microshift-observability service.
endpoint: http://${env:OTEL_BACKEND}:4318
protocol: http/protobuf
endpoint: http://${env:K8S_NODE_NAME}:4318
27 changes: 15 additions & 12 deletions packaging/observability/opentelemetry-collector-medium.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This configuration exports:
# - Container, Pod, Volume, and Node metrics
# - Kubernetes Events (Warnings only)
# - MicroShift service journald
# Following file contains OpenTelemetry Collector configuration that exports:
# - Resource usage metrics of MicroShift's Containers, Pods, Volumes, and Node
# - Kubernetes Events
# - System journal for MicroShift service, priority < Info

receivers:
kubeletstats:
Expand All @@ -20,6 +20,7 @@ receivers:
journald:
units:
- microshift
priority: info

processors:
batch:
Expand All @@ -32,10 +33,11 @@ exporters:
otlp:
sending_queue:
storage: file_storage
# Endpoint must point to an ip or hostname and port of an otlp service. Here, the K8S_NODE_NAME is used because it
# will be resolved to the local node's hostname automatically. An unreachable endpoint will reported in the logs
# of the microshift-observability service.
endpoint: ${env:K8S_NODE_NAME}:4317
# Endpoint must point an IP or hostname, and port of an OTLP backend service.
# Here, the OTEL_BACKEND env var is used. It should be changed to point to the backend.
# Unless replaced in config or defined in service file, it'll be empty and OTEL will use 'localhost' instead.
# An unreachable endpoint will be reported in the logs of the microshift-observability service.
endpoint: ${env:OTEL_BACKEND}:4317
tls:
insecure: true

Expand Down Expand Up @@ -64,8 +66,9 @@ service:
- periodic:
exporter:
otlp:
# Endpoint must point to an ip or hostname and port of an otlp service. Here, the K8S_NODE_NAME is used
# because it will be resolved to the local node's hostname automatically. An unreachable endpoint will
# reported in the logs of the microshift-observability service.
# Endpoint must point an IP or hostname, and port of an OTLP backend service.
# Here, the OTEL_BACKEND env var is used. It should be changed to point to the backend.
# Unless replaced in config or defined in service file, it'll be empty and OTEL will use 'localhost' instead.
# An unreachable endpoint will be reported in the logs of the microshift-observability service.
endpoint: http://${env:OTEL_BACKEND}:4318
protocol: http/protobuf
endpoint: http://${env:K8S_NODE_NAME}:4318
24 changes: 13 additions & 11 deletions packaging/observability/opentelemetry-collector-small.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration exports:
# - Container, Pod, Volume, and Node metrics
# - Kubernetes Events (Warnings only)
# Following file contains OpenTelemetry Collector configuration that exports:
# - Resource usage metrics of MicroShift's Containers, Pods, Volumes, and Node
# - Kubernetes Events

receivers:
kubeletstats:
Expand Down Expand Up @@ -28,10 +28,11 @@ exporters:
otlp:
sending_queue:
storage: file_storage
# Endpoint must point to an ip or hostname and port of an otlp service. Here, the K8S_NODE_NAME is used because it
# will be resolved to the local node's hostname automatically. An unreachable endpoint will reported in the logs
# of the microshift-observability service.
endpoint: ${env:K8S_NODE_NAME}:4317
# Endpoint must point an IP or hostname, and port of an OTLP backend service.
# Here, the OTEL_BACKEND env var is used. It should be changed to point to the backend.
# Unless replaced in config or defined in service file, it'll be empty and OTEL will use 'localhost' instead.
# An unreachable endpoint will be reported in the logs of the microshift-observability service.
endpoint: ${env:OTEL_BACKEND}:4317
tls:
insecure: true

Expand All @@ -56,8 +57,9 @@ service:
- periodic:
exporter:
otlp:
# Endpoint must point to an ip or hostname and port of an otlp service. Here, the K8S_NODE_NAME is used
# because it will be resolved to the local node's hostname automatically. An unreachable endpoint will
# reported in the logs of the microshift-observability service.
# Endpoint must point an IP or hostname, and port of an OTLP backend service.
# Here, the OTEL_BACKEND env var is used. It should be changed to point to the backend.
# Unless replaced in config or defined in service file, it'll be empty and OTEL will use 'localhost' instead.
# An unreachable endpoint will be reported in the logs of the microshift-observability service.
endpoint: http://${env:OTEL_BACKEND}:4318
protocol: http/protobuf
endpoint: http://${env:K8S_NODE_NAME}:4318
97 changes: 0 additions & 97 deletions packaging/observability/opentelemetry-collector.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions packaging/rpm/microshift.spec
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ install -p -m644 assets/optional/ai-model-serving/release-ai-model-serving-x86_6
# observability
install -d -m755 %{buildroot}/%{_sysconfdir}/microshift/observability
install -p -m644 packaging/observability/*.yaml -D %{buildroot}%{_sysconfdir}/microshift/observability/
# Explicit copy of large config as default. Not using symlink to avoid accidental package upgrade overwriting user config if the user edits the config without copying (i.e. edits the target of symlink).
install -p -m644 packaging/observability/opentelemetry-collector-large.yaml -D %{buildroot}%{_sysconfdir}/microshift/observability/opentelemetry-collector.yaml
install -p -m644 packaging/observability/microshift-observability.service %{buildroot}%{_unitdir}/
install -d -m755 %{buildroot}/%{_prefix}/lib/microshift/manifests.d/003-microshift-observability/
install -p -m644 assets/optional/observability/*.yaml %{buildroot}/%{_prefix}/lib/microshift/manifests.d/003-microshift-observability/
Expand Down Expand Up @@ -777,6 +779,9 @@ fi
* Fri May 16 2025 Evgeny Slutsky <[email protected]> 4.20.0
- Update openvswitch to 3.5

* Wed May 14 2025 Patryk Matuszak <[email protected]> 4.19.0
- Observability: use large OTEL config example as default

* Thu May 08 2025 Patryk Matuszak <[email protected]> 4.19.0
- Include OpenTelemetry configuration examples in the RPM

Expand Down
5 changes: 2 additions & 3 deletions test/suites/optional/observability.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Suite Teardown Teardown Suite And Revert Test Host

*** Variables ***
${JOURNAL_CUR} ${EMPTY}
${DEFAULT_CONFIG_PATH} ../packaging/observability/opentelemetry-collector.yaml
${DEFAULT_CONFIG_PATH} /etc/microshift/observability/opentelemetry-collector-large.yaml
${OTEL_CONFIG_PATH} /etc/microshift/observability/opentelemetry-collector.yaml
${TEST_CONFIG_PATH} assets/observability/otel_config.yaml

Expand Down Expand Up @@ -138,8 +138,7 @@ Teardown Suite And Revert Test Host
Set Back Original OTEL Configuration
[Documentation] Set Back Original OTEL Configuration

${def_config_str} Local Command Should Work cat ${DEFAULT_CONFIG_PATH}
Upload String To File ${def_config_str} ${OTEL_CONFIG_PATH}
${def_config_str} Command Should Work cp ${DEFAULT_CONFIG_PATH} ${OTEL_CONFIG_PATH}
Systemctl restart microshift-observability

Render Otel Test Config
Expand Down