Monday, October 17, 2011

NMIS Configuration Part 1

Since I posted my first article about NMIS, I have had several requests to do a series on how to configure NMIS.  Although I took a break from blogging in September, here is the first in the requested series.


NMIS' configuration is stored in text files in /usr/local/nmis8/conf/ and can be edited by hand.  However, it is highly recommended to use the built in tools to edit the configuration.  The main configuration can be found under Configuration > System > NMIS Configuration.


Configuration > System > NMIS Configuration
 Clicking on NMIS Configuration brings up the NMIS config window show in the top left of the next picture.  From there you can choose one of the various NMIS configuration sections.  To start go to system.


The system configuration section has the basic configuration for the NMIS software.  These include the name of the NMIS server, NMIS groups, Linux user and group to run NMIS as and the file permissions.  Most of these can be left at the default, but unless you have very few nodes to monitor, you will want to setup groups.  To setup groups, click on edit next to the current Groups variable.  This will bring up another window where you can make a comma delimited list of groups.  Please note, don't put spaces as they can get confusing if you ever have to edit the configuration by hand.


Group Edit Window
The next section to setup is the e-mail section.  Just like the system section it is found in the NMIS config window.  Here you will setup your mail server, mail domain, the address NMIS will send mail as and whether or not to combine e-mail alerts.  For example if you have three nodes down at the same time, it will send one e-mail instead of three separate ones. Just like changing the Groups, click edit to change a variable.


E-mail Configuration
Next we need to tell NMIS what the elapsed event time will be before NMIS alerts someone.  This is referred to as escalation.  Once again the escalation section is found in the NMIS config window.  Each level is listed as the number of seconds elapsed.  For example, the default scale sends the first notification at Level 0 which would be 5 minutes.  Escalation combined with Contacts provides a powerful notification mechanism for events.


Escalation Timing Configuration
The Contacts configuration is managed by going to Configuration>System>Contacts.  Each contact is defined by a Contact name (spaces seem to cause issues at times).  Within each contact are several bits of information.  The Duty Time defines when the contact will receive notifications.  The example below shows a contact that is available 24x7x365, but depending on your needs you can have different contacts be active at different times.  If you are going to use the duty time, make sure to set the Time Zone offset from GMT.  In my use of NMIS I have only used the e-mail field, but it does support paging via SNPP and SMS through a SMS gateway.


Contact Edit Screen
Now that the escalation timers and contacts are configured it is time to setup some escalation policies.  This is done by going to Configuration>System>Escalations.


Escalation List
Each line in the Escalation table defines an escalation policy.  To change the notifications associated with a particular policy, choose edit.  This will bring up another dialog box.  Each policy can apply to all groups (default) and roles (default) or they can be honed to only apply to a certain group or role or combination of a group and role.  For example, you may want a certain escalation policy for all devices in your Datacenter group that are classified as being in a Core role.  The type can further hone the policy to a device type such as router, switch or server.  The Event variable establishes for which event type or all event types (default) that the policy will be active.  If you need further granularity, you can type in a specific node name and/or element (interface).


Now that the policy of what to notify on is defined, the who and when need to be defined.  The levels correspond to the levels in the escalation table.  As shown below, the action for each level is defined as type colon and then the Contact name.  For multiple Contacts, separate them with colons.  Finally the UpNotify variable defines whether the system will e-mail the contacts when the condition is resolved.


Edit Escalation


At this point NMIS is configured to notify on events, but it is only monitoring the NMIS server itself.  In the next post, I will go through the process of adding nodes to the configuration.

3 comments:

  1. looks useful. still to see if it can monitor my link status ..

    ReplyDelete
  2. Hello,

    I need a help to configure rancid in NMIS 8 . is it possible to integarate RANCID on NMIS8 so that i achive some more features .

    ReplyDelete
  3. I haven't really worked with NMIS8 much. I would suggest the opmantek.com support forums.

    ReplyDelete