Este conteúdo não está disponível no idioma selecionado.
Chapter 4. Using MicroShift Observability
MicroShift Observability collects and transmits system data for monitoring and analysis. The data includes performance and usage metrics, and error reporting.
4.1. Installing and enabling MicroShift Observability
You can install MicroShift Observability at any time, including during the initial MicroShift installation. Observability collects and transmits system data for monitoring and analysis, such as performance and usage metrics and error reporting.
Procedure
- Install the - microshift-observabilityRPM 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-observabilitysystem 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-observabilitysystem 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.
			
4.2. Configuring MicroShift Observability
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.yamlfile 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.yamlfile, 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 
4.3. Selecting a MicroShift Observability configuration
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 node 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:trueannotation
				Replace the values of the exporters.otlp.endpoint and services.telemetry.metrics.readers[0].endpoint fields with the IP address or hostname 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.
			
4.4. Selecting a small configuration
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.yamlfile:- 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 
4.5. Selecting a medium configuration
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.yamlfile:- 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-observabilityservice 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-observabilityservice 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 
4.6. Selecting a large configuration
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.yamlfile.- Largeis 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-observabilityservice 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-observabilityservice 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 
4.7. Verifying the MicroShift Observability state
				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