16.3 Action Plugins

You can download Action plugins from the Sentinel Content Web site.

Action plugins are frequently included in Solution Packs. Also, JavaScript actions used in Execute Script actions in versions of Sentinel before Sentinel 6.1 can be converted to Action Plugins using the Action Manager.

16.3.1 Importing JavaScript Action Plugins

JavaScript plugins from Novell or other sources can be imported into Sentinel.

To import Action plugins:

  1. Click Tool menu and select Action Manager. The Action Manager window displays.

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

  3. Click the icon on the top left corner to Import plugins. Plugin Import Type window displays.

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

  5. The Choose Plugin Package File window displays.

  6. Browse to a location of the Plugin package file and click OK. Click Next.

    NOTE:If the file you have selected is not of proper format, the Next button will not activate.

    If you are updating an already-imported plugin 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. If you want to continue, click Next.

  7. The Plugin Details window displays. Details of the plugins to be imported are displayed.

    Click Finish.

16.3.2 Importing JavaScript Files

Although JavaScript Action plugins can be obtained from Novell, it is also possible to create and manage your own JavaScript Action plugins. Plugins can be created using JavaScript files that were used in the Execute Script command in versions prior to Sentinel 6.1, or they can be created using any JavaScript file written 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 plugin is created and stored in the central plugin repository. Then the Action plugin 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 plugin 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 will be available if those options are checked.

Table 16-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 menu and select Action Manager. The Action Manager window displays.

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

  3. Click the icon on the top left corner to Import plugins. 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. Click Next.

  6. The Action Plugin Detail window displays. Provide the required information. Attach a Main JavaScript File and Help File.

    NOTE:If the file you have selected is not of proper format, the Next button will not activate.

    When 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. If you want to continue, click Next.

  7. 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 16-1. Click Next. The Plugin Parameters window displays.

  9. [Optional] Click 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(“name>”) in the script that is being imported.

    2. Select parameter name from Type drop down. The various parameter types available are:

      • String: Accepts the sting values for the parameters

      • Boolean: The parameter can take “True” or “False” value

      • Integrator: Select Integrator name for the parameters

      • Event Tag: Select Event Tag for the parameters

      • Severity: Select Severity for the parameters

      NOTE:The “Options” area is only available for “String”-type parameters.

      [Optional] Specify a description.

      Click Next.

  10. The Plugin Details window displays. Details of the plugins 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 will automatically be created.

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

NOTE: When a plugin 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 will be in the format <Directory Name>_<Randomly Generated Number>_bak.zip where <Directory Name> is the directory in which the plugin 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 plugin 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.