Clean Linux OS

RedHat Linux / Rocky Linux (x86)

Overview of XorMon requirements:
  • Node.js 20
  • PostgreSQL 16
  • Timescale DB 2.17 Community Edition
Prerequisites
  • HW sizing
  • supported Linux OS
  • access to internet repositories
  • 5 GB of free space in the "/home" filesystem for the application
  • enough free space in the "/var" filesystem for the data (see Sizing)
After installing the host system, install XorMon by following the instructions on the XorMon app install tab.

Host OS installation procedure
  • Disable SELinux (as root)
    • Edit /etc/selinux/config
    • Set SELINUX=disabled
    • reboot
    In case you do not want to disable SELinux then follow this manual to configure SELinux in enforcing mode

  • Create xormon user (as root)
    adduser xormon
    passwd xormon
  • Increase user system limits (as root)
    vi /etc/security/limits.conf
    Append following lines before the end of the file
    xormon          hard    stack           -1
    xormon          soft    stack           -1
    xormon          hard    data            -1
    xormon          soft    data            -1
    xormon          hard    nofile          32768
    xormon          soft    nofile          32768
    xormon          hard    nproc           64000
    xormon          soft    nproc           64000
  • Enable PowerTools (Rocky Linux) or CodeReady Builder (RHEL) repository (as root)
    # RHEL 8:
    subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
    
    # RHEL 9:
    subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
    
    # Rocky Linux 8.x
    dnf config-manager --set-enabled powertools
    
    # Rocky Linux 9.x
    dnf config-manager --enable crb

  • Install additional packages (as root)
    dnf install -y perl ed libxml2 epel-release wget curl gnupg net-tools sblim-wbemcli libaio wget curl strace 
    dnf install -y perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-Env perl-CGI perl-Data-Dumper
    dnf install -y perl-LWP-Protocol-https perl-libwww-perl perl-Time-HiRes perl-IO-Tty openldap-clients perl-Time-Piece 
    dnf install -y perl-JSON perl-JSON-PP perl-JSON-XS net-snmp-perl net-snmp-utils perl-DBI perl-DBD-ODBC unixODBC unixODBC-devel freetds
    dnf install -y perl-Net-INET6Glue # it might not exist everywhere like RedHat 9.x, then ignore it
    dnf install -y perl-DBD-Pg  # for oVirt/RHV/OLVM support only
    dnf install -y perl-FindBin # it does not exist on RedHat 8.x
    Python: required only for prediction graphs
    You can run XorMon without it if you have trouble downloading necessary Python modules
    dnf install -y python3-virtualenv python3-pip libpq-devel python3-devel gcc-c++ gcc

  • Install Java 11
    Required only by Hitachi Export Tool for Hitachi VSP monitoring.
    Skip if you don't need to monitor Hitachi VSP storage systems.
    dnf install -y java-11-openjdk-headless
  • Install Node.js (as root)

  • Install Timescale DB (as root)
    XorMon requires TimescaleDB Community Edition 2.13 or newer.
    Do not install Timescale DB distributed under the Apache license because it lacks some key features required by XorMon.

    • Disable built-in PostgreSQL module
      dnf -qy module disable postgresql
    • Add PostgreSQL repository
      # EL8
      dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
      # EL9
      dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
    • Add TimescaleDB repository
      Copy and paste the following text as a single command to the commandline
      tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
      [timescale_timescaledb]
      name=timescale_timescaledb
      baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
      repo_gpgcheck=1
      gpgcheck=0
      enabled=1
      gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
      sslverify=1
      sslcacert=/etc/pki/tls/certs/ca-bundle.crt
      metadata_expire=300
      EOL
    • Install TSDB and PostgeSQL packages
      dnf install -y timescaledb-2-postgresql-16 postgresql16-contrib
    • Optional: Change database location if necessary
      Default database location is '/var/lib/pgsql/16/data/'
      Note: database requires at least 100GB (500GB in large environment)

      • Create new folder for the database
        mkdir /opt/pgsql
        chown postgres:postgres /opt/pgsql/
        chmod 750 /opt/pgsql/
      • Edit postgres-16 systemd service and put below under [Service] section
        vi /usr/lib/systemd/system/postgresql-16.service
        Environment=PGDATA=/opt/pgsql
      • Reload services
        systemctl daemon-reload
      • Edit 'postgres' user bash profile
        vi /var/lib/pgsql/.bash_profile
        PGDATA=/opt/pgsql
    • Initialize DB
      /usr/pgsql-16/bin/postgresql-16-setup initdb
    • Tune DB
      Make sure you are using the correct configuration file if your database is not in the default location

      Default location
      timescaledb-tune -yes --pg-config=/usr/pgsql-16/bin/pg_config
      sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /var/lib/pgsql/16/data/postgresql.conf
      sed -i 's/#password_encryption/password_encryption/' /var/lib/pgsql/16/data/postgresql.conf
      sed -ie 's/32\s ident/32 scram-sha-256/' /var/lib/pgsql/16/data/pg_hba.conf
      Alternative location
      Use only if you have changed the default PostgreSQL DB location during installation.
      timescaledb-tune -yes --pg-config=/usr/pgsql-16/bin/pg_config -conf-path=/opt/pgsql/postgresql.conf
      sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /opt/pgsql/postgresql.conf
      sed -i 's/#password_encryption/password_encryption/' /opt/pgsql/postgresql.conf
      sed -ie 's/32\s ident/32 scram-sha-256/' /opt/pgsql/pg_hba.conf
    • Enable automatic start
      systemctl enable --now postgresql-16
    • Set password for user postgres
      sudo -u postgres psql
      
      postgres=# \password postgres
      postgres=# ALTER USER postgres VALID UNTIL 'infinity';
      postgres=# \q
      Make note of the password. It will be needed later during XorMon installation.

  • Configure firewall (optional, as root)
    Open XorMon port in the firewall 8443 TCP (XorMon UI) and 8162 TCP (OS agent communication).
    firewall-cmd --zone=public --add-port=8443/tcp --permanent
    firewall-cmd --zone=public --add-port=8162/tcp --permanent
    firewall-cmd --reload
    firewall-cmd --list-port

  • Follow XorMon application install

