Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
themeEmacs
#Backup current NMIS code and config including models
DATE=`date "+%Y-%m-%d-%H%M"`
cd /usr/local/nmis8
tar cvf ~/nmis8-backup-$DATE.tar ./admin ./bin ./cgi-bin ./conf ./install ./lib ./menu ./mibs ./models

#Make sure NMIS is working before you patch it.
/usr/local/nmis8/bin/nmis.pl type=collect debug=true node=<node to test>

#Get CP working right. (no prompts)
unalias cp

#Set NMIS version
nmisver=8.4.2g
   
#Unarchive the NMIS tarball
cd ~
tar xvf nmis-8$nmisver.4.1g.tar.gz

mkdir /usr/local/nmis8/models-install
 
# Patch the Code Base
cp nmis8.4.1gnmis$nmisver/admin/* /usr/local/nmis8/admin
cp nmis8.4.1gnmis$nmisver/bin/* /usr/local/nmis8/bin
cp nmis8.4.1gnmis$nmisver/cgi-bin/* /usr/local/nmis8/cgi-bin
cp -r nmis$nmisver/mibs/* nmis8.4.1g/usr/local/nmis8/mibs 
cp -r nmis$nmisver/install/* /usr/local/nmis8/install
cp -r nmis8.4.1gnmis$nmisver/lib/* /usr/local/nmis8/lib
cp -r nmis8.4.1gnmis$nmisver/menu/* /usr/local/nmis8/menu
cp nmis8.4.1gnmis$nmisver/models-install/* /usr/local/nmis8/models-install

...

Code Block
MAILTO=WhoeverYouAre@yourdomain.tld 
######################################################
# NMIS8 Config
######################################################
# Run Statistics Collection
*/5 * * * * /usr/local/nmis8/bin/nmis.pl type=collect mthread=true maxthreads=10
######################################################
# Run Summary Update every 2 minutes
*/2 * * * * /usr/local/nmis8/bin/nmis.pl type=summary
#####################################################
# Run the interfaces 4 times an hour with Thresholding on!!!
# if threshold_poll_cycle is set to false, then enable cron based thresholding
#*/15 * * * * nice /usr/local/nmis8/bin/nmis.pl type=threshold mthread=true maxthreads=10
######################################################
# Run the update once a day 
30 20 * * * nice /usr/local/nmis8/bin/nmis.pl type=update mthread=true maxthreads=10
######################################################
# Check to rotate the logs 4am every day UTC
5 20 * * * /usr/sbin/logrotate /usr/local/nmis8/conf/logrotate.conf
##################################################
# save this crontab every day
0 8 * * * crontab -l > /usr/local/nmis8/conf/crontab.root
########################################
# Run the Reports Weekly Monthly Daily
# daily
0 0 * * * /usr/local/nmis8/bin/run-reports.pl day health
010 0 * * * /usr/local/nmis8/bin/run-reports.pl day top10
030 0 * * * /usr/local/nmis8/bin/run-reports.pl day outage
040 0 * * * /usr/local/nmis8/bin/run-reports.pl day response
045 0 * * * /usr/local/nmis8/bin/run-reports.pl day avail
050 0 * * * /usr/local/nmis8/bin/run-reports.pl day port
# weekly
0 01 * * 0 /usr/local/nmis8/bin/run-reports.pl week health
010 01 * * 0 /usr/local/nmis8/bin/run-reports.pl week top10
030 01 * * 0 /usr/local/nmis8/bin/run-reports.pl week outage
040 01 * * 0 /usr/local/nmis8/bin/run-reports.pl week response
050 01 * * 0 /usr/local/nmis8/bin/run-reports.pl week avail
# monthly
0 02 1 * * /usr/local/nmis8/bin/run-reports.pl month health
010 02 1 * * /usr/local/nmis8/bin/run-reports.pl month top10
030 02 1 * * /usr/local/nmis8/bin/run-reports.pl month outage
040 02 1 * * /usr/local/nmis8/bin/run-reports.pl month response
050 02 1 * * /usr/local/nmis8/bin/run-reports.pl month avail
###########################################

...

  1. Change Config.nmis to tell NMIS to use htpasswd 

    Code Block
    %hash = (
    --SNIP-- 
     'authentication' => {
     --SNIP--
       'auth_method_1' => 'htpasswd',  # <= change this FROM apache TO htpasswd
  2. Backup old apache configGenerate new apache configuration (if you have customised yours edit it and remove the auth portions instead of generating a new one) 

    Code Block
    #backup old config
    cd /etc/httpd/conf.d/
    cp 00nmis.conf 00nmis.conf.pre-8.3.24G.bak
  3. Create new config to replace old config and restart apache 

    Code Block
    /usr/local/nmis8/bin/nmis.pl type=apache > /etc/httpd/conf.d/00nmis.conf
    service httpd restart

Setup SNMP Trap Daemon

NMIS 8.4.1 has included some Cisco and Generic MIBS and added the ability to view the SNMP traps in the NMIS logging tool.

You will need to copy the options file to the right location and restart the daemon.

Code Block
cp /usr/local/nmis8/install/snmptrapd.options /etc/sysconfig/snmptrapd 
service snmptrapd restart

You can test the MIB resolution with this command

Code Block
snmptranslate -m ALL -M /usr/local/nmis8/mibs/traps 1.3.6.1.4.1.9.9.43.1.1.6.1.5.34

Which should result in:

Code Block
CISCO-CONFIG-MAN-MIB::ccmHistoryEventConfigDestination.34

Fix Data Type for Some Counters

...