Observability
Build controller observability
Abstract
Chapter 1. Logging Copy linkLink copied to clipboard!
As a developer, detailed logs are essential for diagnosing issues when a build fails or behaves unexpectedly. Logs provide information about what happened during the build. If logs do not show the error, you can check the build controller or histogram metrics to troubleshoot the issue.
1.1. Viewing logs Copy linkLink copied to clipboard!
You can view the logs of a build run to identify any runtime errors and to resolve them.
Prerequisites
-
You have installed the
ocCLI. -
Optional: You have installed the
shpCLI.
Procedure
View logs of a build run. You can do so by using the
ocCLI or theshpCLI.oc logs <buildrun_resource_name>
$ oc logs <buildrun_resource_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow shp buildrun logs <buildrun_resource_name>
$ shp buildrun logs <buildrun_resource_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 2. Monitoring Copy linkLink copied to clipboard!
Builds exposes several metrics for cluster administrators to monitor the performance and functioning of your build resources. The build controller metrics are exposed on port 8383.
2.1. Builds controller metrics Copy linkLink copied to clipboard!
Builds controller metrics expose the internal state and activity of the builds controller in OpenShift Container Platform.
Red Hat does not provide support for the builds controller metrics.
You can check the following builds controller metrics for monitoring purposes:
| Name | Type | Description | Labels | Status |
|---|---|---|---|---|
|
| Counter | The number of total registered builds. |
| experimental |
|
| Counter | The number of total completed build runs. |
| experimental |
|
| Histogram | The build run establish duration in seconds. |
| experimental |
|
| Histogram | The build run completion duration in seconds. |
| experimental |
|
| Histogram | The build run ramp-up duration in seconds. |
| experimental |
|
| Histogram | The build run ramp-up duration for a task run in seconds. |
| experimental |
|
| Histogram | The build run ramp-up duration for a task run pod in seconds. |
| experimental |
2.1.1. Histogram metrics Copy linkLink copied to clipboard!
To use custom buckets for the build controller, you must set the environment variable for a particular histogram metric. The following table shows the environment variables for all histogram metrics:
| Metric | Environment variable | Default |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Legal Notice
Copy linkLink copied to clipboard!
Copyright © Red Hat
OpenShift documentation is licensed under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0).
Modified versions must remove all Red Hat trademarks.
Portions adapted from https://github.com/kubernetes-incubator/service-catalog/ with modifications by Red Hat.
Red Hat, Red Hat Enterprise Linux, the Red Hat logo, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of the OpenJS Foundation.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation’s permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.