Page
View performance information using the OpenShift web console
In this lesson, you will learn how to access and understand the available performance information within the Developer Sandbox.
What you need to know
In order to get full benefit from this lesson you need to:
- Understand how Kubernetes is the foundational technology for OpenShift and the Developer Sandbox.
- Understand what a Kubernetes pod is at the architectural and operational levels.
- Know how to access the Developer Sandbox via a browser.
- Know how to use the web console to add applications and components to OpenShift from source code stored in a GitHub repository.
- Know how to use the Topology view within the web console to inspect applications and components running in the Developer Sandbox.
What you will learn
In this lesson you will:
- Install a custom application from source code that exerts pressure on different resources within the Developer Sandbox for Red Hat OpenShift.
- Access a variety of metrics and graphs that describe performance information within the Developer Sandbox for Red Hat OpenShift that's relevant to your application.
Being able to quantitatively observe an application running in OpenShift's performance behavior is important for both system administrations and developers. An application that hogs resources can significantly affect the end-user experience.
Fortunately, the OpenShift web console publishes a good deal of performance statistics that are available right out of the box. All you need to do to access the information is to know where to look within the user interface (UI). The objective of this lesson is to show you how to get to that information within the UI.
First, you will use the web console to install a demonstration application that hogs OpenShift resources. Then you will learn how to view information about the application’s performance using basic OpenShift reporting features.
Access the OpenShift web console
The following steps will show you how to access the OpenShift web console in the Developer Sandbox. You will do the work of installing and configuring the MongoDB and Node.js instances using the web console:
In your web browser, navigate here and select Start your sandbox for free (Figure 1).
Provide the username and password for your Red Hat account (Figure 2).
Figure 2: Log into the OpenShift web console with the username and password associate with your account on Red Hat.
Install the demonstration application
The following steps will show you how to install the Node.js demonstration application into the Developer Sandbox. You will install the application using the Import from Git option:
- Select +Add on the left side of the web console (Figure 3, Callout 1).
The Developer Catalog page will appear. Select Import from Git (Figure 3, Callout 2).
Figure 3: Install an application in OpenShift using source code stored in a GitHub repository. - The Import from Git page will appear. Add
https://github.com/redhat-developer-demos/resource_pressurizer.git
to the Git Repo URL text box (Figure 4, Callout 1). - Add
resource_pressurizer
to the Application name text box (Figure 4, Callout 2). - Add
resource_pressurizer
to the Name text box (Figure 4, Callout 3). - Select Deployment as the Resource type (Figure 4, Callout 4).
Select Create to begin the deployment.
Figure 4: Supply the parameters to build the application.
Observe the application build process
The Topology page will appear. The page will display a circular graphic that represents the demonstration application. The graphic will display a light blue circle when it first appears. This display indicates that the application is building. The circle will turn dark blue once the application has finished its build (Figure 5).
Access performance metrics
Now that the application is up and running, you can access its performance metrics from the web console:
- Click the center of the circular graphic of the demonstration application (Figure 6, Callout 1).
- The Details page for the
resource-pressurizer
demonstration application will appear. Select the Resources tab to view information about your Kubernetes/OpenShift resources (Figure 6, Callout 2). Select the Observe tab to view metrics information that describes performance behavior (Figure 6, Callout 3).
You will also see a CPU usage graph (Figure 6, Callout 4).
Figure 6: The basic metrics graphs in OpenShift that describe performance behavior. Scroll down the Metrics page to view the graphs published by OpenShift (Figure 7).
Figure 7: Metrics such as CPU Usage, Memory Usage and Bandwidth metrics are available within the web console. OpenShift also provides metrics that describe an application’s performance when running in the sandbox (Figure 8).
Figure 8: The resource quota information available in the web console.
View a metric's details
In addition to providing a set of graphs that display performance metrics in a general manner, each graph allows you to see metrics in terms of specific timespans. The following steps will show you how to access the detail view of the CPU usage graph. To view the available details:
- Navigate to the Observe page by clicking the center of the
resource-pressurizer
application graphic. - Select Inspect on the right side of the CPU metrics graph (Figure 6, Callout 1). A detailed view of the graph will appear.
Select time span from the drop-down at the upper left of the detail graph, then select 5m as a time span value (Figure 6, Callout 2).
Figure 9: The graph can be configured to display data according to specific time spans. When you select a time span, the metrics page will reset to display metric data according to the time span that you selected (Figure 10).
Figure 10: The metric data displayed when you select a five-minute time span.
Note: Inspecting metric data according to time span is a technique you can apply to a number of graphs available by default in the OpenShift web console.
Summary
In this lesson, you learned how to use the web console to access the graphs and tables that display the performance metrics for a custom application you installed using the web console’s Install from Git feature. You also learned how to access the Details page of the application by clicking the circular graphic that represents the application in Topology view.
Once in the Details page, you then learned how to see the graphs and tables associated with the performance metrics available in the web console.
Finally, you learned how to view information in a metrics graph within a particular time span.
Next
This is the last of the lessons in the Foundation of OpenShift series. But there’s still more to learn. Try out our other Developer Sandbox activities, and our other learning paths to build more OpenShift skills!
You can also use OpenShift in the public cloud. To learn how to use Red Hat OpenShift Service on AWS, visit our Red Hat OpenShift Service on AWS (ROSA) learning hub.