RedHat Linux / Rocky Linux (ppc: PowerPC Little Endian)

As soon as you prepare the hosting platform, follow tab XorMon app install to get installed XorMon app.
HW sizing

  • Disable SELinux (as root)
    • Edit /etc/selinux/config
    • Set SELINUX=disabled
    • reboot
    In case you do not want to disable SELinux then follow this manual to configure SELinux in enforcing mode

  • Create xormon user (as root)
    adduser xormon
    passwd xormon
    
    Increase user system limits
    Append following lines to /etc/security/limits.conf
    xormon          hard    stack           -1
    xormon          soft    stack           -1
    xormon          hard    data            -1
    xormon          soft    data            -1
    xormon          hard    nofile          32768
    xormon          soft    nofile          32768
    xormon          hard    nproc           64000
    xormon          soft    nproc           64000
    
  • Enable PowerTools / CodeReady Builder repository (as root)
    # RHEL 9:
    subscription-manager repos --enable codeready-builder-for-rhel-9-ppc64le-rpms
    
    # Rocky / Alma / Centos Linux 9.x
    dnf config-manager --enable crb
    

  • Install additional packages (as root)
    dnf install -y perl ed libxml2 epel-release wget curl gnupg net-tools sblim-wbemcli libaio wget curl strace 
    dnf install -y perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-Env perl-CGI perl-Data-Dumper
    dnf install -y perl-LWP-Protocol-https perl-libwww-perl perl-Time-HiRes perl-IO-Tty openldap-clients perl-Time-Piece 
    dnf install -y perl-JSON perl-JSON-PP perl-JSON-XS net-snmp-perl net-snmp-utils perl-DBI perl-DBD-ODBC unixODBC unixODBC-devel freetds
    dnf install -y perl-DBD-Pg  # for oVirt/RHV/OLVM support only
    dnf install -y perl-FindBin # it does not exist on RedHat 8.x
    Python: required only for prediction graphs
    You can run XorMon without it if you have trouble downloading necessary Python modules
    dnf install -y python3-virtualenv python3-pip libpq-devel python3-devel 
  • Install Java 11 (necessary for Hitachi VSP monitoring, required by Hitachi Export Tool)
    dnf install -y java-11-openjdk-headless
  • Install Node.js (as root)
    XorMon should work with Node.js 16+.
    We recommend Node.js 20.x or newer.
    • Repository installation
      dnf module enable nodejs:20
      dnf install nodejs
      npm update -g npm
      node -v
    • Manual download install: There are no RPMs available for ppc64le, get Power LE binaries from here: nodejs.org/en/download/prebuilt-binaries, i.e. LTS 20.12.0:
      cd /tmp
      wget https://nodejs.org/dist/v20.12.0/node-v20.12.0-linux-ppc64le.tar.xz
      # extract package to /usr/local
      cd /usr/local
      tar xf /tmp/node-v20.12.0-linux-ppc64le.tar.xz --strip-components=1
      # check node version
      node --version
      # remove source file
      rm /tmp/node-v20.12.0-linux-ppc64le.tar.xz 

    Allow node binary to use privilleged (< 1024) ports, so we can run XorMon on a standard HTTPS port (443)
    setcap 'cap_net_bind_service=+ep' /usr/bin/node
  • Install Timescale DB (as root)
    XorMon requires TimescaleDB 2.13 and newer (community edition).
    • Follow these installation instructions: TimescaleDB/PostgreSQL installation docu

    • PostgreSQL vrs TimescaleDB support matrix

    • Optionaly you might change database location from default /var/lib/pgsql/data
      Note that database must be on a filesystem having 100GB free at least (in big environments rather 500GB)
      postgresql-setup --help
      
    • Initialize DB
      postgresql-setup initdb
    • Change PostgreSQL Client Authentication Configuration
      # replace all ident methods with scram-sha-256 to anable login via TCP
      sed -i 's/ident$/scram-sha-256/g' /var/lib/pgsql/data/pg_hba.conf
      
    • Timescale DB
      As there are no RPMs for PowerPC architecture, we must compile from sources
      # essentials for building
      dnf install cmake gcc postgresql-server-devel
      
      If above fails with
      Problem: problem with installed package libpq-devel-13.11-1.el9.ppc64le
        - package postgresql-private-devel-15.6-1.module+el9.3.0+16128+52b853ae.ppc64le from appstream conflicts with libpq-devel provided by libpq-devel-13.11-1.el9.ppc64le from @System
        ...  
      Then remove libpq-devel and try installation again
      dnf remove libpq-devel 

      Get the latest release (tar.gz source codes) from github.com/timescale/timescaledb/releases and extract to /tmp/timescaledb-2.xx.x
      cd /tmp
      wget https://github.com/timescale/timescaledb/archive/refs/tags/2.14.2.tar.gz -O - | tar xz
      # bootstrap the build system
      cd timescaledb-2.14.2/
      ./bootstrap
      # to build the extension
      cd build && make
      # to install
      make install
      
      We need timescaledb-tune to configure PGSQL, install with Go lang if you are online
      dnf install golang
      go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@latest
      # tune PGSQL for TSDB
      /root/go/bin/timescaledb-tune -yes -pg-config /usr/bin/pg_config -conf-path /var/lib/pgsql/data/
      sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /etc/postgresql-setup/upgrade/postgresql.conf
      
      or get ready to use RPM to install timescaledb-tune:
      dnf install timescaledb-tune.el9.ppc64le.rpm
      # tune PGSQL for TSDB
      timescaledb-tune -yes -pg-config /usr/bin/pg_config -conf-path /var/lib/pgsql/data/
      sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /etc/postgresql/16/main/postgresql.conf
      
    • Enable and run PostgreSQL service
      systemctl enable --now postgresql
      
    • Set password for user postgres
      sudo -u postgres psql
      
      postgres=# \password postgres
      postgres=# ALTER USER postgres VALID UNTIL 'infinity';
      postgres=# \q
      
      Make note of the password. It will be needed later during XorMon installation.

  • Configure firewall (optional, as root)
    Open XorMon ports in the firewall: HTTPS (443) (XorMon UI) and 8162 TCP (OS agent communication)
    # OS agents connect to the port 8162
    firewall-cmd --zone=public --add-port=8162/tcp --permanent
    # UI runs on port 443
    firewall-cmd --zone=public --add-service=https --permanent
    # apply rules
    firewall-cmd --reload
    firewall-cmd --list-port
    

  • Follow XorMon application install

