Uploaded image for project: 'Red Hat Directory Server'
  1. Red Hat Directory Server
  2. DIRSRV-13

Monitoring tab should use dsconf monitor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • dirsrv-13.0
    • dirsrv-12.2
    • 389-ds-base
    • None
    • rhel-sst-idm-ds
    • 0
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None

      Description of problem:
      Server Statistics uses a bunch of shell commands to collect statistics:
      https://github.com/389ds/389-ds-base/blob/c69f2691bb9c3933c1ff3f81139011fc7d66b0aa/src/cockpit/389-console/src/lib/monitor/serverMonitor.jsx#L138

      For example, netstat is deprecated in favor of ss, and it's not installed by default. We also don't have net-tools as a runtime requirement.

      dsconf monitor also shows statistics, and it can extended to support the missing metrics. For example, psutil module in Python can be used to display net connections and memory consumption.

      Version-Release number of selected component (if applicable):
      cockpit-389-ds-2.2.6-1.module+el9dsrv+17949+63c5b04e.noarch

      How reproducible:
      always

      Steps to Reproduce:
      1. Run pspy in terminal
      2. In browser click on Monitoring tab

      Actual results:
      A bunch of processes are spawned by cockpit:
      2023/02/20 06:27:21 CMD: UID=0 PID=15250 | /bin/sh -c netstat -anp | grep ':389|:636' | grep ESTABLISHED | grep ns-slapd | wc -l –
      2023/02/20 06:27:29 CMD: UID=0 PID=15292 | /bin/sh -c top -n 1 -b -p 8019 | tail -1 –
      2023/02/20 06:27:33 CMD: UID=0 PID=15309 | /bin/sh -c awk '/MemTotal/

      {print $2}

      ' /proc/meminfo –

      Expected results:
      dsconf monitor should be used instead of shell commands

      Additional info:

              idm-ds-dev-bugs IdM DS Dev
              vashirov@redhat.com Viktor Ashirov
              IdM DS QE IdM DS QE
              Evgenia Martyniuk Evgenia Martyniuk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: