Troubleshooting hypervisor images with console logs
When you create a new hypervisor image, or extend and capture an existing hypervisor image, you can specify which log files or folders to collect for troubleshooting.
The log files or folders that you specify can be collected using
one or more of the following ways:
- Collected by the MustGather script package
- Backed up using the log backup plug-in
- Accessed using the file viewer
To specify which log files or folder should be collected for troubleshooting,
perform the following steps:
- Create a directory named /etc/logging, if it does not already exist.
- Create a JSON file named <component>.json where component is a unique name in /etc/logging to help identify which log files and folders to collect.
- Edit the <component>.json file to contain
the list of files, folders, or folders with patterns to monitor for
log files for a specific role; for example, operating system, middleware,
or other. The following example provides a listing for a role named
OS, where a specific log file named abc.log, everything recursively in the /opt/logs folder, and only files with the .log file extension are monitored.{ "role":"OS", "types": [ { "logtype": "SingleLine", "type": "file", "name": "/log/abc.log" }, { "logtype": "File", "type": "dir", "name": "/opt/logs" },{ "logtype": "File", "type": "dir", "name": "/opt/specificlogs", "pattern":"*.log" } ] }See the following table for a description of the values that you can use forlogtype.Table 1. Values for logtype Logtype name Logtype details File Single file created for log entry. BinaryFile Single binary file created for log entry. SingleLine Each line is a new log entry. MultiLineTimeStamp Single/Multi line entry, where square bracket encased date/time [10/8/10 16:42:54:109 EDT] notes the start of a new entry. "start": "\\[\\d{1,2}/\\d{1,2}/\\d{2}.*\\d{1,2}:\\d{2}:\\d{2}:\\d{3}.*\\w{1,3}\\].*"MultiLineIP Single/Multi line entry, where IP address notes the start of a new entry. "start": "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}.*" - To ensure that the log collection is working as expected, run the MustGather script package on a deployed virtual system using the hypervisor image. The output .zip file should contain the logs and folders that you specified, if they exist on the deployed system.