Free Server Performance Monitoring
STOR2RRD

Oracle Solaris monitoring

It will be released in coming 6.00.
Beta testers are welcome, contact us at support@lpar2rrd.com

Follow Virtual Appliance installation in case of usage of Virtual Appliance

  • LPAR2RRD can be hosted on any Unix or Linux Operating system
  • Rough disk space requirements: 3GB for 100 Zones, 10 LDOMs
  • Perl: arbitrary version coming with the OS with some additional modules, more below
  • Apache or any other Web server
  • RRDTool: use RRDTool v1.3.5+ to allow graph zooming feature
Skip it in case of configuring Virtual Appliance

User creation

  • create lpar2rrd user on a server which owns the tool and will have access to HMC/IVM or vCenter/ESXi
  • add a user on Unix under root account
    # useradd -c "LPAR2RRD user" -m lpar2rrd
    
  • Increase memory limits for user lpar2rrd and the WEB server user (under root)
    # vi /etc/security/limits.conf
    
    @lpar2rrd        hard    stack           -1
    @lpar2rrd        soft    stack           -1
    @lpar2rrd        hard    data            -1
    @lpar2rrd        soft    data            -1
    @apache          hard    stack           -1
    @apache          soft    stack           -1
    @apache          hard    data            -1
    @apache          soft    data            -1
    
If you have already running STOR2RRD on the same host then skip to Web server configuration.

Software prerequisites

  • Apache
  • RRDTool with Perl support (rrdtool & rrdtool-perl)
  • Perl TimeDate module
  • Perl XML::Simple module
  • Perl PDF::API2 for PDF reporting
  • Linux RedHat, CentOS
    # yum list | egrep "httpd|rrdtool|perl\.|perl-TimeDate|perl-XML-Simple|perl-XML-SAX|CGI\.|perl-Env\.|sharutils"
        httpd.i386                             2.2.15-15.el6
        perl.i386                              4:5.10.1-119.el6_1.1
        rrdtool.i386                           1.2.30-1.wrl
        rrdtool-perl.i386                      1.2.30-1.wrl
        rrdcached.i386                         1.2.30-1.wrl
        perl-TimeDate.noarch                   1:1.16-11.1.el6
        perl-XML-SAX.noarch                    0.96-7.el6
        perl-XML-Simple.noarch                 2.14-8.el6
        perl-CGI.i386                          3.51-119.el6_1.1
        perl-Env.noarch                        1.04-2.el7
    # umask 0022 
    # yum install rrdtool rrdtool-perl httpd
    # yum install epel-release
    # yum install 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
    # yum install ed bc libxml2 sharutils
    
    Note that rrdtool-perl and epel-release (this is necessary only for PDF reporting) might not be in your RedHat base repository especially for RHEL 6.x and olders.
    Install CentOS package instead rrdtool-perl-1.4.8-9.el7.x86_64.rpm and epel-release-7-9.noarch.rpm

  • Linux Debian, Ubuntu
    # umask 0022 
    # apt-get install apache2 perl rrdtool
    # apt-get install librrdp-perl libxml-sax-perl libxml-simple-perl libtimedate-perl libenv-sanctify-perl libcgi-pm-perl libdata-dumper-simple-perl libpdf-api2-perl liblwp-protocol-https-perl
    # apt-get install ed bc libxml2-utils
    
Skip it in case of configuring Virtual Appliance

Apache download

  • Linux CentOS, RedHat
    # yum install httpd
    
  • Linux Debian, Ubuntu
    # apt-get install httpd
    

Apache configuration

Apache start / restart

    Command depends on Apache version, one of these should work:
    # apachectl restart
    # /opt/freeware/apache/sbin/apachectl restart
    # /etc/init.d/httpd restart
    # service apache2 restart
    

Test web pages

    Point your web browser to http://<your lpar2rrd host>/lpar2rrd/ as soon as you configure LPAR2RRD
    Do not forget to ensure that Apache starts after the OS reboot (there must be a starting script in /etc/rc.... )

