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

Compare with Current View Page History

Version 1 Next »

Introduction

An alert is a custom event generated by testing the value of an OID against a boolean operation.  If the test returns true, an event is raised and it will run through the escalation system.  Later on, when the test returns false again the event will be cleared.

The values required for the alert are:

test => this is a boolean operation using $r to determine if the alert should be raised
event => the name of the event when it is raised
level => the level of the event when it is raised 

Example

The following is an example of the layout of an alert (in this example serialNum is taken from Model-CiscoRouter.nmis).  

'serialNum' => {
  'oid' => 'chassisId',
  'title' => 'Serial Number',
  'alert' => {
    'test' => '$r ne "SomeSerialNumber"',
    'event' => 'Serial Number Invalid',
    'level' => 'critical'
  }
} 

$r in this case is the value of the OID chassisId.  This will raise the event "ALERT: Serial Number Invalid" when the oid chassisId is not equal to "SomeSerialNumber.

  • No labels