openSUSE Leap 15.6

Overview of XorMon requirements:
  • Node.js 20
  • PostgreSQL 16
  • Timescale DB 2.17 Community Edition
Prerequisites
  • HW sizing
  • supported Linux OS
  • access to internet repositories
  • 5 GB of free space in the "/home" filesystem for the application
  • enough free space in the "/var" filesystem for the data (see Sizing)
After installing the host system, install XorMon by following the instructions on the XorMon app install tab.

Host OS installation procedure
  • Create xormon user (as root)
    groupadd xormon
    useradd -m -g xormon xormon
    passwd xormon
    Increase user system limits, append this into /etc/security/limits.conf file
    xormon          hard    stack           -1
    xormon          soft    stack           -1
    xormon          hard    data            -1
    xormon          soft    data            -1
    xormon          hard    nofile          32768
    xormon          soft    nofile          32768
    xormon          hard    nproc           64000
    xormon          soft    nproc           64000
  • Enable repositories (as root)
    Make sure following repositories are enabled in Zypper:
    • openSUSE-Leap-15.6-1 (openSUSE-Leap-15.6-1)
    • Update repository with updates from SUSE Linux Enterprise 15 (repo-sle-update)
    zypper repos
    
    #  | Alias                       | Name                                                                                        | Enabled | GPG Check | Refresh
    ---+-----------------------------+---------------------------------------------------------------------------------------------+---------+-----------+--------
     1 | openSUSE-Leap-15.6-1        | openSUSE-Leap-15.6-1                                                                        | Yes     | (r ) Yes  | Yes
    ... 
    12 | repo-sle-update             | Update repository with updates from SUSE Linux Enterprise 15                                | Yes     | (r ) Yes  | Yes      
    ...   
  • Install additional packages (as root)
    zypper install perl ed libxml2-2 wget curl gpg2 net-tools sblim-wbemcli libaio1 wget curl strace \
    perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-CGI \
    perl-LWP-Protocol-https perl-libwww-perl perl-IO-Tty openldap2-client \
    perl-JSON perl-JSON-XS perl-Net-SNMP net-snmp perl-DBI perl-DBD-ODBC unixODBC unixODBC-devel freetds-config \
    perl-DBD-Pg net-tools-deprecated libcap-progs \
    python3-virtualenv python3-pip  python3-devel gcc-c++ gcc
  • Java 11 Installation
    Required only by Hitachi Export Tool for Hitachi VSP monitoring.
    Skip if you don't need to monitor Hitachi VSP storage systems.

  • Install Node.js (as root)
    XorMon requires Nodde.js 20 or newer.
    zypper install nodejs20
  • Install PostgeSQL 16 (as root)
    • Install packages
      zypper install postgresql16 postgresql16-contrib postgresql16-server postgresql16-server-devel postgresql16-devel
    • Enable and start PostgeSQL service
      systemctl enable --now postgresql.service
    • Enable access from localhost
      vi /var/lib/pgsql/data/pg_hba.conf
      
      # replace 
      host    all             all             127.0.0.1/32            ident
      
      # with
      host    all             all             127.0.0.1/32            scram-sha-256
      Single command:
      sed -i 's/^\(host \+all \+all \+127.0.0.1\/32 \+\)ident/\1scram-sha-256/g' /var/lib/pgsql/data/pg_hba.conf
    • Set postgres user password
      sudo -u postgres psql
      
      postgres=# \password postgres
      postgres=# ALTER USER postgres VALID UNTIL 'infinity';
      postgres=# \q
  • Install Timescale DB (as root)
    XorMon requires TimescaleDB Community Edition 2.13 or newer.
    Do not install TimescaleDB Apache 2 Edition, it lacks some key functionality required by XorMon.
    Timescale DB Community Edition has to be built from source, because there are no pre-built packages for SUSE.

    • Install additional packages
      zypper install git cmake
    • Clone Timescale DB Git repository
      cd ~; git clone https://github.com/timescale/timescaledb
    • Build the extension
      cd ~/timescaledb
      git checkout 2.22.0
      ./bootstrap
      cd build && make
      make install
    • Add Timescale DB extension to PostgeSQL
      vi /var/lib/pgsql/data/postgresql.conf
      
      # Replace
      #shared_preload_libraries = ''
      
      # with
      shared_preload_libraries = 'timescaledb'
      Single command:
      sed -i "s/^#shared_preload_libraries =.*/shared_preload_libraries = 'timescaledb'/g" /var/lib/pgsql/data/postgresql.conf
    • Tune DB
      'timescaledb-tune' script has to be installed using 'go'
      zypper install go
      go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@latest
      /root/go/bin/timescaledb-tune -yes -conf-path /var/lib/pgsql/data/postgresql.conf
      sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /var/lib/pgsql/data/postgresql.conf
      sed -i 's/#password_encryption/password_encryption/' /var/lib/pgsql/data/postgresql.conf
      sed -ie 's/32\s ident/32 scram-sha-256/' /var/lib/pgsql/data/pg_hba.conf
    • Restart PostgeSQL service
      systemctl restart postgresql.service
  • Configure firewall (optional, as root)
    Open XorMon port in the firewall 8443 TCP (XorMon UI) and 8162 TCP (OS agent communication).
    firewall-cmd --zone=public --add-port=8443/tcp --permanent
    firewall-cmd --zone=public --add-port=8162/tcp --permanent
    firewall-cmd --reload
    firewall-cmd --list-port

  • Follow XorMon application install