Apache configuration per platform and version

  • Linux CentOS, RedHat


    Append at the end of /etc/httpd/conf/httpd.conf following
    # vi /etc/httpd/conf/httpd.conf
    
    AddHandler cgi-script .sh
    # DocumentRoot  "/home/lpar2rrd/lpar2rrd/www/"
    Alias /lpar2rrd  "/home/lpar2rrd/lpar2rrd/www/"
    <Directory "/home/lpar2rrd/lpar2rrd/www/">
        AllowOverride AuthConfig
        Options Indexes FollowSymLinks
        Require all granted
    </Directory>
    # CGI-BIN
    ScriptAlias /lpar2rrd-cgi/ "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi/"
    <Directory "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi">
        AllowOverride AuthConfig
        SetHandler cgi-script
        Options ExecCGI FollowSymLinks
        Require all granted
    </Directory>
    
  • Linux Debian, Ubuntu : Apache2 (2.4+)


    Enable CGI-BIN
    # a2enmod cgi
    
    Append this at the end of /etc/apache2/apache2.conf
    # vi /etc/apache2/apache2.conf
    
    AddHandler cgi-script .sh
    Alias /lpar2rrd  "/home/lpar2rrd/lpar2rrd/www/"
    <Directory "/home/lpar2rrd/lpar2rrd/www/">
        Options Indexes FollowSymLinks 
        Require all granted
    </Directory>
    # CGI-BIN
    ScriptAlias /lpar2rrd-cgi/ "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi/"
    <Directory "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi">
        AllowOverride None
        Options +ExecCGI +SymLinksIfOwnerMatch
        Require all granted
        SetHandler cgi-script
    </Directory>
    
  • Apache 2.4+ generally


    Configure httpd.conf, it might be in different locations (depends of distribution)
    • /etc/httpd/httpd.conf
    • /etc/httpd/conf/httpd.conf

    1. Verify alias_module and cgi_module is loaded (uncommented it, the path can be different)
      LoadModule alias_module /opt/freeware/lib/httpd/modules/mod_alias.so
      LoadModule cgi_module /opt/freeware/lib/httpd/modules/mod_cgi.so
      
    2. cgi_module could depend on mpm_prefork_module like here.
      Allow it as well (uncomment it) and disable mpm_worker_module, mpm_event_module
      LoadModule mpm_prefork_module /opt/freeware/lib/httpd/modules/mod_mpm_prefork.so
      # LoadModule mpm_worker_module /opt/freeware/lib/httpd/modules/mod_mpm_worker.so
      # LoadModule mpm_event_module modules/mod_mpm_event.so
      <IfModule mpm_prefork_module>
           LoadModule cgi_module /opt/freeware/lib/httpd/modules/mod_cgi.so
      </IfModule>
      
    3. Append this at the end of httpd.conf
      AddHandler cgi-script .sh
      Alias /lpar2rrd  "/home/lpar2rrd/lpar2rrd/www/"
      <Directory "/home/lpar2rrd/lpar2rrd/www/">
          Options Indexes FollowSymLinks 
          Require all granted
      </Directory>
      # CGI-BIN
      ScriptAlias /lpar2rrd-cgi/ "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi/"
      <Directory "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi">
          AllowOverride None
          SetHandler cgi-script
          Options ExecCGI FollowSymLinks
          Require all granted
      </Directory>
      
      Sometimes appears necessary to remove "Require all granted" lines in both directives.

  • Apache 1.3 - 2.3


    Configure httpd.conf, it might be in different locations (depends of distribution)
    • /etc/httpd/httpd.conf
    • /etc/httpd/conf/httpd.conf

    # vi /etc/opt/freeware/apache/httpd.conf
    
    Alias /lpar2rrd  "/home/lpar2rrd/lpar2rrd/www/"
    <Directory "/home/lpar2rrd/lpar2rrd/www/">
        Options Indexes FollowSymLinks 
        Order allow,deny
        Allow from all
    </Directory>
    # CGI-BIN
    ScriptAlias /lpar2rrd-cgi/ "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi/"
    <Directory "/home/lpar2rrd/lpar2rrd/lpar2rrd-cgi">
        AllowOverride None
        Options ExecCGI FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>
    
  • SELinux changes


    You need to disable the SELinux service protection to be able to utilize basic web services.
    You must do it in case you get "(13)Permission denied:" in Apache error_log.
    You have 2 options:

    • Disable SELinux only for Apache
      Step 1. Query for the Boolean value you need to change:
      # getsebool -a | grep httpd_dis
        httpd_disable_trans --> off
      
      Step 2. Disable the SELinux protection:
      # setsebool -P httpd_disable_trans=1
      
      Step 3. Verify that the Boolean has changed:
      # getsebool -a | grep httpd_dis
        httpd_disable_trans --> on
      
    • Globally disable SELinux
      # setenforce Permissive
      # vi /etc/sysconfig/selinux
        SELINUX=disabled
      
