This chapter provides details on monitoring Oracle Communications Mobile Synchronization Gateway.
Mobile Synchronization Gateway uses a managed bean (MBean) created in Oracle GlassFish Server to collect monitoring data. By using the GlassFish Server's Java Management Extension (JMX) interface, you can then access this data by using a JMX-compliant client. The JMX client connects to the platform's MBeanServer by using a JMX Service URL. Once a client connects to the MBeanServer, it uses the Mobile Synchronization Gateway monitoring MBean object name to access the MBean's attributes.
This section describes the attributes of the Mobile Synchronization Gateway monitoring MBean object name, com.sun.comms.mobile.eas:type=monitor.
Table 4-1 describes the general monitoring attributes.
Table 4-1 General Monitoring Attributes
Name | Type | Description |
---|---|---|
FailedLogins |
Integer |
The number of failed login attempts since the server was started. |
MQBackends |
TabularType Map<K,V> TabularData (BackendConnectionData) |
A dynamic collection of connection status data of back-end hosts, provided in a Map interface, that is, Map<String backendID, BackendRTData rtData>. |
BackendRTData |
TabularType Map<K,V> TabularData (BackendRTData) |
A dynamic collection of response time data of back-end connections, provided in a Map interface, that is, Map<String backendID, BackendRTData rtData>. |
Table 4-2 describes the Mobile Synchronization Gateway back-end host monitoring attributes.
Table 4-2 Back-End Host Monitoring Attributes
Name | Type | Description |
---|---|---|
backendID |
String |
Name ID of this back-end, in the format of BackendType-HostName. For example, a Messaging Server host providing an IMAP service looks like the following: IMAP-sc111.example.com |
hostUri |
String |
URI of the host, for example, sc111.example.com:7676. |
message |
String |
Optional exception or informational message from this back-end host. |
connectionStatus |
Integer |
The standard integer code that enumerates the status of the back-end host. The possible values are:
|
timestamp |
Long |
The system time that this JMX request was issued. |
Table 4-3 describes the back-end database average response time monitoring attributes.
Table 4-3 Back-End Database Average Response Times Monitoring Attributes
Name | Type | Description |
---|---|---|
backendID |
String |
Name ID of this back-end, in the format of BackendType-HostName. For example, a Messaging Server host providing an IMAP service looks like the following: IMAP-sc111.example.com |
message |
String |
Optional exception or informational message from this back-end host. |
resptime |
Long |
Response time of simple back-end host requests in milliseconds. |
timestamp |
Long |
The system time at which this request was issued. |
Mobile Synchronization Gateway itself does not provide a client to access the monitoring data. Instead, you can use any Java Management Extension (JMX) client.
To access the monitoring data, a JMX client needs the following information:
GlassFish Server host name or IP address
GlassFish Server administration port number
GlassFish Server administrative user name and password
MBean ObjectName, which is com.sun.comms.mobile.eas:type=monitor
Attribute names
You connect a JMX client to the GlassFish Server's MBeanServer by using a JMX Service URL of the following form:
service:jmx:rmi:///jndi/rmi://host:port/jmxrmi
where:
host is the name or IP address of the GlassFish Server
port is the GlassFish Server administration port number
More information on JMX and JMX clients is available on the Java documentation web site at:
In addition to using monitoring data gathered by the Mobile Synchronization Gateway monitoring MBean, you can also check the health of your hosts by using the Mobile Synchronization Gateway supplied responsetime script. This script sends a set of basic requests to Mobile Synchronization Gateway and measures the amount of time needed to process those requests. When the responsetime script shows a spike or a large increase in response time, this indicates a potential issue with Mobile Synchronization Gateway that must be addressed.
To run the responsetime script, you must provide the server type (mobilesync_gateway), the GlassFish Server host name and port, and an LDAP user account to run the script. When the script finishes, it displays the number of milliseconds needed to run the series of requests to stdout. When the script encounters no problems, it returns an exit status of 0. If the script encounters a problem, it returns an exit status of 1 to stderr. See "responsetime Script Error Codes" for a list of error codes and descriptions.
Use the responsetime script to check the health of your Mobile Synchronization Gateway hosts.
responsetime -t mobilesync_gateway -H host -p port [-s path_of_truststore] [-x context_root] [-L locale] [-h]
Table 4-4 describes the options.
Table 4-4 responsetime Script Options
Option | Description |
---|---|
-t |
Specifies to monitor Mobile Synchronization Gateway (mobilesync_gateway). |
-H |
Specifies the GlassFish Server host name. |
-p |
Specifies the GlassFish Server administrative port. |
-s |
Specifies the path to the truststore file, if a secure connection is used. |
-x |
Specifies the context root for Mobile Synchronization Gateway. The default is / (root). |
-L |
Specifies the language locale to use to display messages. The format is LL_CC_VV, where:
|
-h |
Displays usage help. |
The responsetime script requires that you stream the following user name and password, each on a separate line, to the script by using stdin:
RT_USER=user
RT_PWD=password
The responsetime script uses HTTP to perform a folder synchronization with Mobile Synchronization Gateway then measures the amount of time needed to process the request.
For information on creating a dedicated user account for RT_USER, see "Creating a Dedicated User Account for the responsetime Script".
Table 4-5 describes the responsetime script error codes and descriptions.
Table 4-5 responsetime Script Error Codes
Error Code | String | Description |
---|---|---|
200 |
Ok |
The request succeeded and the amount of time, in milliseconds, is displayed to stdout. |
201 |
Application server is down. |
The responsetime script cannot connect to the GlassFish Server host. |
202 |
Mobile Synchronization Gateway is down or server path not found. |
The responsetime program had trouble sending a request to the GlassFish Server host. |
204 |
Login failure. |
A problem occurred when trying to log in to the GlassFish Server host. |
205 |
Invalid user name or password. |
Either the user name or the password was invalid. |
206 |
Invalid server type. |
The value of the -t option provided was invalid. |
207 |
Response Time request failed. |
A problem occurred when a request was made to the GlassFish Server. |
208 |
Unable to find truststore file. |
The truststore file was not found or could not be accessed. |
209 |
Unable to create resource. |
A problem occurred when creating the monitoring event. |
210 |
Unable to locate or open messages resource bundle. |
A problem occurred when accessing the localization resource bundle. |
211 |
Invalid option: |
An invalid option was entered on the command line. |
212 |
The "{0}" option is required. |
A required option was not entered on the command line. The "{0}" string is replaced in the message with the name of the missing option. |
The following example shows how to invoke the responsetime script and run it by using csrtuser as RT_USER.
#!/bin/sh
#
echo "RT_USER=csrtuser\nRT_PWD=password" | sbin/responsetime -t mobilesync_gateway -H sc11.example.com -p 8080 -x /
bash> example_csrt.sh
1374
bash>
The responsetime script requires a user account in LDAP to be specified in the RT_USER variable. You should create a dedicated user account for the responsetime script to use. Create this user by using the Mobile Synchronization Gateway config-rtuser script, which is located in the MobileSyncGateway_home/sbin directory. The config-rtuser script creates the user in LDAP.
To create a dedicated user for the responsetime script by using the config-rtuser script:
Log in to the Mobile Synchronization Gateway host as root.
Change to the MobileSyncGateway_home/sbin directory.
Run the config-rtuser script:
config-rtuser
Respond to the prompts for user account and password, LDAP unique identifier attribute, Directory Manager password, and GlassFish Server administrative password.
When prompted to proceed, type Y.
The script runs the ldapmodify command to create the user account.