HP Storage Essentials SRM 6.0 User Guide for Enterprise Edition and Standard Edition SRM Software (July 2008)

Managing Policies386
Providing a Custom Command for a Policy
You can configure Policy Manager to run a custom command on the management server when an
element is being overused or when any of the following occurs:
A new element is discovered
Provisioning is successful
An event occurs on one or more specified elements
The following instructions assume you have already created a policy. If you have not created a
policy, see the following topics:
Creating a Utilization or Backup Policy” on page 373
Creating Policies for Discovery” on page 377
Creating Policies for Provisioning” on page 378
Creating Policies for Events” on page 379
To set up a custom script for a policy:
1. Access Policy Manager as described in ”Accessing Policy Manager” on page 372.
2. Click the Edit ( ) button corresponding to the policy you want to modify.
3. Click Execute Custom Command.
4. Enter a command that will execute the script in the box, and click OK.
The software assumes you are in the %JBOSS4_DIST%\server\appiq\remotescripts
directory on the management server when the script is executed. You can use environment
variables in your script, such as POLICY_NAME and POLICY_DESCRIPTION, where
POLICY_NAME provides the policy name and POLICY_DESCRIPTION provides a description
of the policy. See ”Software Environment Variables for Scripting” on page 296 for more
information.
Prefix the command with “start” if the custom command triggers a user interface component, for
example, Microsoft Internet Explorer or a command prompt window. For example, if you want
the custom command to open a command prompt window and list the contents in the directory,
you would prefix the command as follows:
start dir
5. Click Finish.
Policy Manager executes a remote script on the management server when the condition is
fulfilled.