3 of 3

Troubleshooting Method and MonitoringLesson 3 of 3

Monitoring and troubleshooting with the web console

Enable the web console, open its firewall port, record metrics history and use its logs, services and storage pages.

  • cockpit
  • systemctl enable --now cockpit.socket
  • firewall-cmd --add-service=cockpit
  • cockpit-pcp
  • pmlogger
  • ss -tlnp
  • journalctl -u cockpit

40 min3 exercises

After this lesson you can

  • Install and enable the web console and reach it through the firewall.
  • Turn on metrics history and read CPU, memory, disk and network graphs for a past incident.
  • Use the logs, services, storage and terminal pages to confirm what you found on the command line.

The idea

The web console (Cockpit) is a browser interface for one or more RHEL machines. It is not a separate management system: every page calls the tools you already know (systemctl, journalctl, nmcli, lvm, dnf), so what it shows is what the command line would show. Its value in troubleshooting is speed and history: logs, services, graphs and a terminal in one tab, and, when metrics are recorded, graphs of a problem that already ended.

How it works matters when it does not:

  • cockpit.socket listens on TCP port 9090. systemd holds the socket and starts cockpit.service (the cockpit-ws web server) only when someone connects, so an idle console uses no memory. That is why ss shows systemd as the listener.
  • You log in with a normal system account (the login goes through PAM, see the PAM skill). The account needs sudo rights to use the Administrative access switch; without it the console is read-only.
  • A self-signed certificate is created at first start. A browser warning is expected; a certificate you provide goes in /etc/cockpit/ws-certs.d/ as a .cert file, and the last file alphabetically is used.
  • The page set depends on installed packages: cockpit (core, logs, services, terminal, networking, accounts, updates), cockpit-storaged (disks, LVM, LUKS, NFS), cockpit-pcp (metrics history), cockpit-podman (containers). Install what you need, then reload the browser.

What to use it for

PageTroubleshooting useCommand equivalent
OverviewHealth, CPU/memory graphs, configuration issues such as SELinux alertstop, sestatus, systemctl --failed
Metrics and historyCPU, memory, disk I/O, network over time, including hours agosar, pmrep
LogsFilter by time, priority and unit; click an entry for its fieldsjournalctl -p err -u UNIT --since
ServicesStart, stop, enable units; timers; failed units; unit file and its logssystemctl, systemctl cat
StorageDisk activity graphs, mount state, LVM, LUKS, NFSiostat, lsblk, lvs, cryptsetup
NetworkingInterfaces, traffic graphs, firewall zonesip, nmcli, firewall-cmd
TerminalA shell in the browser, same accountssh

History needs a collector

The live graphs work immediately. History (what happened at 03:10 last night) exists only if Performance Co-Pilot is recording. cockpit-pcp pulls in the packages; pmlogger is the service that writes archives under /var/log/pcp/pmlogger/HOSTNAME/. The first time you open the metrics page it offers to enable it, but on the exam, and in practice, enable it deliberately.

Try it

sudo dnf install -y cockpit
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --permanent --add-service=cockpit
sudo firewall-cmd --reload
sudo ss -tlnp | grep 9090
LISTEN 0      4096               *:9090            *:*    users:(("systemd",pid=1,fd=33))

Browse to https://node1.lab.example:9090, accept the certificate warning and log in as alex.

sudo dnf install -y cockpit-pcp
sudo systemctl enable --now pmlogger
systemctl is-active pmlogger
ls /var/log/pcp/pmlogger/$(hostname)/ | head -3
active
20261104.10.15.0.xz
20261104.10.15.index
20261104.10.15.meta.xz

Open Overview, then View metrics and history. Choose a time range such as 1 hour; the vertical cursor shows the exact CPU, memory, disk and network values at that moment.

Logs and services

The Logs page has the same filters as journalctl: a time range, a priority (Errors and worse equals -p err), a unit and free text. Click an entry to see its fields (_PID, _SYSTEMD_UNIT, SYSLOG_IDENTIFIER), the same data as journalctl -o verbose.

journalctl -p err -b --no-pager | tail -3
systemd-run --unit=demo-fail /bin/false
systemctl status demo-fail --no-pager | sed -n 1,4p
Nov 04 10:20:11 node1 systemd[1]: Failed to start tuned.service - Dynamic System Tuning Daemon.
Running as unit: demo-fail.service
× demo-fail.service - /usr/bin/false
     Loaded: loaded (/run/systemd/transient/demo-fail.service; transient)
     Active: failed (Result: exit-code) since Wed 2026-11-04 10:21:02 +03; 1s ago

