NMIS on Windows 2003 Server IIS 6.0 by Tony Bowman 3-7-2005

 

  1. Install IIS through add/remove windows components

                                                               i.      IIS à World Wide Web Services

1.      Check World Wide Web Service

 

  1. Download and install WinRAR 3.42

http://rarlab.com

 

  1. Download and install version of nmis 3.2.6.  Extract the contents to d:\nmis

http://www.sins.com.au/nmis/nmis-install.html

 

  1. Download and install Active Perl 5.8.6 to c:\perl\

http://www.activestate.com/Products/ActivePerl/?_x=1

           

IIS Setup Verification

Verify Perl has been mapped in IIS, if not create

            IIS, properties of default website

            Home directory tab

Execute permissions need to be “scripts and executables”

            Configuration button

            .pl = C:\Perl\bin\perl.exe "%s" %s limit to GET,HEAD,POST

            .plx = C:\Perl\bin\perlis.dll limit to GET,HEAD,POST

 

            Environment Setup verification

                        Go to the control panel and click on system

                        Click on the advanced tab, then environmental Variables tab

                        Under system variables; path, verify that c:\perl\bin is listed

                        If not, add it

                        Reboot your computer

Go to the command prompt and type in path and hit enter, verify that c:\perl\bin is listed

 

  1. Download and install RRD 1.0.48

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/download.html

Extract to d:\rrdtool

·        Go to the command prompt

·        Enter d:\rrdtool\perl-shared

·        Type in ppm install rrds.ppd

You should get verification that this is installed

·        Copy d:\rrdtool\src\bounds_release\rrdcheckbounds.exe to d:\nmis\bin

·        Copy d:\rrdtool\src\rrd_cgi_release\rrd_cgi.exe to d:\nmis\bin

·        Copy d:\rrdtool\src\stats_release\rrd_stats.exe to d:\nmis\bin

·        Copy d:\rrdtool\src\tool_release\rrdrrdtool.exe to d:\nmis\bin

Setup IIS for RRD Tool

 

  1. Download and install SNMP Session 1.07 and extract to d:\snmp_session-1.07

http://www.switch.ch/misc/leinen/snmp/perl/dist/

·        Copy d:\snmp_session-1.07\lib\*.pm files into d:\nmis\lib

·        Copy d:\snmp_session-1.07\test\*.pm files into d:\nmis\lib

·        Copy d:\snmp_session-1.07\test\*.pl files into d:\nmis\bin

·        Delete directory d:\snmp_session-1.07

 

  1. Download and install time modules 2003.1126

http://www.perl.com/CPAN/authors/id/MUIR/modules/

 

  1. Download and install Time HiRes 1.20

 

  1. Download and install image info 1.16

 

  1. Download and install net SNPP 1.14

 

 

  1. Download and install Statistics Lite 1.02

 

 

  1. Configure NMIS configuration file

·        Copy d:\nmis\conf\nmis-sample.conf to d:\nmis\conf\nmis.conf

·        Edit nmis.conf (edit this file from the command prompt using cmd edit)

                                                               i.      Nmis_base=/nmis/ (when the dir is d:\nmis)

                                                               i.      domain=sins.com.au to your domain name

                                                             ii.      nmis_host=www.sins.com.au to your server

                                                               i.      dash_title=NMIS Dashboard to something descriptive

                                                             ii.      show_non_collected_interfaces=true

                                                            iii.      show_large_menu=true

                                                           iv.      E-mail settings

                                                             v.      Any other relevant information necessary

 

  1. Configure NMIS links file (use notepad)

·        Copy d:\nmis\conf\links-sample.csv to d:\nmis\conf\links.csv

