### Policy Management

TSAM provides comprehensive monitoring behavior control based on the Tuxedo infrastructure. Policy Management allows you to do the following:

- Organize monitoring requirements into significant and useful monitoring policy set solutions
- Manage monitoring policy sets (including import, export and usage tracking)
- Define monitoring policy set entries for Tuxedo components
- Selectively enable and disable real-time communication with monitored Tuxedo back end components

#### Monitoring Policy Sets Management

The Policy Management page allows you to Create, Edit, Clone, Import, and Delete monitoring policies. Table 1-5 lists the Monitoring Policy Sets Management page properties.

Table 1-5 Monitoring Policy Sets Management Page
Name | Description
--- | ---
Latest Used Policy Set | TSAM tracks the usage of a defined monitoring policy set. The "latest used" lists the last policy set applied Tuxedo.Editing a policy does not impact this value.
Available Policy Sets | TSAM stores user defined policy sets on the server. All current available policy sets are listed. The directory which holds the policy set definition can be customized using the TSAM Web application file `tsam.config.schemesdir` in the `web.xml`.
Name | Name of the policy set.
Last Modified Time | Displays last time the policy set was modified
Create | Creates a new monitoring policy set
Edit | Edit an existing monitoring policy set. Only one monitoring policy can be selected at a time.
Clone | Creates a new monitoring policy set by cloning the contents of an existing one. Only one monitoring policy can be selected at a time. The policy set Name and Description attributes will not be copied.
Import | Imports a policy set definition file from desktop and upload to server.
Delete | Deletes one or multiple policy sets

Table 1-6 lists the Monitoring Policy Set File Format properties.

Table 1-6 Monitoring Policy Set File Format
Element Name | Description
--- | ---
TSAM_POLICY | Root tag name of the policy set definition file
NAME | Name of policy set
DESCRIPTION | Policy Set description string
POLICY | A policy in a policy set. You can define multiple polices.
TUXOBJECT | Sub-element of POLICY. It represents which Tuxedo backend policy is impacted by the policy. Its format is: `Domain Machine Group Server` "Any" is a built-in key word which means any sub-components under the current component. For example, "`TUXDOM1 Any APPGRP Any`" indicates all servers in the "APPGRP" group of domain "TUXDOM1" are applied to the monitoring policy/
DEFINITION | The monitoring definition string. Has the same format as TMMONITOR. For more information, see Using TSAM Agent in the Tuxedo System and Application Monitor (TSAM) User's Guide.
Note: | Typically, you will not need to use this element.
STATUS | Indicates policy status. 1 indicates the policy is applied to a Tuxedo application. 0 indicate the policy is not applied.
COMMENTS | Comment string

Notes: Typically, you do not need to edit the policy set definition file. It is only referenced for special usage (for example, using a policy set definition to be generated with third party software).

#### Define a Monitoring Policy Set

Clicking Create, Edit, or Clone displays the Policy Set Definition page. Table 1-7 lists the Policy Set Definition page properties.

##### Monitoring Policy Set Entry Management

Table 1-7 Monitoring Policy Set Entry Page
Name | Description
--- | ---
Monitoring Policy Set | Displays current policy set information
Name | Name of the policy set. Name is required for "Create" and "Clone". "Edit" does not allow name change.
Description | General policy set description
Overwrite Existing Policy Set | By default, "Create" and "Clone" fail if a policy set exists with the same name. Selecting this check box allows an existing file to be overwritten.
Save | Saves current policy set changes. When policy set contents change, the save button is highlighted. I f a policy set is closed before saving changes, the changes are lost.
Back | Returns to the Policy Management page
New | Creates a new policy
Edit | Edit a selected policy. Only one policy can be selected for editing at a time.
Enable | Initiates policy setting for Tuxedo components. If a policy is already "Enabled", no action is performed.
Disable | Disables monitoring of a Tuxedo component. Cancels all monitoring settings even if the same component is covered by other Policy Management entries.
Delete | Deletes the selected policy set.
No. | The sequence of a policy in current policy set. It is auto-increased when a new policy is added.
Latest Action | Displays the policy set status. "Enabled" indicates the policy has been successfully applied to a Tuxedo application. "Disabled" indicates the policy is not applied a Tuxedo application.
Tuxedo Component | Specifies the Tuxedo component that the policy applies to. For example, "`Domain[TUXDOM1]/Machine[windows]/Group[APPGRP]/Server[simpserv:1]`" indicates the following: Tuxedo domain "TUXDOM1" Machine "windows" Group "APPGRP" application server "simpserv" server ID "1" "Any" indicates all sub-elements of the component are selected. It is generated by the Tuxedo Object Selection panel
Specification | The TMMONITOR specification string for this policy. It is generated by the Policy Management Definition panel. For more information, see Using TSAM Agent in the Tuxedo System and Application Monitor (TSAM) User's Guide.