LPAR2RRD monitoring performance of Oracle Solaris boxes with graphical presentation.
It is aware of Oracle Solaris Sparc and x86 virtualization. It presents data hierarchically.

Implementation is done through OS agent running on each Oracle Solaris host (LDOM/Control Domain/Global Zone/Zone).
You must use LPAR2RRD agent and server 6.00+.

Solaris OS agent LDOM schema

Working modes

  1. install OS agents on all LDOMs and Global Zones only
  2. Install OS agents on all LDOMs and Global Zones and Zones

Installation summary

  1. Assure your network allows TCP connection initiated from OS agents to LPAR2RRD server on port 8162
  2. Make sure your LPAR2RRD daemon is running on LPAR2RRD server
  3. Install the OS agent on all LDOMs include Control Domains
  4. Optionally install the OS agent on all Zones to get additional OS based metrics

OS agent install on a LDOM/Control Domain

  • Create user lpar2rrd with role solaris.ldoms.read

  • Solaris installation under root:
    # gunzip lpar2rrd-agent-6.00-0.solaris-i86pc.tar.gz
    # tar xf lpar2rrd-agent-6.00-0.solaris-i86pc.tar
    # pkgadd -d .
      The following packages are available:
      1  lpar2rrd-agent     LPAR2RRD OS agent 6.00
      ...
    
  • Assign LDOM read rights solaris.ldoms.read for the user (lpar2rrd) which will run the agent:
    # usermod -A solaris.ldoms.read lpar2rrd
    
    Assure that rights are fine, "/sbin/ldm ls -p" should not return "Authorization failed"
    # su - lpar2rrd
    $ /sbin/ldm ls -p
    

OS agent install on a Zone/Global Zone

    Use any unprivileged user (lpar2rrd preferably) for agent install and run.
    Use same Solaris package like in LDOM example above.

Install and configure LPAR2RRD server

  • Download the latest LPAR2RRD server.
    You need at least v6.00 and install or upgrade your already running LPAR2RRD instance.

  • Configure LPAR2RRD server as per documentation
    Then you have to start up the LPAR2RRD daemon.
    Skip that if you already use the OS agent feature for your AIX/Linux environment.
    # su - lpar2rrd
    $ cd /home/lpar2rrd/lpar2rrd
    $ vi etc/lpar2rrd.cfg
      LPAR2RRD_AGENT_DAEMON=1
    $ ./load.sh daemon
      Starting LPAR2RRD daemon on port:8162
    

Testing connection

  • Test connection to the LPAR2RRD server
    $ /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -d <LPAR2RRD-SERVER>
      ...
      OS agent working for server: <LPAR2RRD-SERVER>
      store file for sending is /var/tmp/lpar2rrd-agent-<LPAR2RRD-SERVER>-lpar2rrd.txt
    
    It means that data has been sent to the server, all is fine
    Here is example when the agent is not able to sent data :
    $ /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl -d <LPAR2RRD-SERVER>
      ...
      OS agent working for server: <LPAR2RRD-SERVER>
      store file for sending is /var/tmp/lpar2rrd-agent-<LPAR2RRD-SERVER>-lpar2rrd.txt
      Agent timed out after : 50 seconds /opt/lpar2rrd-agent/lpar2rrd-agent.pl:265
    
    It means that the agent could not contact the server.
    Check communication (if firewalls are open), DNS resolution of the server etc.

Schedule OS agent in Solaris

  • Schedule it in lpar2rrd's crontab
    # su - lpar2rrd
    $ crontab -e
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-SERVER> > /var/tmp/lpar2rrd-agent.out 2>&1
    
    Replace <LPAR2RRD-SERVER> by hostname of your LPAR2RRD server.

  • You might need to add lpar2rrd user into /var/adm/cron/cron.allow under root user if above "crontab -e" fails.
    # echo "lpar2rrd" >> /var/adm/cron/cron.allow