Providing a custom command for a policy – HP Storage Essentials Enterprise Edition Software User Manual
Page 424

Managing Policies
386
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
•
Creating Policies for Discovery
•
Creating Policies for Provisioning
•
To set up a custom script for a policy:
1.
Access Policy Manager as described in ”
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.