XorMon Installation

Once you have prepared Linux then install XorMon itself.

  • Log in as 'xormon' and create installation directory
    su - xormon
    mkdir xormon-ng
    cd xormon-ng
  • Download latest XorMon package to /home/xormon/xormon-ng
    tar zxf xormon-ng-<ver>.tar.gz
    ./xormon.sh start
    Ignore message "PM2 fail to start" at the end of the start procedure if apears.

  • Provide database password created during OS configuration when you are prompted
    APP_PORT[8443]=
    
    DB_HOST[127.0.0.1]=
    DB_PORT[5432]=
    DB_USERNAME[postgres]=
    DB_DATABASE[xormon]=
    DB_PASSWORD[]= <password>
  • Optional: change default port

    XorMon uses port 8443 by default.
    It can be configured to use any other port, even 443 (https).

    • Make sure the selected port is free

      Following command should not provide any output, if it does, then the port is being used by some other application.
      netstat -an| grep LISTEN |grep ":443 "
    • Allow the application to use low port number (as root)

      This is necessary if you want to use port 443 or any other port lower than 1024.
      Note: you have to re-run this command after each Node.js upgrade
      su -
      setcap 'cap_net_bind_service=+ep' `which node`
    • Configure application port (as xormon)
      vi ~/xormon-ng/server-nest/.env
      APP_PORT=443
    • Restart XorMon (as xormon)
      cd ~/xormon-ng
      ./xormon.sh stop
      cd server-nest/
      npx pm2 kill
      cd ..
      ./xormon.sh start 
      Ignore message "PM2 fail to start" at the end of the start procedure if apears.

    • Add newly selected port to firewall configuraiton.

