SICM Simple Infrastructure Capacity Monitor

 

SourceForge.net Logo

rrdtool.org logo

SICM Installation Guide

Prerequisites and Tools
Win32 Installation
Linux Installation
Installing SICM as a Win32 Service
Installing SICM as a Linux Service

Prerequisites and Tools

An understanding of xml, ip networking and snmp is assumed.

  • Editing Tool:
    ConText was used to develop SICM, hence is recommended if you do not already have a preferred editor.
  • snmp Query Tool:
    Getif for Win32 or net-snmp for Linux are recommended for the snmp querying of devices to assist in determining OIDs, etc.

Win32 Installation

Hardware and Software Requirements for Installing SICM
  1. The minimum hardware and software requirements for installing SICM on Windows are:
    • A Windows 2000 Workstation, 2000/2003 Server, or Windows XP with:
    • a network connection and the Internet Protocol (TCP/IP) installed, also
    • IIS Web Service or Apache HTTP Service installed.
Installation Summary
  1. Install Perl 5.8 (Activestate's MSI)
  2. Install RRDtool 1.2.x (C:\rrdtool>install)
  3. Install HTML::Template (C:\Perl>ppm install HTML-Template)
  4. Install SICM (unzip to C:\Program Files\sicm\ and C:\Inetpub\wwwroot\sicm\ for IIS, or C:\Program Files\Apache Group\Apache2\sicm\ for Apache)
  5. Configure Web Server
Install Perl 5.8
  1. Download and install Perl 5.8 (ActiveState's MSI is recommended for Win32 installations)
Install RRDtool including RRDs
  1. Download RRDtool-1.2.10 or later (eg: rrdtool-1.2.10-win32-perl58.zip) and unzip into a directory (e.g. C:\rrdtool\)

Note: Versions 1.0.xx of RRDtool are no longer supported on SICM.

  1. Install RRDs:
    	C:\rrdtool>install
    	RRD module for activestate perl 5.8.x
    	-------------------------------------
    	====================
    	Install 'RRDs' version 1.201 in ActivePerl 5.8.3.809.
    	====================
    	Installing C:\Perl\site\lib\auto\rrds\rrds.bs
    	Installing C:\Perl\site\lib\auto\rrds\rrds.dll
    	Installing C:\Perl\site\lib\auto\rrds\rrds.exp
    	Installing C:\Perl\site\lib\auto\rrds\rrds.lib
    	Installing C:\Perl\site\lib\auto\rrds\rrds.pdb
    	Files found in blib\arch: installing files in blib\lib into
    	  architecture dependent library tree
    	Installing C:\Perl\site\lib\makefile.pl
    	Installing C:\Perl\site\lib\ntmakefile.pl
    	Installing C:\Perl\site\lib\rrds.pm
    	Successfully installed RRDs version 1.201 in ActivePerl 5.8.3.809.
    	Press any key to continue . . .
    	1..7
    	ok 1 loading
    	...
    	Press any key to continue . . .
Install CPAN module XML::Simple

ActivePerl usually includes XML::Simple hence installation may not be required.
To search to see if XML::Simple is installed: C:\Perl>ppm search XML-Simple

If it is missing and you are on-line, then:

   C:\Perl>ppm install XML-Simple

Or, to unpack and install XML::Simple from the enclosed file:

  1. Unpack the enclosed XML-Simple-2.14.tar.gz or download XML::Simple from CPAN
  2. Install as per the README, or simply copy the Simple.pm file to your C:\Perl\site\lib\XML\ directory (where Parser.pm lives).
Install CPAN module HTML::Template

If you are using ActivePerl and on-line, then:

   C:\Perl>ppm install HTML-Template

Or, to unpack and install HTML::Template from the enclosed file:

  1. Unpack the enclosed HTML-Template-2.6.tar.gz or download XML::Template from CPAN
  2. Download NMAKE.EXE and NMAKE.ERR from http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084 to C:\perl\bin\
  3. Install HTML-Template-2.6.tar.gz as per the README, eg:
       C:\downloads\perl\HTML-Template-2.6>perl makefile.pl
       Checking if your kit is complete...
       Looks good
       Writing Makefile for HTML::Template
        
       C:\downloads\perl\HTML-Template-2.6>nmake
        
       Microsoft (R) Program Maintenance Utility Version 1.50
       Copyright (c) Microsoft Corp 1988-94. All rights reserved.
        
       cp Template.pm blib\lib\HTML\Template.pm
        
       C:\downloads\perl\HTML-Template-2.6>nmake test
        
       Microsoft (R) Program Maintenance Utility Version 1.50
       Copyright (c) Microsoft Corp 1988-94. All rights reserved.
        
       C:\Perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
       1..57
       ok 1
       ok 2
       ..skipped..
       ok 59
       ok 60
        
       C:\downloads\perl\HTML-Template-2.6>nmake install
        
       Microsoft (R) Program Maintenance Utility Version 1.50
       Copyright (c) Microsoft Corp 1988-94. All rights reserved. 
        
       Installing C:\Perl\site\lib\HTML\Template.pm
       Writing C:\Perl\site\lib\auto\HTML\Template\.packlist
       Appending installation info to C:\Perl\lib/perllocal.pod
Install CPAN module Time::HiRes

ActivePerl usually includes Time::HiRes hence installation may not be required.
To search to see if Time::HiRes is installed: C:\Perl>ppm search Time-HiRes

If it is missing and you are on-line, then:

   C:\Perl>ppm install Time-HiRes

Or, to unpack and install XML::Simple from the enclosed file:

  1. Unpack the enclosed Time-HiRes-1.87.tar.gz or download Time::HiRes from CPAN
  2. Install as per HTML::Template: perl makefile.pl, nmake, nmake test and nmake install.

Note: The CPAN module Net::SNMP is supplied and installed with SICM. Separate installation is not required.

Install SICM
  1. Download SICM from http://sicm.sourceforge.net
  2. unzip into program and web directories:
    • C:\Program Files\sicm\ and C:\Inetpub\wwwroot\sicm\ for Win32/IIS, or
    • C:\Program Files\sicm\ and C:\Program Files\Apache Group\Apache2\sicm\ for Win32/Apache

Note: Ensure folders are activated when SICM is unzipped.

Web Server Configuration
  1. For IIS 5:
    1. cgi configuration
      • Goto Internet Information Services using the MMC: Administrative Tools >> Internet Services Manager
      • Right click the 'Default Web Site' >> Properties >> Home Directory >> Configuration...
      • Add an Extension '.cgi' if it does not exist, with the following properties:
    2. To stop IIS caching the rrd images (allows the images in browsers to refresh each 5 minutes)
      • Goto Internet Information Services using the MMC: Administrative Tools >>  Internet Services Manager
      • In the 'Default Web Site', right click the 'sicm' folder >> Properties >> HTTP Headers
      • Select 'Enable Content Expiration' and 'Expire Immediately'
  2. For IIS 6:
    1. cgi configuration as per above (IIS 5)
    2. Web Service Extensions
      • Goto Internet Information Services using the MMC: Administrative Tools >> Internet Services Manager
      • Select the 'Web Service Extensions'
      • Allow 'Perl CGI Extension' (visible after ActivePerl is installed).
    3. To stop IIS caching the rrd images (allows the images in browsers to refresh each 5 minutes)
      • Goto Internet Information Services using the MMC: Administrative Tools >>  Internet Services Manager
      • In the 'Default Web Site', right click the 'sicm' folder >> Properties >> HTTP Headers
      • Select 'Enable Content Expiration' and 'Expire Immediately'

    Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;245225

    Hint: To increase security an option is to use Perl's taint features. To implement taint, in IIS Configuration... set the Executable to C:\Perl\bin\perl.exe -T %s %s, also change the first line in sicm.cgi to #!/usr/bin/perl -Tw.

  3. For Apache 2:
    Refer to the Apache 2 Manual, specifically the "Apache Tutorial: Dynamic Content with CGI" for several methods on configuring Apache for CGI programs. The following is one method:
    1. Add a sub-directory (C:\Program Files\Apache Group\Apache2\sicm) and copy the web files to it (sicm.cgi, .htmt and .png files)
    2. In the SICM configuration file (config.xml), set <web_dir> to C:\Program Files\Apache Group\Apache2\sicm
    3. Add an Alias to the Apache configuration file (httpd.conf) which permits the execution of CGI files:
         Alias /sicm/ "C:/Program Files/Apache Group/Apache2/sicm/"
         <Directory "C:/Program Files/Apache Group/Apache2/sicm">
             Options Indexes ExecCGI
             AllowOverride None
             Order allow,deny
             Allow from all
         </Directory>
    4. Add to the Apache configuration file (httpd.conf) a directive to treat all files with the cgi extension as CGI programs:
      AddHandler cgi-script cgi
    5. Ensure the file sicm.cgi is associated with Perl Command Line Interpreter via Windows Explorer:
      My Computer >> select sicm.cgi >> File >> Properties >> General >> Opens with: Perl Command Line Interpreter,
      also ensure Perl is in the path (e.g. from the command console: PATH=C:\Perl\bin\;C:\WINNT\system32;C...)
    6. Change the first line of sicm.cgi
      from:  #!/usr/bin/perl -w
      to:     #!c:/perl/bin/perl.exe -w

Hint: Only those files needed should be copied to the web directory. Placing additional files in the web directory potentially exposes sources of attack.

Linux Installation

Hardware and Software Requirements for Installing SICM
  1. The minimum hardware and software requirements for installing SICM on Linux are:
    • Fedora Core 3 or Red Hat 9 Linux (other Linux distributions should work) with:
    • a network connection and the Internet Protocol (TCP/IP) installed, also
    • Apache HTTP Service installed and
    • Perl 5.8 installed.
Install RRDtool including RRDs
  1. Download and install RRDtool 1.2.x for Perl 5.8 using the build instructions or an rpm (e.g. rpm -Uvh rrdtool-1.2.12-1.1.fc3.test.i386.rpm).

Note: Versions 1.0.xx of RRDtool are no longer supported on SICM.

Install CPAN module XML::Simple
  1. Unpack the enclosed XML-Simple-2.14.tar.gz or download XML::Simple from CPAN
  2. Install as per the README, eg:
       >perl Makefile.PL
       >make
       >make test
       >make install
Install CPAN module HTML::Template
  1. Unpack the enclosed HTML-Template-2.6.tar.gz or download XML::Template from CPAN
  2. Install as per the README, eg:
       >perl Makefile.PL
       >make
       >make test
       >make install
Install CPAN module Time::HiRes
  1. Unpack the enclosed Time-HiRes-1.87.tar.gz or download Time::HiRes from CPAN
  2. Install, eg:
       >perl Makefile.PL
       >make
       >make test
       >make install

Note: The CPAN module Net::SNMP is supplied and installed with SICM. Seperate installation is not required.

Install SICM
  1. Download SICM from sicm.sourceforge.net
  2. Unpack into program and web directories. The recommended structure is as per FHS:
    • /opt/sicm/ for the core application files (sicm.pl, test_*.rrd files and /lib directory including contents)
    • /etc/opt/sicm for the configuration files (config.xml, templates.xml and targets.xml)
    • /var/opt/sicm for the alert file (SICM will create alerts.xml when started)
    • /var/www/html/sicm/ for the web files (.cgi, .htmt and .png files), and
    • /var/log for the log file (If configured, SICM will create sicm.log when started).
  3. Set permissions on directories, eg /var/www/html/sicm/, /opt/sicm and /etc/opt/sicm/ should be set to read-only for the Apache group.
Web Server Configuration
  1. For Apache (httpd):
    • It is recommended to start Apache as a service, refer to redhat-config-service or equivalent
  2. Configure Apache to permit CGI execution:
    Use the Options directive, inside your Apache server configuration file (/etc/httpd/conf/httpd.conf), to specify that CGI execution is permitted in the sicm directory:
       <Directory /var/www/html/sicm>
         Options ExecCGI
       </Directory>
    Also direct the server to treat all files with the cgi extension as CGI programs:
       AddHandler cgi-script .cgi

    Refer to the Apache manual for more information.

Hint: Only those files needed should be copied to the web directory. Placing additional files in the web directory potentially exposes sources of attack.

Installing SICM as a Win32 Service

Microsoft Resource Kit tools instsrv.exe and srvany.exe are used to setup SICM to run as a service under NT/2K/XP/2K3:

  1. Open up an MS-DOS command prompt.
    Type the following command:
       C:\>instsrv SICM C:\WINNT\srvany.exe
       The service was successfuly added!
       ...
     
    Note1: The service name can be whatever you want, (SICM is recommended).
    Note2: To remove the service: C:\>instsrv SICM REMOVE.
    Refer to Microsoft's srvany.wri for further details.
  2. Open up the Registry Editor (Start Button >> Run >> type REGEDT32)
    Select the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SICM
  3. From the Edit menu >> Add Key.
    Key Name: Parameters
    Class :<leave blank>
  4. (Optional) Within the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SICM
    From the Edit menu >> Add Value.
    Value Name: Description
    Type : REG_SZ
    String : Simple Infrastructure Capacity Monitor
  5. Select the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SICM\Parameters
    From the Edit menu >> Add Value (3 times).
    Value Name Type String
    Application REG_SZ C:\Perl\bin\perl.exe
    AppDirectory REG_SZ C:\Program Files\sicm
    AppParameters REG_SZ sicm.pl -c config.xml
  6. Close the Registry Editor
  7. Open up Services (Administrative Tools >> Services)
    Select the service SICM and "Start Service"
  8. To validate SICM is running goto Task Manager... >> Processes and a new perl.exe process should be running.

Note: It is strongly recommended that SICM is implemented successfully in a console before attempting to run it as a service.

Installing SICM as a Linux Service

To install SICM as a service on Linux, a solution has been developed (rc.local).

It is strongly recommended that SICM is implemented successfully in a console before attempting to run it as a service.

  1. Login as root.
  2. In the startup file /etc/rc.d/rc.local, add the line:
       /usr/bin/perl /opt/sicm/sicm.pl -c /etc/opt/sicm/config.xml >/dev/null &
  3. Logout and reboot. SICM will start automatically.
  4. To confirm that SICM has started, from the console: ps -e |grep "perl" will result in "1089 ? 00:00:09 perl" or similar.
SICM v0.95 Copyright 2003-2006 Thomas Price