Versions Compared

Key

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

...

To add a new notification method, you will need to copy the example Perl code which is in the distribution, which should be at /usr/local/nmis8/lib/Notify/mylog.pm, this is a functional notification method.  If you wanted to add something called NetSMS netsms you would copy that file to NetSMSnetsms.pm, so 

Code Block
$ cp /usr/local/nmis8/lib/Notify/mylog.pm /usr/local/nmis8/lib/Notify/NetSMSnetsms.pm

Then you need to edit the file NetSMS.pm and change the following

...

To be the package name for NetSMSnetsms, e.g.

Code Block
package Notify::NetSMSnetsms;

At this point you can run this at test it, you can do this by adding an escalation type, which will be netsms.

Note, NMIS8 will be NetSMSlowercase the escalation data, so all methods for escalations need to be in lower case.

Add a New Notification to Escalations.nmis

...

Code Block
 'default_default_default_default__' => {
   'Event' => 'default',
   'Event_Element' => '',
   'Event_Node' => '',
   'Group' => 'default',
   'Level0' => 'syslog:localhost,json:localhost,NetSMSnetsms:Contact1',
   'Level1' => '',
   'Level10' => '',
   'Level2' => '',
   'Level3' => '',
   'Level4' => '',
   'Level5' => '',
   'Level6' => '',
   'Level7' => '',
   'Level8' => '',
   'Level9' => '',
   'Role' => 'default',
   'Type' => 'default',
   'UpNotify' => 'true'
 },

...