Free Server Performance Monitoring
STOR2RRD

Microsoft Windows and Hyper-V monitoring installation

It is supported since 6.00.

Skip Prerequisites and Web tabs in case of configuring Virtual Appliance

  • LPAR2RRD can be hosted on any Unix or Linux Operating system
  • Rough disk space requirements: 3GB for 100 VMs, 20 datastores, 10 Hosts
  • Perl: arbitrary version coming with the OS with some additional modules, more below
  • Apache or any other Web server
Skip it in case of configuring Virtual Appliance

User creation

  • create lpar2rrd user under root:
    # useradd -c "LPAR2RRD user" -m lpar2rrd
    
  • Increase memory limits for user lpar2rrd and the WEB server user (under root)
    • AIX
      # chuser  data=-1  stack=-1 rss=-1 lpar2rrd
      # chuser  data=-1  stack=-1 rss=-1 apache
      
    • Linux
      # 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 tab.

Linux RedHat, CentOS

    # 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 ed bc
    # 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 libxml2-utils
    # apt-get install liblwp-protocol-https-perl libcrypt-ssleay-perl libio-socket-ssl-perl libmozilla-ldap-perl
    

AIX

Solaris

    # /opt/csw/bin/pkgutil -y -i pm_xml_simple pm_libxml_perl pm_xml_sax rrdtool
    
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
    • /etc/opt/freeware/apache/httpd.conf (AIX)
    • /opt/freeware/etc/httpd/httpd.conf (AIX)
    • /opt/freeware/etc/httpd/conf/httpd.conf (AIX)

    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 is able to monitor stand-alone MS Windows servers and MS Hyper-V performance metrics.
Implementation is done through single Windows OS agent running on any Windows host in the Windows domain.
This OS agent gets all required configuration from the AD and performance data of monitored hosts through WMI.
It passes such data to LPAR2RRD server where data is saved and presented.

Hyper-V schema

Installation summary

  1. Allow TCP connection initiated from Windows LPAR2RRD Hyper-V agent server to LPAR2RRD server on port 8162
  2. Make sure your LPAR2RRD daemon is running on LPAR2RRD server

User creation

  1. Create LPAR2RRD user in the AD with membership in these groups:
    • Event Log Readers
    • Hyper-V Administrators
    • Performance Log Users
    • Performance Monitor Users
    This must be done for all Hyper-V nodes and MS Windows servers that are supposed to be monitored (this can be set globally in AD).
    Use this manual for user creation and assigning rights in the AD.

  2. Give local admin rights to the LPAR2RRD user on the Win server where LPAR2RRD Hyper-V agent will be running.
    Add him into Domain Users group.

  3. Assign read-only rights for monitored Hyper-V clusters to LPAR2RRD user
    Hyper-V cluster rights 1
    Hyper-V cluster rights 2

OS agent installation

  • Unzip LPAR2RRD_Hyper-V_agent_install-1.00.zip
  • Run LPAR2RRD_Hyper-V_agent_install-1.00.exe
  • Right click on the installer, agenta and setup.vbs and change properties
    Hyper-V OS agent install

    Select installation directory
    Hyper-V OS agent install

    Put hostname of the LPAR2RRD server
    Hyper-V OS agent install

    Test connection to the LPAR2RRD server
    Hyper-V OS agent install

    Put user which will run LPAR2RRD OS aget on this machine
    Hyper-V OS agent install
  • Wait about 30 minutes, then Ctrl-F5 in your LPAR2RRD UI and you should see Hyper-V folder in the main menu