Configure Python3 virtual environment (as xormon)

    This step is required for only for prediction graphs
    You can run XorMon without it if you have trouble downloading necessary Python modules.

  • Log in as 'xormon' and create Python3 virtual environment
    cd ~/xormon-ng/server-nest/
    python3 -m venv venv
    venv/bin/python3 -m ensurepip --upgrade
    venv/bin/python3 -m pip install --upgrade pip
    venv/bin/python3 -m pip install -r microservices/analyzer/requirements/requirements.txt
    Once you get this error:
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/pip/
    
    Then try to avoid it by using internal proxy for Python packages installation
    venv/bin/python3 -m pip install --proxy http://<username>:<password>@<hostname>:<port> --upgrade pip
    venv/bin/python3 -m pip install --proxy http://<username>:<password>@<hostname>:<port> -r microservices/analyzer/requirements/requirements.txt 
  • Restart XorMon
    cd ~/xormon-ng
    ./xormon.sh stop
    ./xormon.sh start
    Ignore message "PM2 fail to start" at the end of the start procedure if apears.

Setup XorMon startup script (as root)

    Systemd based (RedHat 8+, Debian 10+ )
    env PATH=$PATH:/usr/bin /home/xormon/xormon-ng/server-nest/node_modules/pm2/bin/pm2 startup systemd -u xormon --hp /home/xormon

Navigate to XorMon GUI

    https://<IP>:8443/
    Default login: xormon / xormon

Installing XorMon on a server where already LPAR2RRD is running

    XorMon fails to start OS agent (Linux) service as its default port 8162 is already occupied by LPAR2RRD daemon listener
    Check documentation how to handle it, there are 3 scenarios available.