S

##### Define a Policy

To define a policy, do the following steps:

1. Select the Tuxedo component to be monitored
2. Select the monitoring policy for the selected Tuxedo component

The Policy Definition page consists of the Tuxedo Component section and the Policy Management Definition section.

Table 1-8 lists the Tuxedo Component properties.

Table 1-8 Tuxedo Component
Name | Description
--- | ---
Domain | Lists the current available Tuxedo domains. Only one domain can be selected per policy.
Machine | Lists the current available machines in the selected Tuxedo domain. "Any" indicates that all the machines in the domain are candidates for monitoring control.
Group | Lists the current available groups for a selected machine. "Any" indicates all available groups in this domain are listed.
Server | Lists the current available servers in the selected group. A specific server only can be selected when a particular group is selected. The server format is "server name:server id".

The Policy Management Definition page allows you to select the Tuxedo application type to want to monitor. There are four Tuxedo application types:

- Call Path
- Service
- System Server
- Transaction

Table 1-9 lists the Policy Management Definition properties.

Table 1-9 Policy Management Definition
Name | Description
--- | ---
Enable Check box | Click any or all of the four application check boxes to enable a specific application for monitoring.
Call Path Ratio | The TMMONITOR."appratio" policy. It accepts a value range of 1-65535. It indicates that monitoring is started among how many requests. The default value is "1" indicating each request is monitored.
Call Path Interval | The TMMONITOR "appinterval" policy. It accepts a value range of 0-65535. It indicates a period of time (in seconds) that monitoring can be started. It is exclusive of ratio settings. The default value is "0" indicating that a time interval does not take effect.
Call Path No Log | Click this check box to enable the TMMONITOR "appnolog". The purpose of this policy is to reduce the overhead cause by monitoring at maximum level. `tpgetcallinfo()` can still be used to retrieve monitoring information.
Call Path Bridge Decode | Click this check box to enable the `BRIDGE` process involved in the call path monitoring. By default, `BRIDGE` will not decode the application message. If this policy is specified, `BRIDGE` decodes the application message and log the performance metrics.
Note: | If the network load is heavy, `BRIDGE` performance is significantly affected.
Service Ratio | The TMMONITOR "svcratio" policy. It accepts a value of 1-65535. The default value is "1" indicating each service invocation is monitored.
Service Interval | The TMMONITOR "svcinterval". It accepts a value of 0 - 65535. It indicates a period of time (in seconds) that monitoring can be started. It is exclusive of ratio settings. The default value is "0" indicating that a time interval does not take effect.
System Server Interval | The system server monitoring data collection interval (in seconds). It accepts a value of 30-65535. The default value is "300" indicating that for every 300 seconds, data collection occurs in the monitored system servers.
Transaction Ratio | The TMMONITOR "tranratio" policy. It accepts a value of 1-65535. The default value is "1" indicating that every Transaction routine is monitored.
Note: | To guarantee a complete transaction trace, we do not recommend changing the default value

For more information, see Using TSAM Agent in the Tuxedo System and Application Monitor (TSAM) User's Guide.

When you have completed your Policy Definition page selection, click Save for your selections to take effect.

Table 1-10 Save Entry and Comments
Name | Description
--- | ---
Save | Saves the selected policy to the current policy set. The new policy is disabled by default
Comments | Adds a comment to the policy

#### Import a Policy Set from Local Desktop

Click the Import button. The Import Policy page is displayed.

Table 1-11 lists the Import Policy page properties.

Table 1-11 Import Policy Page
Name | Description
--- | ---
File Name | The file name on local desktop
Browser... | Browse for a file on the local desktop
Overwrite | Click this checkbox to overwrite the policy set with imported file with the same name. By default, the uploaded file is not accepted if a policy set with the same name already exists.
Upload | Uploads the file from the desktop.
Close | Closes the import panel.

Note: | If an invalid policy set file is uploaded, an error message is displayed.

#### Monitoring Policy Set Limitations

- TSAM does not check for Tuxedo component entries that overlap in the same or different policy set. Policy sets are applied to Tuxedo components in the order they are created.
- Disabling a Tuxedo component policy also disables all other policy settings for that Tuxedo component.
- Since TMMONITOR is also a mechanism that can be used to control monitoring behavior, TSAM does not guarantee consistency between TSAM monitoring policy settings and TMMONITOR settings.

For more information, see Using TSAM Agent in the Tuxedo System and Application Monitor (TSAM) User's Guide.