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
Use this procedure to install XorMon NG on Xorux Virtual Appliance running on CentOS 7.x
head -1 /etc/os-release
  NAME="CentOS Linux"

Important notices:

  • XorMon NG is running under 'lpar2rrd' user instead of 'xormon' user
  • XorMon NG Web UI port has to be changed to some unused port (7443 for example)
  • XorMon NG OS Agent port has to be changed to 7162 so that it does not interfere with LPAR2RRD OS Agent running on port 8162
  • CentOS 7 support ends on June 30, 2024
Check the Linux version
cat /etc/os-release 
  NAME="CentOS Linux"

Configure Google Cloud SDK repository (as root)

On Red Hat Enterprise Linux (RHEL) or CentOS 7 based systems, you might see a GPG error when trying to install or update software using yum.
See Google Cloud - Known Issues - repomd.xml signature couldn't be verified for more information.
su -
sed -i 's/^repo_gpgcheck=1/repo_gpgcheck=0/g' /etc/yum.repos.d/google-cloud-sdk.repo

Install additional packeges (as root)

su -
yum -y install perl ed libxml2 sharutils wget curl gnupg net-tools sblim-wbemcli libaio strace
yum -y install perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-Env perl-CGI perl-Data-Dumper
yum -y install perl-LWP-Protocol-https perl-libwww-perl perl-Time-HiRes perl-IO-Tty openldap-clients
yum -y install perl-JSON perl-JSON-PP perl-JSON-XS net-snmp-perl perl-DBI perl-DBD-ODBC unixODBC unixODBC-devel freetds
Python: it is necessary only for prediction graphs, you can run XorMon NG even without that
yum -y install python3-virtualenv python3-pip python3-devel

Install Node.js 16 using NVM (as lpar2rrd)

su - lpar2rrd
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
exit

nvm install 16
node -v

Install TimescaleDB (as root)

  • Add PostgreSQL to yum repository
    su -
    yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  • Add TimescaleDB to yum repository

    Run as a single command - copy and paste the entire contents of the code block
    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 PostgreSQL 15 with TimescaleDB extension
    yum -y install timescaledb-2-postgresql-15 postgresql15-contrib
  • Initialize DB
    /usr/pgsql-15/bin/postgresql-15-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-15
  • 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.

Install and configure XorMon NG

  • Create installation directory (as lpar2rrd)
    su - lpar2rrd
    cd /home/lpar2rrd
    mkdir xormon-ng
  • Download the latest version of XorMon NG
    Download 'xormon-ng-<ver>.tar.gz' from XorMon NG download page
    Upload the file to '/home/lpar2rrd/xormon-ng' on the Virtual Appliance

  • Install XorMon NG
    cd xormon-ng
    tar zxvf xormon-ng-<ver>.tar.gz
    rm xormon-ng-<ver>.tar.gz
    ./xormon.sh start
    XorMon NG is running on port 8443 by defeault.
    However, port 8443 is occupied by XorMon Original on the Appliance.
    Please select a different port during startup - e.g. 7443.
    APP_PORT[8443]= 7443
    Provide database password created during PostgreSQL/TimescaleDB installation when prompted
    DB_HOST[127.0.0.1]=
    DB_PORT[5432]=
    DB_USERNAME[postgres]=
    DB_DATABASE[xormon]=
    DB_PASSWORD[]= <password>
  • Configure Python3 virtual environment

    Install additional packages (as root)
    su -
    yum -y install postgresql-devel gcc
    Configure virtual environment (as lpar2rrd)
    Python: it is necessary only for prediction graphs, you can run XorMon NG even without that
    su - lpar2rrd
    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
    Restart XorMon NG (as lpar2rrd)
    su - lpar2rrd
    cd ~/xormon-ng
    ./xormon.sh stop
    ./xormon.sh start

Create XorMon NG startup script (as root)

su -
env PATH=$PATH:/home/lpar2rrd/.nvm/versions/node/v16.20.2/bin /home/lpar2rrd/xormon-ng/server-nest/node_modules/pm2/bin/pm2 startup systemd -u lpar2rrd --hp /home/lpar2rrd

Navigate to XorMon NG GUI

https://<IP>:<PORT>
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