Installation

QNAP monitoring

In case of usage of Virtual Appliance
  • Use local account lpar2rrd for hosting of STOR2RRD on the virtual appliance
  • Use /home/stor2rrd/stor2rrd as the product home

The product obtains all data from QNAP Q'center via ssh.
Storage access diagram

Storage connectivity

  • Allow access from the STOR2RRD host to QNAP Q'center on ports 22 (SSH).
    $ perl /home/stor2rrd/stor2rrd/bin/conntest.pl 192.168.1.1 22 
      Connection to "192.168.1.1" on port "22" is ok
    
  • Connect to the QNAP Q'center as admin and allow ssh access
    QNAP Storage management

  • Create OS level user on the QNAP Q'center appliance, preferably stor2rrd with no any special rights
    Log as admin to the QNAP Q'center appliance:
    admin@qcenter:/home/admin$ sudo useradd -c "STOR2RRD user" -m stor2rrd
      [sudo] password for admin: 
    admin@qcenter:/home/admin$ sudo passwd stor2rrd
      Enter new UNIX password: 
      Retype new UNIX password: 
      passwd: password updated successfully
    
  • Exchange ssh keys to allow ssh-key based access
    Create ssh-keys on STOR2RRD host under stor2rrd user if do not exist yet.
    It should already exist on the Virtual Appliance, skip it there.
    Type enter instead of passphrase
    # su - stor2rrd # (use lpar2rrd user on the Appliance)
    $ ls -l ~/.ssh/id_rsa.pub
    $ ssh-keygen -t rsa -N ""
      Generating public/private rsa key pair.
      Enter file in which to save the key (/home/stor2rrd/.ssh/id_rsa):
      ...
    $ ls -l ~/.ssh/id_rsa.pub
      -rw-r--r-- 1 stor2rrd stor2rrd 382 Jun  1 12:47 /home/stor2rrd/.ssh/id_rsa.pub
    
  • Copy ssh-key into the QNAP Q'center under storage stor2rrd
    $ scp ~/.ssh/id_rsa.pub stor2rrd@<Q'center IP/hostname>:/tmp/id_rsa.pub
    $ ssh stor2rrd@<Q'center IP/hostname>
    stor2rrd@qcenter:/home/stor2rrd$ mkdir .ssh
    stor2rrd@qcenter:/home/stor2rrd$ chmod 700 .ssh
    stor2rrd@qcenter:/home/stor2rrd$ mv /tmp/id_rsa.pub .ssh/authorized_keys
    
  • Test connectivity, you should not be prompted for password:
    $ ssh stor2rrd@<Q'center IP/hostname> "date"
      Mon May 25 23:30:01 CEST 2020
    

STOR2RRD storage configuration

    Add storage into configuration from the UI:
    Settings icon ➡ Storage ➡ New ➡ Vendor:device ➡ QNAP
    QNAP Storage setup

    Use 'Server name' from QCENTER as a 'QNAP name' like qnap101 in this example:
    QNAP monitoring name

  • Assure you have enough of disk space on the filesystem where is STOR2RRD installed
    Roughly you might count 2 - 30 GB per a storage (it depends on number of volumes, 30GB for 5000 volumes)
    $ df -g /home   # AIX
    $ df -h /home   # Linux
    
  • Schedule to run storage agent from stor2rrd crontab (lpar2rrd on Virtual Appliance, it might already exist there)
    $ crontab -l | grep load_qnapperf.sh
    $
    
    Add if it does not exist as above
    $ crontab -e
    
    # QNAP 
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_qnapperf.sh > /home/stor2rrd/stor2rrd/load_qnapperf.out 2>&1
    
    Assure there is already an entry with the UI creation running once an hour in crontab
    $ crontab -e
    
    # STOR2RRD UI (just ONE entry of load.sh must be there)
    5 * * * * /home/stor2rrd/stor2rrd/load.sh > /home/stor2rrd/stor2rrd/load.out 2>&1
    
  • Let run the storage agent for 15 - 20 minutes to get data, then:
    $ cd /home/stor2rrd/stor2rrd
    $ ./load.sh
    
  • Go to the web UI: http://<your web server>/stor2rrd/
    Use Ctrl-F5 to refresh the web browser cache.
  • Troubleshooting

    • STOR2RRD stops collecting data from QNAP
      STOR2RRD collects data from QNAP Q'center. Sometimes QNAP Q'center Agent hangs and stops sending data to QNAP Q'center.
      Restart QNAP Q'center agent: Login to QNAP GUI ➡ Open App Center ➡ Stop QNAP Q'center Agent ➡ Start QNAP Q'center Agent