Add or Edit Adaptive Response Action FilesThe adaptive response feature allows you to set thresholds for acceptable and unacceptable performance, and specify command-file action scripts to run when these thresholds are reached. These action files of CLI commands can make automatic changes, often correcting problems before users are ever impacted. The action file scripts can also be configured to send notifications via email, syslog, and SNMP traps. Once the agent status returns to normal, a second action file can undo the changes, or run additional commands. The steps for creating and editing action files differ depending on whether you intend them to run on a unit in local (standalone) mode, or a unit in shared mode assigned to a PolicyCenter configuration. A PacketShaper in local mode requires just one instance of each action file, and so its action files can be created and edited directly on the unit. When a PacketShaper is in shared mode, its action files must reside on both the unit's hard drive and the PolicyCenter server. PolicyCenter action files should be created on the PolicyCenter server first, and then distributed to PolicyCenter configurations and units. PolicyCenter Action File PortfoliosPolicyCenter also requires that action files be grouped into portfolios,
folders containing one or more action files that can be prescribed to
a PolicyCenter configuration and its assigned units. If you are creating
your first PolicyCenter action file, or a new portfolio of files, you
may need to create a new <install_directory>/Packeteer/PolicyCenter/publish/agent/<portfolio_name>
folder on your PolicyCenter server with the Windows Explorer utility.
Create a directory structure with one or more portfolios of action files
(for example, <install_directory>/Packeteer/PolicyCenter/publish/agent/actndir1
and <install_directory>/Packeteer/PolicyCenter/publish/agent/actndir2)
that each contain one or more action files. A portfolio name can be up
to eight characters long, including 0-9, a-z, A-Z, -,_, and . (period).
Spaces are not allowed in a portfolio name, and you will not be able to
prescribe a portfolio unless that portfolio folder contains at least one
action file. Every PolicyCenter action file you create should have a unique name, regardless of what portfolio it is in. (For example, you shouldn't create the file ../publish/agent/prtfolo1/action.cmd if there is an existing file ../publish/agent/prtfolo2/action.cmd.) If you give a new action file the same name as an existing action file, prescribing the new action file will overwrite the existing file on both the unit and any PolicyCenter configuration that uses that file. Note: If you wish to distribute action files that are currently on a PacketShaper but not yet on the PolicyCenter server, FTP the action files from the PacketShaper directory 9.258/agent/cmd into the PolicyCenter directory ../PolicyCenter/publish/agent/<portfolio_name>, then use the action file distribution feature. Creating a New Action FileAction files must be stored in your PacketShaper's 9.258/agent/cmd directory or if you are using PolicyCenter, in the <install_directory>/Packeteer/PolicyCenter/publish/agent/<portfolio_name> directory. Packeteer's File Browser utility has a facility for creating command files. Use one of the following ways to access the File Browser:
The second method offers two advantages. First, it automatically stores the action file in the proper place. (You don't have to navigate to the directory). Second, after creating the action file, you are on the right screen for supplying the red or green action filename. The steps below use this method. To create a new action file: 1. Click the setup tab and click the Adaptive Response Settings link. 2. Click the edit button next to the agent for which you want to create the action file. 3. Click the browse files button. The File Browser window opens and shows the contents of the 9.258/agent/cmd directory (where action files need to be stored). In PolicyCenter, navigate to the desired portfolio (<install_directory>/Packeteer/PolicyCenter/publish/agent/<portfolio_name>). 4. Click the new cmd file button. A command file window opens. 5. In the File Name field, enter a unique name for your action file up to eight characters long, including 0-9, a-z, AZ, -,_, and . (period). Spaces are not allowed. Example: red-def.cmd 6. In the Contents area, enter the CLI commands for
your action file. See Action
Files Overview for lists of variables you can include. 7. Click save. 8. Enter the name of your action file in the Red Action File or Green Action File field. You must include the .cmd file extension. 9. Click OK. 10. (For PolicyCenter only) You must now prescribe the portfolio with the new action file to a PolicyCenter configuration. See Distribute Action Files for details on distributing action files to PolicyCenter configurations and units in shared mode. Action Output FilesAfter action files have run, an output file is created in the unit directory 9.258/agent/cmd/complete. The output file has the same name as the action file, but with a numbered file extension (for example, red-host.17). Here's an example output file:
Editing an Action FileYou can edit an action file directly on an individual unit in local mode, or, for action files for a PolicyCenter configuration, from the PolicyCenter browser interface. Remember, units in shared mode require that its action files reside on both the unit's hard drive and the PolicyCenter server. After you edit a file on the PolicyCenter server, you must use the file distribution feature to resend the updated file to the units assigned to that configuration. 1. To edit an action file on a unit in local mode: Click the info tab, and click the file browser button. Navigate to the folder 9.258/agent/cmd. -or- To edit an action file for a unit in shared mode using a PolicyCenter configuration: Access the PolicyCenter browser interface, click the file browser button on the info tab, and navigate to the folder <install_directory>/Packeteer/PolicyCenter/publish/agent/<portfolio_name>. 2. Click the edit button by the name of the action file you want to change. The action file will open in a separate browser window. 3. Make the desired changes, then click save. 4. (for PolicyCenter only) Use the file distribution feature to distribute the updated action file from the ../publish/agent/<portfolio_name> directory to individual PacketShapers and their PolicyCenter configurations. Another way to edit an action file is to access the File Browser utility when editing the agent. This technique is explained in the Creating a New Action File section. Reset Action File Parameters on an AgentWhen you add user-defined variables to an action file, you must reset the parameters for the agent in order to get the new variables to appear on the Edit Agent Entry page. For example, suppose you include the following CLI command in a red action file:
These variables (EmailAddress, Subject, and Message_to_admin) will not appear on the Edit Agent Entry screen until you reset the parameters. 1. To reset an action file on a unit in local mode: Access the unit's browser interface. -or- To reset an action file for a unit in shared mode using a PolicyCenter configuration: Access the PolicyCenter browser interface. Click the Editing Configuration drop-down list, and select a configuration with an agent that references the updated action file. 2. Click the setup tab and click the Adaptive Response Settings link. 4. From the Adaptive Response page, click the edit button beside the agent with the changed action file. 5. Click the Reset parameters from the (red/green)
action file checkbox. A pop-up window will appear, warning that resetting
the action file parameters will clear all of their values and reload the
parameter list. Click OK on the pop-up, then click OK on
the Edit Agent Entry window. 6. The new action file parameters have been recognized, but because all parameter values were cleared in the process, you must now reassign values to the user-defined parameters in that file. Click the edit button beside the agent name again to reopen the edit agent entry window. 7. The variables on the reset red or green action
file will display the value Not Set. Enter the desired values for
these variables, then click OK. See also: Distribute Action Files ( For PolicyCenter / PacketShapers in shared mode only)
|
PacketGuide™ for PacketWise® 7.5