Chapter 3. Using MicroShift Observability
MicroShift Observability collects and transmits system data for monitoring and analysis. The data includes performance and usage metrics, and error reporting.
3.1. Installing and enabling MicroShift Observability Copy linkLink copied to clipboard!
You can install MicroShift Observability at any time, including during the initial MicroShift installation.
Procedure
Install the
microshift-observability
RPM by entering the following command:sudo dnf install microshift-observability
$ sudo dnf install microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the
microshift-observability
system service by entering the following command:sudo systemctl enable microshift-observability
$ sudo systemctl enable microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start the
microshift-observability
system service by entering the following command:sudo systemctl start microshift-observability
$ sudo systemctl start microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart MicroShift after the initial installation.
sudo systemctl restart microshift-observability
$ sudo systemctl restart microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The installation is successful if there is no output after you start the microshift-observability
RPM.
3.2. Configuring MicroShift Observability Copy linkLink copied to clipboard!
You must configure MicroShift Observability after it is installed by specifying a valid endpoint. If an endpoint is not specified, MicroShift Observability does not start.
You can specify any OpenTelemetry Protocol (OTLP)-compatible endpoint for each configuration before starting MicroShift.
Procedure
Update the
/etc/microshift/observability/opentelemetry-collector.yaml
file to specify an OTLP-compatible endpoint with the following information. The endpoint must link to an IP address or host name, and port number of an OTLP service.OTLP-compatible endpoint configuration
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Replace
${env:OTEL_BACKEND}
with the IP address or hostname of the remote back end. This IP address resolves to the local node’s hostname. An unreachable endpoint is reported in the MicroShift service logs. - 2
- Replace
${env:OTEL_BACKEND}
with the IP address or hostname of the remote back end. This IP address resolves to the local node’s hostname. An unreachable endpoint is reported in the MicroShift service logs.
Each time that you update the
opentelemetry-collector.yaml
file, you must restart MicroShift Observability to apply the updates.Restart MicroShift Observability by entering the following command:
sudo systemctl restart microshift-observability
$ sudo systemctl restart microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3. Selecting a MicroShift Observability configuration Copy linkLink copied to clipboard!
The amount and complexity of the data depends on predefined configurations. These configurations determine the number of data sources and the amount of collected data that is transmitted. These configurations are defined as small, medium, and large (default).
The opentelemetry-collector.yaml
file includes specific parameters that are used to collect data for monitoring the system resources. All warnings for cluster events are included in the collected data. MicroShift Observability collects and transmits data for the following resources:
- CPU, memory, disk, and network metrics of containers, pods, and nodes
- Kubernetes events
- Host CPU, memory, disk, and network metrics
- System journals for certain MicroShift services, and dependencies
-
Metrics exposed by pods that have the
prometheus.io/scrape
:true
annotation
Replace the values of the exporters.otlp.endpoint
and services.telemetry.metrics.readers[0].endpoint
fields with the IP address or host name of the remote back end. This IP address resolves to the local node’s host name. Any unreachable endpoint is reported in the MicroShift observability service logs.
3.4. Selecting a small configuration Copy linkLink copied to clipboard!
You can configure MicroShift Observability to collect the smallest amount of performance and resource information from various sources by updating the YAML file.
Procedure
Select a small configuration by adding the following information to the
/etc/microshift/observability/opentelemetry-collector.yaml
file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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 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 service logs.
Restart MicroShift Observability to complete the configuration selection by entering the following command:
sudo systemctl restart microshift-observability
$ sudo systemctl restart microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5. Selecting a medium configuration Copy linkLink copied to clipboard!
You can configure MicroShift 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:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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 themicroshift-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 themicroshift-observability
service logs.
Restart MicroShift Observability to complete the configuration selection by entering the following command:
sudo systemctl restart microshift-observability
$ sudo systemctl restart microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.6. Selecting a large configuration Copy linkLink copied to clipboard!
You can configure MicroShift Observability to collect the maximum amount of performance and resource information, from the maximum number of sources, by updating the YAML file.
Procedure
Select a large configuration by adding the following information to the
/etc/microshift/observability/opentelemetry-collector.yaml
file.Large
is the default configuration.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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 themicroshift-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 themicroshift-observability
service logs.
Restart MicroShift Observability to complete the configuration selection by entering the following command:
sudo systemctl restart microshift-observability
$ sudo systemctl restart microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.7. Verifying the MicroShift Observability state Copy linkLink copied to clipboard!
After MicroShift Observability starts, you can verify the state by using a systemd
service. The MicroShift Observability service logs are available as journald
logs.
Procedure
Check the MicroShift Observability status by entering the following command:
sudo systemctl status microshift-observability
$ sudo systemctl status microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the MicroShift Observability logs by entering the following command:
sudo journalctl -u microshift-observability
$ sudo journalctl -u microshift-observability
Copy to Clipboard Copied! Toggle word wrap Toggle overflow