·        Edit links.csv to fit your network, you can comment (#) out each line for now and come back and fill this in later

 

  1. Configure NMIS locations file (use notepad)

·        Copy d:\nmis\conf\locations-sample.csv to d:\nmis\conf\locations.csv

·        Edit locations.csv to fit your network, you can comment (#) out each line for now and come back and fill this in later

 

  1. Configure NMIS contacts file (use notepad)

·        Copy d:\nmis\conf\contacts-sample.csv to d:\nmis\conf\contacts.csv

·        Edit contacts.csv to fit your personnel, you can comment (#) out each line for now and come back and fill this in later

 

  1. Configure NMIS escalation file (use notepad)

·        Copy d:\nmis\conf\escalation-sample.csv to d:\nmis\conf\escalation.csv

·        Edit escalation.csv to fit your staff, you can comment (#) out each line for now and come back and fill this in later

 

  1. Configure NMIS log file (use notepad)

·        Copy d:\nmis\conf\logs-sample.csv to d:\nmis\conf\logs.csv

·        Edit logs.csv to for your environment

o       NMIS_Log from /usr/local/nmis/logs/nmis.log to d:/nmis/logs/nmis.log

o       Event_Log      from /usr/local/nmis/logs/event.log to d:/nmis/logs/event.log

o       Cisco_Syslog from /var/log/cisco.log to d:/nmis/var/log/cisco.log

o       Comment out (#)Apache_Error_Log

o       Comment out (#)Apache_Access_Log

o       Change each Syslog entry from /var/log/syslog to d:/nmis/var/log/syslog

 

Configure NMIS nodes csv file

(don’t let the csv confuse you, you can’t use excel or other types of csv programs to edit this file.  The best way I have found is to notepad and do a find and replace on the template.

·        Copy d:\nmis\conf\nodes-sample.csv to d:\nmis\conf\nodes.csv

·        Edit lines for your hosts as stated in the file

 

 

                                                               i.      View.pl

                                                             ii.      Summary.pl

                                                            iii.      Reports.pl

                                                           iv.      Query.pl

                                                             v.      Map.pl

                                                           vi.      Logs.pl

                                                          vii.      Event.pl

                                                        viii.      Config.pl

                                                           ix.      Metrics.pl

                                                             x.      Cplan.pl

 

Configure NMIS CGI perl file

                                                               i.      Change use lib “/usr/local/rrdtool/lib/perl” to “d:/nmis/lib”

 

 

Configure NMIS perl file

                                                               i.      Change use lib “/usr/local/rrdtool/lib/perl” to “d:/nmis/lib”

 

                                                             ii.      D:\nmis\bin>nmis.pl type=config debug=true 

 

                                                            iii.      You should receive an OK, or no test available for each line, you will receive one error about missing a cisco.log file which we will create later.

 

 

Test collection

Go to the command prompt to d:\nmis\bin

      D:\nmis\bin>Nmis.pl type=collect debug=true

This will create all the RRD databases for each device in d:\nmis\database

If you get an error about “Your vendor has not defined POSIX macro SIGALRM” you will have to edit the file as below.

                                                           iv.      Edit d:\nmis\ping.pm line #304 uncomment $alarm_exists = 0;

 

Test Updates

Go to the command prompt to d:\nmis\bin

      D:\nmis\bin>Nmis.pl type=update debug=true

 

Setup collection of stats and interfaces on a schedule

                                                               i.      Collection.bat

@echo off

cd ..

cd bin

nmis.pl type=collect

exit

·        Daily_update.bat

@echo off

cd ..

cd bin

nmis.pl type=update

nmis.pl type=links

exit

·        Create a scheduled task to run the collection.bat to run every 5 minutes

·        Create a scheduled task to run the daily_update.bat to run daily

 

 

Configure IIS for NMIS UI

            Open IIS manager

·        Click on web services extension

·        Highlight Perl CGI Extension and click Allow

·        Highlight Perl ISAPI Extension and click Allow

Add support for RRD

·        Click add new web service extension

·        Type in RRD CGI as the name

·        Required files Add d:\nmis\bin\rrd_cgi.exe %s %s"

·        Check set extension status to allow and click OK

Create home directories and virtual directories

·        Click on the properties of the default website

·        Click the home directory tab

·        Change the home directory to d:\nmis\

·        If you would like to lock down who can access this website click on the directory security tab and block by either IP address, or windows user accounts.

·        Right click default website and create new virtual directory called CGI-NMIS that points to d:\nmis\cgi-bin

·        Right click default website and create new virtual directory called NMIS that points to d:\nmis\htdocs

·        Right click the newly created virtual directory nmis and create a new virtual directory called nmis that points to d:\nmis\cgi-bin

·        Be sure and check the box execute permissions and finish the wizard

·        Click the properties of virtual directory nmis, documents tab, remove all entries and add nmiscgi.pl and click OK.

 

            Test HTTP access

Open Internet Explorer 6.0 or newer and point it to http://yourservername/nmis/nmis

 

 

                        Fix Web UI Ping problems                    

·        Navigate to c:\windows\system32 and click the properties of ping.exe

·        Click the security tab

·        Click on add, and find IUSR_YourServerName from location of your server and grant them read and execute permissions

·        Edit admin.pl for ping (use cmd edit)

o       Line 90, change ping –c to ping –n

Fix Web UI Traceroute

·        Copy c:\windows\system32\tracert.exe to c:\windows\system32\traceroute.exe

·        Click the properties of traceroute.exe

·        Click the security tab

·        Click on add, and find IUSR_YourServerName from location of your server and grant them read and execute permissions

·         

·        Edit admin.pl for traceroute

o       Line 93, change traceroute –n –m 15 to traceroute –h 15

 

 

If you have questions please send an e-mail to tony.bowman@dtn.com.