In VMware Smart Assurance NOTIF, you can write Java classes which can be called during event processing to:

  • Modify the various parameters that are set prior to the notification being created.

    or

  • Instruct VMware Smart Assurance NOTIF to discard the event it is processing.

    To use a custom Java class in the VMware Smart Assurance NOTIF processor:

    1. Write and compile one or more Java classes that implement the notifEventProcessor interface with the following requirements:

    2. Your class must have a default constructor (one that takes no arguments).

    3. The VMware Smart Assurance NOTIF .jar file must be available to your Java compiler when building your class. The .jar file is BASEDIR/smarts/classes/notif.jar.

    4. Package your class or classes in a .jar file.

    5. Install your .jar file into the BASEDIR/smarts/local/classes directory.

    6. Update the Notif-init.asl script to include your .jar file in the CLASSPATH:

    7. Locate the Notif-init.asl file in the BASEDIR/smarts/rules/ics directory.

    8. Use the sm_edit utility to edit the script (or manually copy it to the BASEDIR/smarts/local/rules/ics directory and edit it there).

      Note:

      The VMware Smart Assurance System Administration Guide provides information on how to use the sm_edit utility.

    9. Locate the lines that use add_archive to add the .jar file to the CLASSPATH.

    10. Duplicate one of those lines and replace the name of the .jar file with your own .jar file. Do not specify a path for the .jar file. The VMware Smart Assurance NOTIF/SAM Java class loader is designed to look in local/classes for your .jar file.

    11. Save the file.

    12. Restart the SAM/Adapter Platform server to pick up the changed CLASSPATH.

    13. Add your class name to an ECI in the VMware Smart Assurance NOTIF Editor (the Java field in the Event Options tab as shown in Writing a Java class for use with VMware Smart Assurance NOTIF event processing and save and deploy the new .ncf file.