Clean Linux OS

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 your operating system ready, install the XorMon program 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
      ./xormon.sh start 
      ./xormon.sh status 
      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
    If 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.