Management Rules alert you to system usage issues and help you manage log files and JDBC connection pools. The general steps for configuring a management rule are as follows:
Select the Management Rules node in the left pane of the Admin Console.
Select the rule you wish to configure from the table.
Select the Add button to display the rule's Edit page.
Check the Email Notifications Enabled box if the rule has one.
If you do not check this box, alerts are written to the server log only. All rules have this box except the Log Rotation Manager and JDBC Pool Manager.
Supply the following information for email notifications.
Recipients — Specify the comma-separated email addresses of the recipients of the alert.
Use Java Mail Resource — Specify the JavaMail resource if you are using one. To set up a JavaMail resource, see Configuring a JavaMail Resource.
From Email — Specify the email address of the sender of the alert if you are not using a JavaMail resource.
Mail Hostname — Specify the same mail server hostname if you are not using a JavaMail resource.
Username — Specify the username of the sender of the alert if you are not using a JavaMail resource.
Sender Password — Specify the password or password alias of the sender of the alert if you are not using a JavaMail resource.
To create a password alias, use the asadmin create-password-alias command. For details, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.
Supply the specific information that the rule requires.
The following sections briefly describe the specific information required for each rule.
Specify the target server instances or clusters to which to apply the rule. To specify a target, select the target in the Available Targets list and select the Add button to move it to the Selected Targets list.
The JavaMail resource must have at least the same targets as the management rules that use it.
Select the Save button.
Restart each target server instance or cluster.
The Physical Memory Alert rule sends an alert when the percentage of physical memory that is free goes below a user-defined threshold.
The Physical Memory Alert rule includes the following rule-specific settings:
User Threshold — Specify the percentage of free physical memory below which an alert is sent. The default is 15.
Sampling Frequency — Specify the frequency at which physical memory is checked in seconds. The default is 30.
For general steps on how to configure a rule, see Using the Management Rules.
The Memory Leak Alert rule sends an alert when a possible memory leak is detected. Detection is done through trend analysis of percent memory usage after garbage collection (GC). An alert is sent when the post-GC memory usage exceeds a user-defined threshold.
The Memory Leak Alert rule includes the following rule-specific settings:
Number of Samples — Specify the number of samples used to determine a moving average value for post-GC memory usage. The default is 10.
User Threshold — Specify the percent memory usage after GC above which an alert is sent. The default is 85.
For general steps on how to configure a rule, see Using the Management Rules.
The CPU Usage Trend Alert rule sends an alert when trend analysis of the percent CPU usage indicates an increase above a user-defined threshold.
The CPU Usage Trend Alert rule includes the following rule-specific settings:
Sampling Frequency — Specify the frequency at which the CPU is checked in seconds. The default is 30.
User Threshold — Specify the percent CPU usage above which an alert is sent. The default is 65.
Number of Samples — Specify the number of samples used to determine a moving average value for CPU usage. The default is 10.
For general steps on how to configure a rule, see Using the Management Rules.
The JVM Throughput Alert rule sends an alert when the percentage of virtual machine (VM) uptime that is time-averaged elapsed GC time exceeds a user-defined threshold.
The JVM Throughput Alert rule includes the following rule-specific settings:
User Threshold — Specify the percentage of virtual machine (VM) uptime that is time-averaged elapsed GC time above which an alert is sent. The default is 5.
Sampling Frequency — Specify the frequency at which throughput is checked in seconds. The default is 30.
Number of Samples — Specify the number of samples used to determine a moving average value for throughput. The default is 10.
For general steps on how to configure a rule, see Using the Management Rules.
The GC Pause Time Alert rule sends an alert when the last garbage collection (GC) pause time is above a user-specified percentage of a user-specified maximum GC pause time.
The GC Pause Time Alert rule includes the following rule-specific settings:
Maximum GC Pause — Specify the maximum acceptable GC pause time in seconds. There is no default.
User Threshold — Specify the percentage of maximum GC pause time above which an alert is sent. The default is 85.
For general steps on how to configure a rule, see Using the Management Rules.
The Log Entry Alert rule sends an alert when a new entry is created in the log file at or above a user-specified log level for a user-specified logger.
The Log Entry Alert rule includes the following rule-specific settings:
Log Level — Specify the log level at or above which an alert is sent. The default is WARNING. The other allowed value is SEVERE.
Logger — Specify a comma-separated list of loggers for which alerts are sent. Make sure that each logger exists on the target servers or clusters. These can be any Enterprise Server loggers or application loggers. Full logger names must be specified. For example, javax.enterprise.system.core.selfmanagement specifies the Enterprise Server's self-management logger. To specify all WARNING and SEVERE messages for all loggers, enter * (an asterisk) by itself. There is no default.
Make sure that the logger exists on the target servers or clusters.
The Log Levels page in the Admin Console lists all Enterprise Server loggers and their full names. In the left pane, select the Logger Settings for your configuration and then select the Log Levels tab.
For general steps on how to configure a rule, see Using the Management Rules.
The Log Rotation Manager rule moves or deletes rotated log files.
The Log Rotation Manager rule includes the following rule-specific settings:
Delete — Check this box to delete log files when the threshold is exceeded. The default is unchecked.
Move to Directory — Specify the directory to which log files are moved when the threshold is exceeded. This must be an absolute path accessible from the target servers or clusters. There is no default.
Rotation Policy — Specify the type of threshold for deleting or moving log files. The default is Number of Files. Other allowed values are Size Limit and Time.
Number of Files — Specify the number of log files above which log files are deleted or moved. Applicable only if the Rotation Policy is Number of Files. The default is 5.
Maximum Size — Specify the maximum log file size above which log files are deleted or moved. Applicable only if the Rotation Policy is Size Limit. There is no default.
Time — Specify the number of hours above which log files are deleted or moved. Applicable only if the Rotation Policy is Time. There is no default.
Frequency Check — Specify the frequency at which log files are checked in the desired units (days, hours, minutes, seconds, or milliseconds). The default is 1 day.
For general steps on how to configure a rule, see Using the Management Rules.
The JDBC Pool Manager rule tunes a JDBC connection pool's values for Maximum Pool Size (max-pool-size) and for Initial and Minimum Pool Size (steady-pool-size). These recalculations happen only during runtime, and absolute recalculated values are not reflected anywhere. In production environments, recalculations are based only on the number of client requests for Initial and Minimum Pool Size, and only on server instance addition or deletion for Maximum Pool Size.
The JDBC Pool Manager rule includes the following rule-specific settings:
Default Max Connections — Specify the default maximum connection pool size setting for pools with no pool-specific setting. The default is 32.
Sampling Frequency — Specify the frequency in seconds at which JDBC connection pools are checked for the number of connections. The default is 60.
Number of Samples — Specify the number of samples used to determine a moving average value for the number of connections. The default is 5.
JDBC Pools Table — Either check the box next to * (applies to All Current and Future JDBC Connection Pools) or check boxes next to individual connection pools. For each selected pool, enter a Max Connections value or leave Max Connections blank to use the default.
Do not select both * (applies to All Current and Future JDBC Connection Pools) and individual connection pools. The Max Connections setting for * (applies to All Current and Future JDBC Connection Pools) overrides the Max Connections settings for individual connection pools.
All the Max Connections settings in this rule, including Default Max Connections and the Max Connections settings for individual pools, override the Maximum Pool Size settings for the JDBC connection pools.
For general steps on how to configure a rule, see Using the Management Rules.