Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Policies and Actions Concept

opEvents generates a variety of events and depending on the size and health of your network there may be thousands of events a day. These events can vary in importance from warnings of high CPU usage to critical failures of hardware. It is not necessary to send email notifications to every engineer on staff in regards to minor events. If every event is notifying everyone on staff then soon there will be less attention to these events making it easier to overlook the critical ones. opEvents gives you the ability to create policies and generate automated actions based on rules that make sense for your environment.

...

If this is not already configured by you then you will need to create your email server. opEvents requires an email server in order to sent notifications via email.  This email server is configured in /usr/local/omk/conf/opCommon.nmis. If you do not want to edit text files to configure this, it can be accomplished within the NMIS GUI as well. NMIS will symlink Email, Users, etc. already created to opEvents, keep this in mind throughout the guide and choose what works best for you.

  1. Follow the Wiki guide and set up your Email server
    a. Information on setting up an Email server can be found here - Create Email Server
    b. Alternative Email configuration resource - NMIS8 Email

Configure Contacts

A 'contact' is a variable that can represent one or many email addresses.   opEvents can utilize the NMIS contacts file (/usr/local/nmis8/conf/Contact.nmis) or the OMK contacts (/usr/local/omk/conf/COntactsContacts.nmis) file.  In order to determine which file your system is using look in opCommon.nmis; find the opevents section then look for the opevents_contacts attribute. Alternatively, you can configure contacts within the NMIS GUI shown below.

  1. Follow Configure in opEvents by following the Wiki guide to assist in setting up your Contacts - Configure Contacts
  2. Alternatively create Contacts within the NMIS GUI.
    a. Navigate to NMIS menu -> Setup -> Contact Setup
    b. Click 'add' next to Action > add
    c. Enter relevant information, click Add at the bottom to confirm.
    Image Added

Creating your policy

The action policy is configured in /usr/local/omk/conf/EventActions.nmis, primarily in the section named policy. The policy consists of any number of nested if-this-then-that clauses, which specify the conditions an event must conform to and what actions to take in case of a match. Further configuration sections specific to particular actions can be present in the same file. It may be helpful to look at the default policies in the file to get an idea of how to structure your own.

  1. Edit the /usr/local/omk/conf/EventActions.nmis file with your desired text editor.
    a. View the example listed on this page - Event Actions and Escalation Policy example
    b. vi /usr/local/omk/conf/EventActions.nmis
    c.