You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Basic Configuration

Groups

The first task to take care of when getting started is to organise your system.  Deciding on groups, roles and contacts is a good place to start but it can be hard to get it right the first time if you don't have a list of devices you want to manage as the organisation of your devices is what will likely help you decide how you want to layout your groups.  Grab a piece of paper or a white board and try and group your devices in a way that makes sense to your network and will allow you to see errors they way you want to see them.  This might mean your devices are ordered by location/building/floor or by some other logical grouping that has nothing to do with location.  Things to think about here: a user calls and says X isn't working and you need to figure out why, what thought process would you use to figure this out and how will you want to look through groups to figure this out.

 After you have an idea of what your groups are it's time to set them up, do that by going to:

  • System -> System Configuration -> NMIS Configuration, choose "system" from the drop down.  NOTE: no spaces in names, comma separated list

If you decide to delete a group after you have assigned devices to it the devices assigned to that group will continue to be in the deleted group but the group will disappear from all of the monitoring windows.  To have the devices appear again you will have to edit the device and change it to a group that exists.  Somewhat analogously, if you change the name of a group each node will have to be changed to appear in the new group.  Hint: if a lot of devices/groups are changing consider doing this on the command line / using a text editor and operating directly on the .nmis configuration files.

Roles

A role helps define a what a set of devices help accomplish or to define their importance within the system.  Roles are set per device and are used in the definition of an escalation.  

To create or edit roles:

  • Add information of how to create/edit roles

Email

Configure the email section to allow NMIS to send out emails.  The settings are straight forward, the mail server to use, the domain the email is coming from, the email address the email should come from an and option to combine emails so notifications about devices are grouped instead of sent individually.

  • System -> System Configuration -> NMIS Configuration, choose "email" from the drop down.

If you are using the local host (127.0.0.1) to deliver mail there are a couple of things to remember.  Make sure you have the mail daemon running, on CentOS the default is sendmail:

sudo chkconfig --list sendmail
# sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# enable sendmail by default 
sudo chkconfig sendmail on 

# double check that it will be started  
sudo chkconfig --list sendmail
# sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off

# now start the daemon so we can use it right away
sudo service sendmail start 

 

If you leave sendmail with it's default configuration it will need a DNS server to resolve domain names for it.  If you don't have DNS setup you will find that emails will be stuck in mail queues.  To check this you can try:

# to see if there is mail in the mail queue
 sudo mailq
# if you take a look at one of the pieces of mail you will likely find something like this (with your domain name instead of ours)
 (host map: lookup (opmantek.com): deferred)  

 

You have some options to fix this, here we show how to quickly setup the  dnsmasq daemon, you can also disable the DNS requirement and/or enable SMART_HOST, see http://stackoverflow.com/questions/43970/configuring-sendmail-behind-a-firewall).  As long as your server can currently resolve names (pinging a named host works, ie ping google.com) then this should fix the problem:

yum install dnsmasq
chkconfig dnsmasq on
service dnsmasq start 

Send a test email

The script <nmis_base>/admin/testmail.pl will send an email to the default user contact1.  If you would like to send a test email edit the contact1 contact and set the email address (if your not sure how to do this see the contacts section) .  Then run the script:

/usr/local/nmis8/admin/testmail.pl
# This script will send a test email to the contact contact1 user@opmantek.com
# Using the configured email server 127.0.0.1
# 07:44:37 sendEmail to=user@opmantek.com subject=Normal Priority Test Email from NMIS8
# <snip>

The emails should show up in the inbox you specified shortly after running the script.  If they don't try using the mailq command above, or check out http://www.electrictoolbox.com/show-sendmail-mail-queue/

Contacts

Contact: Name of your contact

DutyTime: format is:

<start_hour>:<end_hour>:<days>
 
start_hour: 0-24
end_hour: 0-24 
days: all or any of "Sun","Mon","Tue","Wed","Thu","Fri","Sat"

 

Full day names can be used if you like, the perl code for days looks like this:
$today = ("Sun","Mon","Tue","Wed","Thu","Fri","Sat")[$ltime[6]];
if ( $days =~ /$today/i ) {



To give an example that isn't 24x7, here is Monday to Friday, 9 to 5:

8:17:MonTueWedThuFri

Email: email address of the contact, used to send escalations, etc, if configured

Location: location of your contact.  Not sure if this lines up with System -> System Configuration -> Locations at all or if it has any functional uses.

Mobile: as far as I can tell this is isn't used for anything functional at this time. This is from what I gathered using sub sendMSG in bin/nmis.pl 

Pager: At this time SNPP / Pagers are supported. The variable snpp_server can be set in Config.nmis, by default it holds the value set in server_name

Phone: 

TimeZone: this value is added to the time returned by the server before checking the start and end dates.  Either have your server in the same timezone as your users and use 0 here or set it up properly, have your server in GMT and set the TZ offset from GMT.

Advanced Configuration

  • No labels