Stor2RRD


The Stor2RRD tool is quite useful for bringing the performance and capacity metrics of all the storage infrastructure together into one place. This document aims to show one how to install and configure reporting for some commonly used enterprise storage assets.

High Level Requirements




- Network access for HDS: 2000/tcp (non-secure), and 28355/tcp (secure)
- Network access for HPE: 5783/tcp, 5782/tcp, 2550/tcp
- Network access for FOS: 161/udp
- CentOS7 or similar, 4 vCPU, 4GB RAM
- CLI for storages (HSNM2 CLI, 3PAR CLI, etc)
- 30G per array in /home/stor2rrd for RRD data

Go through the prereqs here - http://www.stor2rrd.com/install.htm?1.2

Provision the VM




Install CentOS 7 packages,

$ yum -y install strace bind-utils sysstat telnet mlocate unzip zip yum-utils \
  make gcc net-snmp net-snmp-utils wget oddjob oddjob-mkhomedir sssd adcli \
  krb5-workstation realmd samba-common-tools ntp sendmail rsyslog php httpd \
  traceroute mariadb-server open-vm-tools firewalld gcc mod_security mod_qos \
  aide psacct arpwatch lsof bc csh java httpd ed libxml2 sharutils perl \
  perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-Env perl-CGI \
  perl-Data-Dumper perl-LWP-Protocol-https perl-PDF-API2 perl-libwww-perl \
  glibc.i686 libstdc++.i686 rrdtool rrdtool-perl net-snmp-perl

Check /etc/hosts contains the localhost entry and IP.

Optionally set /etc/selinux/config to permissive.

Add new resource limits into /etc/security/limits.conf with this,

*                soft    nproc          8391
*                hard    nproc          8391
*                soft    nofile         8192
*                hard    nofile         8192

@stor2rrd        hard    stack           -1
@stor2rrd        soft    stack           -1
@stor2rrd        hard    data            -1
@stor2rrd        soft    data            -1
@apache          hard    stack           -1
@apache          soft    stack           -1
@apache          hard    data            -1
@apache          soft    data            -1

Add also into /etc/security/limits.d/20-nproc.conf

*          soft    nproc     8400
root       soft    nproc     unlimited

Reboot for these changes to take effect.

Install Stor2RRD




As root, add the new user. As stor2rrd extract and install the stor2rrd software,

$ useradd -c "STOR2RRD user" -m stor2rrd
$ chown -R stor2rrd:stor2rrd /usr/stovavm
$ passwd stor2rrd
$ chmod 755 /home/stor2rrd
$ su - stor2rrd
$ tar xf /tmp/stor2rrd-*.tar
$ cd stor2rrd-*
$ ./install.sh

Configure Apache




As root, update ServerName and ServerAdmin in httpd.conf, and append this,

# STOR2RRD
#
AddHandler cgi-script .sh
# DocumentRoot  "/home/stor2rrd/stor2rrd/www/"
Alias /stor2rrd  "/home/stor2rrd/stor2rrd/www/"
<Directory "/home/stor2rrd/stor2rrd/www/">
    AllowOverride AuthConfig
    Options Indexes FollowSymLinks Includes MultiViews
    Require all granted
</Directory>
# CGI-BIN
ScriptAlias /stor2rrd-cgi/ "/home/stor2rrd/stor2rrd/stor2rrd-cgi/"
<Directory "/home/stor2rrd/stor2rrd/stor2rrd-cgi">
    AllowOverride AuthConfig
    SetHandler cgi-script
    Options ExecCGI Includes FollowSymLinks
    Require all granted
</Directory>

Start and enable the Apache httpd service,

$ systemctl start httpd
$ systemctl enable httpd

Install and configure Hitachi SNM2 CLI




Create software directory, set ownership. Install the software (extract tarball),

$ mkdir /usr/stonavm
$ chown stor2rrd:stor2rrd /usr/stonavm
$ su - stor2rrd
$ cd /usr/stonavm
$ tar xf /tmp/HSNM2*.tar

Check stor2rrd software location for Hitachi SNM2 CLI,

$ grep HUS_CLIDIR stor2rrd/etc/stor2rrd.cfg

Configure user environment for Hitachi SNM2 CLI (add to .bash_profile),

$ export STONAVM_HOME=/usr/stonavm
$ export PATH=$PATH:$STONAVM_HOME
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STONAVM_HOME/lib

Test stor2rrd access to arrays (should report "ok"),

$ perl /home/stor2rrd/stor2rrd/bin/conntest.pl 192.168.20.24 2000
$ perl /home/stor2rrd/stor2rrd/bin/conntest.pl 192.168.20.24 28355

Use the SNM2 Web UI to add the stor2rrd user account with read access.

As stor2rrd, register all the Hitachi array access,

$ auunitadd -unit HUS150a -LAN -ctl0 192.168.20.24 -ctl1 192.168.20.25
$ auunitref

Configure stor2rrd user access to arrays, confirm access,

$ auaccountenv -set -uid stor2rrd -authentication
$ auunitinfo -unit HUS150a

Add the AMS/HUS Arrays into /home/stor2rrd/stor2rrd/etc/storage-list.cfg, eg.

HUS150a:HUS:

Install and configure HPE 3PAR CLI




As root, install the software (requires 113MB in /opt),

$ ./setup.bin

Configure user environment for 3PAR CLI (add to .bash_profile),

$ export PATH=$PATH:/opt/3PAR/inform_cli_3.1.2/bin

Test access to arrays,

$ perl /home/stor2rrd/stor2rrd/bin/conntest.pl 192.168.20.20  5783

Check for correct software path,

$ grep HPE3PAR_CLIDIR stor2rrd/etc/stor2rrd.cfg

Use the Web UI to add the user stor2rrd with browse access to all.
This account name must match the one for STORAGE_USER in stor2rrd.cfg.

Store the 3par credentials in stor2rrd, and check array access,

$ cd stor2rrd
$ sh bin/3par-credential-save.sh
$ showversion
system: 192.168.20.20
user: stor2rrd

Add the 3PAR Arrays into stor2rrd/etc/storage-list.cfg, eg.

my3par02:3PAR:192.168.20.20:

Add FC Switches




Ensure you have the switch SNMP community string configured.

Add switches with SNMP access in stor2rrd/etc/san-list.cfg, eg.

switch1:string1:BRCD:

Confirm access to systems




$ cd stor2rrd
$ ./bin/config_check.sh

All systems should report "ok" status.

Schedule data collection and aggregation




Add the GUI load.sh cronjob, plus jobs for switch, Hitachi, and 3par,

0 * * * * /home/stor2rrd/stor2rrd/load.sh > /home/stor2rrd/load.sh.out 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_sanperf.sh > /home/stor2rrd/san.out 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_husperf.sh > /home/stor2rrd/hitachi.out 2>&1
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_3parperf.sh > /home/stor2rrd/3par.out 2>&1

Check them for errors. After a while check the Web UI for data.

http://<stor2rrdserver>/stor2rrd/

If necessary load manually,

$ cd stor2rrd ; ./load

Remove Array from Stor2RRD




$ cd ~stor2rrd/stor2rrd
$ rm -r tmp/3par* www/3par* data/3par*
$ ./load.sh html

Refresh the browser.

No comments:

Post a Comment