Further configuration in agent version 1.3.2+

    Older agent versions trying to get and monitor all servers in AD which are visible for the user.
    Since v1.3.2 there is a change and the agent monitors just the server where it is installed.

    Version 1.3.2 brings configuration file where is possible to define what will be monitored.
    There are these options:
    1. leave it in default mode and monitor just the server where it is installed
    2. monitor all visible servers from AD
    3. monitor only specific servers, manually added into cfg file

    Configuration of the mode is done by editing agent_config.txt (it is in OS agent installation directory).
    Example:
    # LPAR2RRD Windows and Hyper-V OS agent
    # installation & configuration manual: https://www.lpar2rrd.com/Hyper-V-performance-monitoring-installation.htm
    
    # mode 1
    # monitored is only servers where the agent is running, keep all commented out
    
    # mode 2
    # if you want to use AD for list of monitored servers, uncomment next line, 
    # note all servers visible for the user will be monitored
    # Active directory=YES
    
    # mode 3
    # if you want to monitor only some servers from AD, uncomment and edit next 2 lines include Active directory=YES
    # keep commas to encapsulate servers
    # Monitored_Servers,HVNODE01,HVNODE02,
    # Active directory=YES
    

LPAR2RRD server patch

    Applay the latest patch which fixes issues of version 6.02 and brings some more functionalities.
    It is a cumulativ patch for 6.01 and 6.02 versions.

    Download the patch file, untar it and install as the owner of LPAR2RRD installation:
    https://download.lpar2rrd.com/patch/lpar2rrd-6.02-10.tar
    su - lpar2rrd
    tar xvf lpar2rrd-6.02-10.tar
    cd lpar2rrd-6.02-10
    ./install.sh 
    
    cd /home/lpar2rrd/lpar2rrd
    ./load.sh
    
    Refresh the GUI when it finishes (Ctrl-F5)


Skip it in case of configuring Virtual Appliance

Install LPAR2RRD server

  • Download the latest LPAR2RRD server
    Upgrade your already running LPAR2RRD instance.

  • Install it:
    # su - lpar2rrd
    $ tar xvf lpar2rrd-6.XX.tar
    $ cd lpar2rrd-6.XX
    $ ./install.sh
    $ cd /home/lpar2rrd/lpar2rrd
    
  • Applay the latest patch which fixes issues of version 6.02 and brings some more functionalities.
    It is a cumulativ patch for 6.01 and 6.02 versions.

    Download the patch file, untar it and install as the owner of LPAR2RRD installation:
    https://download.lpar2rrd.com/patch/lpar2rrd-6.02-10.tar
    su - lpar2rrd
    tar xvf lpar2rrd-6.02-10.tar
    cd lpar2rrd-6.02-10
    ./install.sh
    
    cd /home/lpar2rrd/lpar2rrd
    ./load.sh
    
    Refresh the GUI when it finishes (Ctrl-F5)

  • Schedule to run it from lpar2rrd crontab (it might already exist there)
    $ crontab -l | grep load.sh
    $
    
    Add if it does not exist as above
    $ crontab -e
    
    # LPAR2RRD UI
    0 * * * * /home/lpar2rrd/lpar2rrd/load.sh > /home/lpar2rrd/lpar2rrd/load.out 2>&1 
    
    Assure there is just one such entry in crontab.

  • You might need to add lpar2rrd user into /var/adm/cron/cron.allow if crontab command fails
    Allow it for lpar2rrd user as root user.
    # echo "lpar2rrd" >> /var/adm/cron/cron.allow
    
  • Assure you have a cron jobs for Hyper-V in place (upgrade script might do it automatically)
    Skip it on the Virtual Appliance, it is already there.
    $ crontab -l | grep "load_hyperv.sh"
    $
    
    Add it if it does not exist like above
    $ crontab -e
    
    # MS Hyper-V support
    0,20,40 * * * *  /home/lpar2rrd/lpar2rrd/load_hyperv.sh > /home/lpar2rrd/lpar2rrd/load_hyperv.out 2>&1 
    
    
  • Initial start from cmd line:
    $ cd /home/lpar2rrd/lpar2rrd
    $ ./load.sh
    
  • Go to the web UI: http://<your web server>/stor2rrd/
    Use Ctrl-F5 to refresh the web browser cache.