Capture troubleshooting information
The AM recording facility lets you initiate events to monitor AM while saving output that is useful when performing troubleshooting.
AM recording events save four types of information:
-
AM debug logs
-
Thread dumps, which show you the status of every active thread, with output similar to a JStack stack trace
-
Important runtime properties
-
The AM configuration
You initiate a recording event by invoking the ssoadm start-recording
command with a JSON file,
or through a REST call with a JSON payload.
The file or payload controls the amount of information AM records,
the duration of the recording, and the location of recording output files.
Recording control file/payload reference
issueID
-
Type: Number
Required. The issue identifier—a positive integer stored internally as a Java
long
data type. A case number is a good choice for theissueID
value.The
issueID
is a component of the path at which recorded information is stored.See Retrieving Recording Information for more information.
referenceID
-
Type: String
Required. A second identifier for the recording event. Use this property to segregate multiple recording events for the same issue.
The
referenceID
is a component of the path at which recorded information is stored.Spaces are not allowed in the
referenceID
value.See Retrieving Recording Information for more information.
Description
-
Type: String
Required. A textual description of the recording event.
zipEnable
-
Type: Boolean
Required. Whether to compress the output directory into a zip file when recording has stopped.
configExport
-
Type: Object
Required. An object containing the following properties:
enable
-
Type: Boolean
Required. Whether to export the AM configuration upon completion of the recording event. Exporting the AM configuration is a best practice, because it is extremely useful to have access to the configuration when troubleshooting.
password
-
Type: String
Required if
enable
istrue
. A key required to import the exported configuration. The key is used the same way that thessoadm export-svc-cfg
command uses the-e
argument. sharePassword
-
Type: Boolean
Required if
enable
istrue
. Whether to show thepassword
value in thessoadm start-recording
,ssoadm get-recording-status
, andssoadm stop-recording
output, and in theinfo.json
file, which is output during recording events, and which contains runtime properties.
debugLogs
-
Type: Object
Required. An object containing the following properties:
debugLevel
-
Type: String
Required. The debug level to set for the recording event. Set the value of
debugLevel
toMESSAGE
to get the most troubleshooting information from your recording period. Other acceptable but less commonly used values areERROR
andWARNING
. autoStop
-
Type: Object
Optional. Contains another object used to specify an event that automatically ends a recording period. For time-based termination, specify a
time
object; for termination based on uncompressed file size, specify afileSize
object. If you specify bothtime
andfileSize
objects, the event that occurs first causes recording to stop.Specifying
fileSize
andtime
objects is a best practice, because it ensures that the recorded output does not occupy a larger than expected amount of space on your file system, and that recording events end in a timely fashion.time
-
Type: Object
Optional; must be specified in the
autoStop
object iffileSize
is not specified. Configures a recording period to terminate recording after this amount of time.timeUnit
:-
Type: String
Required. Acceptable values are
MILLISECONDS
,SECONDS
,MINUTES
,HOURS
, andDAYS
.value
:-
Type: Numeric
Required. Values in
MILLISECONDS
are rounded down to the second. The minimum acceptable value forautoStop
is one second.
fileSize
-
Type: Object
Optional; must be specified in the
autoStop
object iftime
is not specified. Configures a recording period to terminate after the aggregate size of uncompressed debug logs has reached this size.sizeUnit
:-
Type: String
Required. Acceptable values are
B
,KB
,MB
, andGB
.value
:-
Type: Numeric
Required.
threadDump
-
Type: Object
Required. An object containing the following properties:
enable
-
Type: Boolean
Required. Whether to dump threads during the recording event. Thread dumps are especially useful when troubleshooting performance issues and issues with unresponsive servers.
delay
-
Type: Object
Required if
enable
istrue
. Contains another object used to specify an interval at which thread dumps are taken. The initial thread dump is taken at the start of the recording event; subsequent thread dumps are taken at multiples of thedelay
interval.timeUnit
-
Type: String
Required. Acceptable values are
MILLISECONDS
,SECONDS
,MINUTES
,HOURS
, andDAYS
. value
-
Type: Numeric
Required. The minimum acceptable value is one second. Time units that are smaller than seconds, such as
MILLISECONDS
, are rounded to the closest second.
Recording control file/payload example
{
"issueID": 103572,
"referenceID": "policyEvalFails",
"description": "Troubleshooting artifacts in support of case 103572",
"zipEnable": true,
"configExport": {
"enable": true,
"password": "5x2RR70",
"sharePassword": false
},
"debugLogs": {
"debugLevel": "MESSAGE",
"autoStop": {
"time": {
"timeUnit": "SECONDS",
"value": 15
},
"fileSize": {
"sizeUnit": "GB",
"value": 1
}
}
},
"threadDump": {
"enable": true,
"delay": {
"timeUnit": "SECONDS",
"value": 5
}
}
}
The recording control file properties in the preceding example affect the recording output as follows:
Recording Control File Property | Value | Effect |
---|---|---|
|
|
Recording output is stored at the path |
|
|
No effect. |
|
|
Recording output is compressed into a ZIP file. |
|
|
The AM configuration is exported at the start of the recording event. |
|
|
Knowledge of this password will be required to access the AM configuration that was saved during recording. |
|
|
The password is not displayed in output messages displayed during the recording event
or in the |
|
|
Recording enables message-level debug logs during the recording event. |
|
|
Because both the |
|
|
Because both the |
|
|
Thread dumps are taken throughout the recording event. |
|
|
The first thread dump is taken when the recording event starts. Additional thread dumps are taken every five seconds hence. |
The following table shows different tasks related to recording troubleshooting information:
Task or Requirement | Resources |
---|---|
Start and stop recording information Use the |
|
Retrieve information AM stores the troubleshooting information you gathered, so it is ready to be sent to ForgeRock Support representatives. |