Chapter 2. Installing and configuring the resource-optimization components
Installing resource optimization involves installing packages, configuring settings and enabling local services. This can be done manually, or with an Ansible playbook provided by Red Hat.
Pay as you go (PAYG) customers need to register the Insights client with subscription-manager (RHSM). There are two ways to register with subscription-manager:
- Using activation keys (recommended)
- Using your user name and password
For more information about how to register the Insights client, refer to Client Configuration Guide for Red Hat Insights with FedRAMP.
RHEL Versions | Cloud Provider | Resource Optimization Compatibility |
---|---|---|
8.x-9.x | AWS | Yes (x86_64 and ARM 64-bit) |
7.7-7.9 | AWS | Yes (x86_64 and ARM 64-bit) |
7.0-7.6 | AWS | No |
6.x | AWS | No |
Prerequisites
The following applications and configurations need to be installed or confirmed before the resource optimization service can be used:
- Cloud marketplace RHEL instance is configured.
- The Insights client is installed on the system and is operational.
2.1. Installing and configuring enhanced data collection for resource optimization
The Red Hat Enterprise Linux Performance Co-Pilot (PCP) utility selects and gathers resource optimization (ROS) client-side usage metrics for Insights for Red Hat Enterprise Linux.
The Insights client detects the presence of the ROS PCP configuration file (/var/lib/pcp/config/pmlogger/config.ros
). When it finds the file, it launches pmlogger
to collect performance metrics data. PCP compiles these metrics into daily summaries. The RHEL pmlogger
service then uploads the summaries to Insights for analysis.
Using config.ros
results in one data point per upload with a subset of available metrics. This leads to limited information available to Insights recommendations. To enhance the data available to Insights and to improve recommendations, install the RHEL pcp-zeroconf
package for your version of RHEL.
The pcp-zeroconf
package automates PCP installation. Once you install pcp-zeroconf
, it automatically starts pmlogger
. pmlogger
gathers raw data on the default set of usage metrics and records the raw data into archive files.
2.1.1. Installing insights-client-ros
and pcp-zeroconf
on systems running RHEL 9 and later
The insights-client-ros
package includes a dependency for pcp-zeroconf
. When you install insights-client-ros
on your system, the process also automatically installs pcp-zeroconf
. You need to install the insights-client-ros
package on each system in your environment.
Once pcp-zeroconf
is installed, its default configuration overrides the legacy settings in config.ros
. The Insights client then uses the ROS data that pcp-zeroconf
collects.
Once you install insights-client-ros, pcp-zeroconf automatically starts pmlogger
. pmlogger
gathers raw data on the default set of usage metrics, and records the raw data into archive files.
Prerequisites
-
You are logged in to the system as root, or have elevated permissions using
sudo
. -
Your system is registered using
subscription-manager
and has access to therhel-<RHEL-Version>-for-<arch>-appstream-rpms
repository.<RHEL-Version>
is the version of RHEL installed on the system, and<arch>
is the system architecture, such as x86_64.
Procedure
Use
dnf
to install theinsights-client-ros
package.# dnf install insights-client-ros -y
Verify that
pmlogger
is running.# pcp | grep pmlogger
pmlogger: primary logger: /var/log/pcp/pmlogger/<hostname>/<date.hours.minutes>
-
Open the
/etc/insights-client/insights-client.conf
file with an editor. Look for the
ros_collect
setting in the file. Edit the file to setros_collect
totrue
.Note: If
ros_collect
is set tofalse
,pcp-zeroconf
does not collect and report ROS data.- Save the file and exit the editor.
2.1.2. Removing the ros
directory on systems running RHEL 9 and later
insights-core
collects today-1
(the previous day’s) data from the system. Before removing the legacy ros
directory, you should ensure that after installing pcp-zeroconf, you use the UI or API to check ROS to verify that it displays the details based on the latest uploads for your system.
Prerequisites
-
You are logged in to the system as root, or have elevated permissions using
sudo
.
Procedure
Remove the
ros
directory.# rm -f /var/log/pcp/pmlogger/ros
2.1.3. Installing pcp-zeroconf
on systems running RHEL 7 or RHEL 8
In RHEL versions 7 and 8, you must explicitly install pcp-zeroconf
on each system in your environment. Once you install pcp-zeroconf
, its default configuration overrides the legacy settings in config.ros
. The Insights client then uses the ROS data that pcp-zeroconf
collects.
Prerequisites
-
You are logged in to the system as root, or have elevated permissions using
sudo
. -
Your system is registered using
subscription-manager
and has access torhel-<RHEL-Version>-for-<arch>-appstream-rpms
repository.<RHEL-Version>
is the version of RHEL installed on the system and<arch>
is the system architecture, such as x86_64.
Procedure
Use
dnf
to install thepcp-zeroconf
package.# dnf install pcp-zeroconf -y
-
Open the
/etc/insights-client/insights-client.conf
file with an editor. Look for the
ros_collect
setting in the file. Edit the file to setros_collect
totrue
. If theros_collect
setting does not exist, then add a new setting with its value set totrue
.Note: If
ros_collect
is set tofalse
,pcp-zeroconf
does not collect and report ROS data.- Save the file and exit the editor.
2.1.4. Removing the ros
directory and config.ros
on systems running RHEL 7 or RHEL 8
insights-core
collects today-1
(the previous day’s) data from the system. Before removing the legacy ros
directory, ensure that after installing pcp-zeroconf
, you use the UI or API to check ROS to verify that it displays the details based on the latest uploads for your system.
Prerequisites
-
You are logged in to the system as root, or have elevated permissions using
sudo
.
Procedure
Remove the
config.ros
file.# rm /var/lib/pcp/config/pmlogger/config.ros
Remove the
ros
directory.# rm -f /var/log/pcp/pmlogger/ros
Additional resources
-
Installing and using the
pcp-zeroconf
package for Performance Co-Pilot (PCP) -
Setting up PCP with
pcp-zeroconf
For more information about PCP and
pcp-zeroconf
, refer to the performance guide for your version of RHEL.-
For more information about
pmlogger
, see thepmlogger
man
page on your system.
2.1.5. Troubleshooting
If pcp-zeroconf
is not installed or the pmlogger
service is not running, the log file /var/log/insights-client/insights-client.log
might contain warnings for the related upload(s).
2.2. Enabling Kernel Pressure Stall Information (PSI)
PSI provides a canonical way to see resource pressure increases as they develop. There are pressure metrics for three major resources: memory, CPU, and input/output (I/O). PSI is available on RHEL 8 and newer versions, and is disabled by default.
When PSI is enabled, the resource optimization service can augment its findings and provide more details and better suggestions. Enabling PSI is strongly recommended to identify peaks.
Procedure
-
Edit the
/etc/default/grub
file and appendpsi=1
at the end of the GRUB_CMDLINE_LINUX line (mind the quotes). Regenerate the grub configuration file.
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
- Reboot the system.
Enabling PSI incurs a slight (<1%) performance hit.
Verification step
When PSI is enabled, files for CPU, memory and IO appear under /proc/pressure
.
2.3. Enabling notifications and integrations in the resource optimization service
You can enable the notifications service on Red Hat Hybrid Cloud Console to send notifications whenever the resource optimization service detects an issue and generates a suggestion. Using the notifications service frees you from having to continually check the Red Hat Insights for Red Hat Enterprise Linux dashboard for recommendations.
For example, you can configure the notifications service to automatically send an email message whenever the resource optimization service generates a suggestion.
Enabling the notifications service requires three main steps:
- First, an Organization Administrator creates a User access group with the Notifications administrator role, and then adds account members to the group.
- Next, a Notifications administrator sets up behavior groups for events in the notifications service. Behavior groups specify the delivery method for each notification. For example, a behavior group can specify whether email notifications are sent to all users, or just to Organization administrators.
- Finally, users who receive email notifications from events must set their user preferences so that they receive individual emails for each event.
In addition to sending email messages, you can configure the notifications service to pull event data in other ways:
- Using an authenticated client to query Red Hat Insights APIs for event data.
- Using webhooks to send events to third-party applications that accept inbound requests.
- Integrating notifications with applications such as Splunk to route resource optimization recommendations to the application dashboard.
Additional resources
- For more information about how to set up notifications for resource optimization recommendations, see Configuring notifications on the Red Hat Hybrid Cloud Console with FedRAMP and Integrating the Red Hat Hybrid Cloud Console with third-party applications.