17.2 Action Plug-Ins

You can download action plug-ins from the Sentinel Plug-in Web site.

Action plug-ins are frequently included in Solution Packs. Also, JavaScript actions used in Execute Script actions in versions of Sentinel before Sentinel Rapid Deployment can be converted to action plug-ins by using the Action Manager.

17.2.1 Importing JavaScript Action Plug-Ins

JavaScript plug-ins from Novell or other sources can be imported into Sentinel.

  1. Click Tool > Action Manager. The Action Manager window displays.

  2. Click Manage Plugins. The Action Plugin Manager window displays.

  3. Click the Add icon on the top left corner to import plug-ins. The Plugin Import Type window displays.

  4. Select Import an Action plugin file (.zip). Click Next.

    The Choose Plugin Package File window displays.

  5. Browse to a location of the plug-in package file and click OK, then click Next.

    If the file you have selected is not the proper format, the Next button does not activate.

    If you are updating an already-imported plug-in file, you are provided with the option of updating the existing plug-in, going back and selecting a different plug-in, or canceling the import.

  6. If you want to continue, click Next.

    The Plugin Details window displays. Details of the plug-ins to be imported are displayed.

  7. Click Finish.

17.2.2 Importing JavaScript Files

Although JavaScript action plug-ins can be obtained from Novell, it is also possible to create and manage your own JavaScript action plug-ins. Plug-ins can be created by using JavaScript files that were used in the Execute Script command in versions prior to Sentinel Rapid Deployment, or they can be created using any JavaScript file written by using the Sentinel JavaScript API.

NOTE:For information about the API for developing JavaScript scripts for Sentinel correlation, see Sentinel JavaScript Action API on the Novell Developer Community Web site .

After you import a JavaScript file into Sentinel, a JavaScript action plug-in is created and stored in the central plug-in repository. Then the action plug-in can be used to configure an action instance. Unlike the Sentinel 6.0 Execute Script command, the JavaScript file does not need to be manually moved to a specific directory location.

When you import a JavaScript file from a directory, it is important to define the required objects correctly so the JavaScript actions that use the plug-in are available in the right parts of the Sentinel Control Center interface. The following table shows the Required Objects options in the import wizard and where the actions are available if those options are selected.

Table 17-1 Required Objects

Required Object

Actions Available for Selection in these Contexts:

Event Menu Configuration

Deploy Correlation Rule

Associate with Create Incident Correlation.Action

Execute Incident Action

None

Yes

Yes

Yes

Yes

Event

Yes

Yes

Yes

Yes

Correlation Rule

No

Yes

Yes

Yes

Incident

No

No

Yes

Yes

To import JavaScript files:

  1. Click Tool > Action Manager. The Action Manager window displays.

  2. Click Manage Plugins. The Action Plugin Manager window displays.

  3. Click the Add icon on the top left corner to Import plug-ins. The Plugin Import Type window displays.

  4. Select Import an Action plugin from directory. The Choose JavaScript Directory window displays.

  5. Browse to a location of the JavaScript Plug-in directory and click OK, then click Next.

  6. The Action Plugin Detail window displays. Provide the required information. Attach a main JavaScript file and a help file.

    If the file you have selected is not the correct format, the Next button does not activate.

    When you are updating an already-imported JavaScript file, you are provided with the option of updating the existing plug-in, going back and selecting a different plug-in, or canceling the import.

  7. If you want to continue, click Next.

    The Required Input window displays.

  8. Select the objects that the JavaScript action requires.

    This affects where the action is available in the interface. For more information, see the Table 17-1.

  9. Click Next. The Plugin Parameters window displays.

  10. [Optional] Click the Add button to add parameters that can be set when an action is configured.

    This option should be used for any JavaScript files that expect to receive parameterized information. The Parameter Definition window displays.

    1. Specify the parameter name.

      The name used here should be identical to one used in the JavaScript API method scriptEnv.getParameter in the script that is being imported.

    2. Select parameter name from Type drop-down list.

      The various parameter types available are:

      • String: Accepts the sting values for the parameters.

      • Boolean: The parameter can take a True or False value.

      • Integrator: Select Integrator name for the parameters.

      • Event Tag: Select an Event Tag for the parameters.

      • Severity: Select the Severity for the parameters.

      NOTE:The Options area is only available for string-type parameters.

    3. (Optional) Specify a description.

    4. Click Next.

      The Plugin Details window displays. Details of the plug-ins to be imported are displayed.

  11. Click Finish.

If the directory from which the JavaScript file is imported contains a package.xml file, the system updates the package.xml file with the information defined in the wizard. If no package.xml file exists in the directory, a new package.xml file is automatically created.

An action plug-in is also created from the JavaScript file. The package.xml file is zipped as part of the JavaScript plug-in along with other files in the specified directory.

NOTE: When a plug-in is created from a directory, the original contents of the directory are stored in a backup .zip file located on the same directory level as the directory being zipped. The name of the backup file is in the format <Directory Name>_<Randomly Generated Number>_bak.zip where <Directory Name> is the directory in which the plug-in is created.

The following is the example of package.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<JavaScriptActionPackage>
 <ID>FA6944D0-DC43-102A-976F-001321B5C0B3</ID>
 <Name>Example JavaScript Plugin</Name>
 <Type>JAVASCRIPT_ACTION</Type>
 <DisplayName>Example JavaScript Plugin</DisplayName>
 <Author>Novell Engineering</Author>
 <Version>61r1</Version>
 <ReleaseDate>1206414663439</ReleaseDate>
 <MainScriptFile>example.js</MainScriptFile>
 <Description>An example JavaScript Action plugin.</Description>
</JavaScriptActionPackage>

NOTE:When a plug-in is created from a JavaScript file and an existing package.xml file, the package.xml file is updated with the list of files contained in the package, hash codes, current dates, and so on.