Thursday, October 24, 2013

3PAR System Reporter, Part 2

We left off with a Linux host that had been built and configured to begin the installation of 3PAR System Reporter. Let’s continue on and get System Reporter installed and configured.
As a recap from Part 1, we are building a System Reporter system in Linux. I have chosen to use RedHat Enterprise Linux 5.8, along with MySQL for the database backend. Both System Reporter and MySQL will be hosted on the same server.
So let’s recap some file locations first, as we will need them later on.
The 3PAR CLI was installed into /opt/3PAR/inform_cli_3.1.1. You should have 2 files copied from the System Reporter CD, onto your system. They are sampleloop-.i386.rpm and sysrptwebsrv-.i386.rpm. At the time of writing, the current versions were 2.9-2 for sampleloop and 2.9-2 for sysrptwebsrv, but make sure to check with your 3PAR representative for the most recent versions.
We begin by making some modifications to the MySQL installation.
  1. Open /etc/my.cnf with your editor of choice (mine is vi )
    1. Comment out the socket= line, and add the line below underneath:
      1. socket=/var/run/mysqld/mysqld.sock
    1. Above [mysqld_safe], add the following line:
      1. max_allowed_packet=32M
    2. Save the file, and then restart mysql
      1. /etc/init.d/mysqld stop
      2. /etc/init.d/mysqld start
  2. Check to make sure the new socket file exists
    1. ls –al /var/run/mysqld/mysqld.sock
Now we are going to create the System Reporter database and users, and then grant those users access to the database.
  1. Connect to your MySQL database
    1. mysql –u root –p
      • when prompted, enter the password you defined for the root user
    1. Create the inservstats database:
      • create database inservstats;
    2. Create the cliuser and webuser users
      • create user cliuser identified by ‘3psrcli’;
      • create user webuser identified by ‘3parweb’;
    3. Grant privileges to the System Reporter users, by issuing the below commands:
      • use inservstats
      • grant all on * to cliuser;
      • grant select on * to webuser;
    4. Quit out of the database:
      • exit

Installing the SampleLoop applications

With the database and users created, we are able to start installing the software. Before we start, make sure to check to ensure the 32 bit package of GD is installed, by issuing
yum –y install gd.i386
. You should get a prompt back saying it’s installed and the latest version, otherwise it will install the missing package(s).

  1. Install the sampleloop package, which you copied from the System Reporter CD earlier
    • rpm –ivh sampleloop-.i386.rpm
      (substiture ver with your version)
  2. Edit the /etc/sampleloop.confconfiguration file, by opening it with your favorite editor. You will need to perform the following edits:
    • Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
    • Change the line “set Sysdb::smtpserver” to your local mail server address
    • Change the line “set Sysdb:smtporig” to the FROM email address System Reporter should use when sending you emails.
    • Change the “set Sysdb::smtpuser” and “set Sysdb:smtppasswd” to their respective user and password values, if your mail server requires you to login to send mail. If these are not needed, simply comment them out by putting a # in front of the lines.
    • Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
    • Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
  3. Now we will need to create the password file used by the sampleloop mechanism to access the CLI. Open/Create the file “/etc/sampleloop_dbpwfile”
    • On the first line, enter the username and password for the cli user, separated by a single space.
      • ie. “cliuser 3psrcli”
    • Save the file, and exit out of the editor.
  4. You are now ready to startup the SampleLoop processes.
    • run the below script:
      1. /etc/init.d/sampleloop startup
    • If this fails to start, check the log located in /var/log/sampleloop/sampleloop.log for hints on what went wrong. It’s usually a password mistyped.
  5. If everything starts successfully, add sampleloop to the default startup runlevels
    • chkconfig --add sampleloop

Installing the System Reporter Webserver Files

Now we have the database and users created, sampleloop applications installed, and SampleLoop up and running. The next step is to install the sysrptwebsrv RPM package. This package is found on the System Reporter CD, and should be copied on to your Linux system.
  1. To install the packages, run the below:
    • rpm -ivh sysrptwebsrv-2.9-2.i386.rpm
    • Ensure it was installed successfully.
  2. We now need to setup two config.tcl files for the webserver.
    1. The first is at /var/www/cgi-bin/3par-rpts/config.tcl. Open this file in your favorite editor, and make the below changes:
      • Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
      • Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
      • Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
      • Change the line “set Sysdb::dbuser” to webuser
      • Change the line “set Sysdb::dbpasswd” to the password you set for webuser, in my example it was 3parweb.
      • Change the line “set Sysdb::smtpserver” to your local mail server address
      • Change the line “set Sysdb:smtporig” to the FROM email address System Reporter should use when sending you emails.
      • Change the “set Sysdb::smtpuser” and “set Sysdb:smtppasswd” to their respective user and password values, if your mail server requires you to login to send mail. If these are not needed, simply comment them out by putting a # in front of the lines.
    2. The second file is located at /var/www/cgi-bin/3par-policy/config.tcl. Open this file in your favorite editor, and make the below changes:
      • Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
      • Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
      • Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
      • Change the line “set Sysdb::dbuser” to cliuser
      • Change the line “set Sysdb::dbpasswd” to the password you set for cliuser, in my example it was 3psrcli.

Test your System Reporter setup

You should now have a working System Reporter configuration. You can access System Reporter by going to:
http:///3par/
Part 3 of my System Reporter series will involve adding the Inserv system to System Reporter, as well as setting some basic options up, and going over the various tabs available to you.

No comments:

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...