The Services page lists demo-fail.service under Failed; its detail page shows the same status text and the unit’s logs.

When the console itself will not open

SymptomCheckFix
Browser: connection refused / timeoutsystemctl status cockpit.socket; ss -tlnp | grep 9090Enable and start the socket
Timeout only from other hostsfirewall-cmd --list-services--permanent --add-service=cockpit, reload
Login rejected with correct passwordjournalctl -u cockpit, /var/log/secureLocked account or PAM policy: see the PAM skill
Pages missing (no Storage, no Metrics)rpm -q cockpit-storaged cockpit-pcpInstall the package, reload the page
“Limited access” bannerThe account has no sudo rightsAdd the user to wheel, log in again
Metrics history emptysystemctl status pmloggerEnable pmlogger; history starts from then, not retroactively
Port 9090 changed or blocked by SELinuxsemanage port -l | grep 9090Port type websm_port_t must include the port in use

Going further

Beyond the exam. The console can manage several machines from one tab (it connects over SSH with your key), and cockpit-podman manages containers. Neither is an exam topic. A common professional pattern is to leave the console enabled only on a management network: allow the cockpit service in a dedicated firewall zone bound to that interface instead of in public.

Practice

0 of 3 done

Do these on your own system. They get harder. Check each result, then tick it off.

  1. Warm-up

    Turn it on and prove it listens

    Install cockpit and enable it so it starts at boot. Open the firewall permanently for it, then show the three facts that prove it is reachable: the socket is listening on port 9090, the firewall allows the service, and the page answers.

    Check your result
    • systemctl is-enabled cockpit.socket prints enabled.
    • sudo ss -tlnp | grep 9090 shows a listener (owned by systemd, because the socket unit holds the port).
    • sudo firewall-cmd --list-services includes cockpit.
    • curl -sk https://localhost:9090/ | head -3 returns HTML.
    Hint

    The web console is socket-activated: you enable cockpit.socket, not cockpit.service. The cockpit firewalld service is already defined; it just needs adding, permanently.

    Solution
    sudo dnf install -y cockpit
    sudo systemctl enable --now cockpit.socket
    sudo firewall-cmd --permanent --add-service=cockpit
    sudo firewall-cmd --reload
    sudo ss -tlnp | grep 9090
    curl -sk https://localhost:9090/ | head -3
  2. Practice

    Record history, then read it

    Install the metrics package for the console, enable the metric collector so the history survives reboots, create some load for a minute (yes > /dev/null &, then kill %1), and find that minute in the console's Overview, View metrics and history page. Write down the CPU percentage you saw.

    Check your result
    • rpm -q cockpit-pcp is installed; systemctl is-enabled pmlogger prints enabled and systemctl is-active pmlogger prints active.
    • ls /var/log/pcp/pmlogger/$(hostname)/ | head shows archive files.
    • Your note names a CPU figure above 40 % for the minute of the load.
    Hint

    History only exists from the moment pmlogger runs, so enable it before you create the load. The page is reached from the Overview page of the console.

    Solution
    sudo dnf install -y cockpit-pcp
    sudo systemctl enable --now pmlogger
    yes > /dev/null & sleep 60; kill %1
    ls /var/log/pcp/pmlogger/$(hostname)/ | head
  3. Challenge

    Confirm a console finding on the command line

    In the console, open Logs, filter to Error priority for the current boot, and pick one entry. Then open Services, find any failed unit (create one with systemd-run --unit=demo-fail /bin/false if none exists). For both, write the equivalent journalctl and systemctl commands that show the same information, and use them to find the exact start time of the failure.

    Check your result
    • Your commands include journalctl -p err -b and systemctl status demo-fail (or the unit you found).
    • You can state the failure time from journalctl -u demo-fail -o short-iso.
    Hint

    Every console page is a front end for the same tools. The Logs page filters map to journalctl -p, -u, --since. The Services page maps to systemctl.

    Solution
    sudo systemd-run --unit=demo-fail /bin/false
    journalctl -p err -b --no-pager | tail -5
    systemctl status demo-fail --no-pager
    journalctl -u demo-fail -o short-iso --no-pager
    sudo systemctl reset-failed demo-fail