Xorux Virtual Appliance

This is about our Xorux Virtual Appliance used by the first generation of our tools: XorMon Original, LPAR2RRD and STOR2RRD
It is not about XorMon NG Virtual Appliance you can download from this site which already contains XorMon NG.

Use this procedure to upgrade and configure XorMon NG distributed with Xorux Virtual Appliance 7.60+ which is based on Rocky Linux 8.x, you can check this by
grep "Virtual Appliance version" /var/www/html/index.html| sed -e 's/^.*Virtual Appliance version/Virtual Appliance version/' -e 's/is brought to you by.*//'
  Virtual Appliance version 7.60
head -1 /etc/os-release 
  NAME="Rocky Linux"
Important notices:
  • XorMon NG is running under 'lpar2rrd' user instead of 'xormon' user
  • XorMon NG installation directory is '/opt/xorux/xormon-ng' instead of '/home/xormon/xormon-ng'
  • XorMon NG Web UI address is 'https://<IP>/xormon-ng/' instead of 'https://<IP/hostname>[:<port>]/'
  • XorMon NG OS Agent port has to be changed to 7162 so that it does not interfere with Original XorMon OS Agent running on port 8162
  • It is not possible to upload custom SSL certificates for XorMon NG

Update PGDG repository (as root)

dnf --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Install additional packeges (as root)

dnf install -y freetds unixODBC-devel
Python: it is necessary only for prediction graphs, you can run XorMon NG even without that
dnf install -y python3-virtualenv python3-devel libpq-devel

Stop XorMon NG (as lpar2rrd)

cd /opt/xorux/xormon-ng/
./xormon.sh stop

Install TimescaleDB (as root)

  • Stop and disable PostgreSQL 14
    systemctl stop postgresql-14
    systemctl disable postgresql-14
    Uninstall packages
    dnf --noautoremove remove timescaledb-2-postgresql-14 timescaledb-2-loader-postgresql-14 postgresql14 postgresql14-server postgresql14-contrib postgresql14-libs timescaledb-tools
    Remove PostgreSQL 14 data and leftover directories
    rm -rf /var/lib/pgsql/ /usr/pgsql-14 /usr/lib64/timescaledb-loader-pg14 /usr/lib64/timescaledb-pg14
  • Install PostgreSQL 16
    dnf install -y timescaledb-2-postgresql-16 postgresql16-contrib
  • Optionaly you might change database location from default /var/lib/postgresql/16/main
    Note that database must be on a filesystem having 100GB free at least (in big environments rather 500GB)
    vi /etc/postgresql/16/main/postgresql.conf
    data_directory = '/home/xormon/xormon-ng/postgresql' 
    
    under xormon user:
    
    mkdir /home/xormon/xormon-ng
    mkdir /home/xormon/xormon-ng/postgresql
  • Initialize DB
    /usr/pgsql-16/bin/postgresql-16-setup initdb
  • Tune DB
    timescaledb-tune -yes --pg-config=/usr/bin/pg_config
    sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /etc/postgresql/16/main/postgresql.conf
  • Enable automatic start
    systemctl enable --now postgresql-16
  • Set password for user 'postgres'
    sudo -u postgres psql
    
    \password postgres
    \q
    Make note of the password. It will be needed later during XorMon NG installation.

Initialize and upgrade XorMon NG

  • Start XorMon NG (as lpar2rrd)
    su - lpar2rrd
    cd /opt/xorux/xormon-ng/
    ./xormon.sh start
    Provide database password created during OS configuration when prompted
    DB_HOST[127.0.0.1]=
    DB_PORT[5432]=
    DB_USERNAME[postgres]=
    DB_DATABASE[xormon]=
    DB_PASSWORD[]= <password>
  • Upgrade XorMon NG to the latest version (as lpar2rrd)
    Download latest XorMon NG package xormon-ng-<ver>.tar.gz to /home/lpar2rrd

  • Upgrade XorMon NG
    cd /opt/xorux/xormon-ng/
    ./xormon.sh upgrade /home/lpar2rrd/xormon-ng-<ver>.tar.gz

Configure Python3 virtual environment (as lpar2rrd)

  • Create Python3 virtual environment
    Python: it is necessary only for prediction graphs, you can run XorMon NG even without that
    su - lpar2rrd
    export PATH="$PATH:/usr/pgsql-12/bin" 
    cd /opt/xorux/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
  • Restart XorMon NG
    cd /opt/xorux/xormon-ng
    ./xormon.sh stop
    ./xormon.sh start

Create XorMon NG startup script (as root)

    su -
    env PATH=$PATH:/usr/bin /opt/xorux/xormon-ng/server-nest/node_modules/pm2/bin/pm2 startup systemd -u lpar2rrd --hp /home/lpar2rrd

Navigate to XorMon NG GUI

    https://<IP>/xormon-ng
    Default login: xormon / xormon

Configure OS agent service

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

    Example how to direct OS agent to different port and more hosts
    bellow cfg will collect data once and sends it to 3 Hosts (Host1 port 8162, Host2 port 8162 and Host3 port 7162)
    su - lpar2rd
    crontab -e
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <Host1>  <Host2>  <Host3>:7162   > /var/tmp/lpar2rrd-agent.out 2>&1

Optionally configure firewall (as root)

    Open OS agent service port if you decide to running it on different than default port (7162 in this example)
    firewall-cmd --zone=public --add-port=7162/tcp --permanent
    firewall-cmd --reload
Xorux Virtual Appliance running CentOS 7.x is not supported.
head -1 /etc/os-release
  NAME="CentOS Linux"