Bookmark this page

Guided Exercise: Monitoring Systems

Monitor system performance and record the terminal session of a consultant by using the web console.

Outcomes

You should be able to display current and historical performance indicators on a system and play back a terminal session with the web console.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

[student@workstation ~]$ lab start baseline-monitoring

This command confirms that the required hosts for this exercise are accessible and creates the consultant user.

Instructions

In this exercise, you install and configure the web console software on servera. You use web console features to gather current performance statistics of the system. You record the terminal session of a consultant.

  1. Log in to servera and switch to the root user.

    [student@workstation ~]$ ssh student@servera
    ...output omitted...
    [student@servera ~]$ sudo -i
    [sudo] password for student: student
    [root@servera ~]#
  2. Install the web console software packages on servera.

    • cockpit-composer

    • cockpit-machines

    • cockpit-pcp

    • cockpit-podman

    • cockpit-session-recording

    • tlog

    [root@servera ~]# yum install cockpit-composer cockpit-machines cockpit-pcp cockpit-podman cockpit-session-recording tlog
  3. Restart the pmlogger service to configure persistent logging of performance metrics.

    [root@servera ~]# systemctl restart pmlogger
  4. Start and enable the web console.

    [root@servera ~]# systemctl enable --now cockpit.socket
  5. Log out from the root user and from servera.

    [root@servera ~]# exit
    [student@servera ~]$ logout
    Connection to servera closed.
    [student@workstation ~]$
  6. Inspect the system performance status of servera on the web console.

    1. On workstation, open a web browser and navigate to https://servera:9090. Accept the certificate warning. Log in with user name student and password student.

      Figure 2.7: web console login page
    2. Review the alerts that are reported in the overview.

      Figure 2.8: web console overview
    3. Inspect the historical performance of the system. Click the View details and history link in the Usage box.

      Figure 2.9: web console performance metrics
  7. Configure the terminal session recording of the consultant user.

    1. Click Session Recording from the main menu, and then click the gear icon. Navigate to SSSD Config and select ScopeSome, and then define consultant as Users and Groups.

      Figure 2.10: web console session recording
    2. Click Save and click Session Recording at the top of the page.

  8. Log in as the consultant user and perform some tasks on the servera host to be monitored.

    1. Open a terminal and log in to servera as the consultant user.

      [student@workstation ~]$ ssh consultant@servera
      [consultant@servera ~]$
    2. Run various commands as the consultant user.

      [consultant@servera ~]$ ps auxf
      ...output omitted...
      [consultant@servera ~]$ top
      ...output omitted...
      [consultant@servera ~]$ df -h
      ...output omitted...
    3. Return to workstation as student.

      [consultant@servera ~]$ exit
      [student@workstation ~]$
  9. Review the tasks that the consultant user performed in the web console.

    1. In the web console of servera, click Session Recording.

    2. Click the recorded terminal session of the consultant user.

      Figure 2.11: web console session recording
    3. Play back the recorded session. Click Play.

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish baseline-monitoring

Revision: rh342-8.4-6dd89bd