Skip to content
CA API Gateway - 9.3
Documentation powered by DocOps

View Logs for the Gateway

Last update December 18, 2017

The CA API Gateway maintains a comprehensive set of logs that can help you troubleshoot issues.

Viewing Logs on the Appliance Gateway using the Menu

The easiest method is to view the logs from the Gateway appliance's main menu.

To view logs on the Gateway appliance using the menu:

The following table describes each log option. Tip: Type q to exit a log.

Option Description
View system logs

Use this option to view the various system logs:

  • View main log: Displays the logs from /var/logs/messages.*
  • View security log: Displays the logs from /var/log/secure.*
  • View command log: Displays the logs from /var/log/bash_commands.log.*
  • View MySQL log: Displays the log from /var/log/mysqld.log
View Gateway logs

Use this option to view the various Gateway logs:

  • View node log: Displays the default logs from:
    /opt/SecureSpan/Gateway/node/default/var/logs/ssg_X_0.log
  • View host log: Displays the logs from:
    /opt/SecureSpan/Controller/var/logs/sspc_X_0.log
  • View patch history log: Displays the log from:
    /opt/SecureSpan/Controller/var/logs/patches.log
  • View patch client log: Displays the logs from:
    /opt/SecureSpan/Controller/var/logs/patch_cli_X_0.log
  • View patch verifier log: Displays the logs from:
    /opt/SecureSpan/Controller/var/logs/patch_verifier_X_0.log

View Enterprise Service Manager Log

(only if the Enterprise Service Manager is present)

Use this option to view the CA API Gateway - Enterprise Service Manager logs (if present):

/opt/SecureSpan/EnterpriseManager/var/logs/ssem_X_0.log

Viewing Logs on the Appliance Gateway using the File Structure

You can also access the Gateway log files directory through the file structure. The Gateway logs events or messages to the following locations:

  • /var/log/messages.*: These logs contain messages related to starting and stopping the Gateway, private authentication messages, and error conditions regarding the Gateway service. These logs also record the commands issued at the terminal.
  • /var/log/secure.*: These logs contain commands entered at the terminal and all messages pertaining to authentications.
  • /var/log/ssg_gc.log.*: These are the GC logs for garbage collection. They contain useful information for debugging purposes. The logs are maintained and rolled over by the Gateway process (starting with ssg_gc.log.0, up to ssg_gc.log.9). By default, there are 10 log files of 20 MB each, which are used and rolled over as they fill up.
  • /var/log/bash_commands.log: This log lists the bash commands entered at the terminal. Also records all activity from the Gateway main menu.
  • /opt/SecureSpan/Controller/var/logs/ : These logs contain messages generated by the process controller.
  • /opt/SecureSpan/Gateway/node/default/var/logs/ssg*: After system startup, further Gateway logs are written to log files in this directory. The logs are maintained and rolled over by the Gateway process (starting with ssg_0_0.log, up to ssg_0_9.log). By default, there are 10 log files of 20 MB each, which are used and rolled over as they fill up. The "default_startup_0_0.log" file stores startup log information.

    Tip: The default settings (10 log files/20MB each) work best in a low log volume environment. You may need to increase these values if you have high transaction rates, where a single log file could be filled in a matter of minutes. To change the size and number of log files, use the File Settings tab in the Log Sink Properties.

  • /opt/SecureSpan/Platform/data/log/FoundationServices.log: This log contains messages generated by the Restricted Shell commands.
  • /opt/SecureSpan/Gateway/config/backup/logs: This log contains messages related to backing up the Gateway.

Logs are created on startup, and logging continues between startup and shutdown. You can manually delete the logs when the Gateway is not running.

Viewing Logs on the Software Gateway

To view logs on the Software Gateway, open the log files in this location:

  • /opt/SecureSpan/Gateway/node/default/var/logs/ssg* : Gateway logs are written to a log file system located in this directory. The logs are maintained and rolled over by the Gateway process (starting with ssg_0_0.log, up to ssg_0_9.log). By default, there are 10 log files of 20 MB each, which are used and rolled over as they fill up.

Logs are created on startup, and logging continues between startup and shutdown. You can manually delete the logs when the Gateway is not running.

Viewing Logs from the Policy Manager

The Policy Manager has a built-in log viewer that you can use to view CA API Gateway node logs from any cluster node, provided that the log files are associated with an existing log sink. Use the logs to help you diagnose and resolve problems for a node.

To view logs using the Policy Manager:

  1. In the Policy Manager, select [View] > View Logs from the Main Menu (on the browser client, from the Monitor menu). The available logs to view are listed. If the list of logs is long, you can filter the display by entering some text into the Filter box. The filter string is matched against all columns, except for "Last Modified".

    Tip: When a filter is in place, the following message is displayed to remind you that the list is filtered: "Caution! Filter may exclude some logs." 

    Note: Only local logs are listed in the Select Log dialog. Local logs are those of type "File" in the Log Sink Properties.

  2. Select one or more log file(s) to view, then click [View]. Tip: Hold down the [Ctrl] key to select multiple files.
    The log details are displayed in the Log Viewer. The following table describes each part of the Log Viewer dialog:

    Setting

    Description

    <log entries>

    The box at the top of the dialog displays all the entries in the selected log. You can click on any line to view it in the log entry details box below.

    If the Tail option is selected, the list of log entries is updated dynamically, displaying the X most recent log entries.

    If a Filter is in place, this box displays only those log entries with text matching the filter string.

    <log entry details>

    When you select a log entry to view, the details are displayed in a more readable line-wrapped format in this details box.

    Filter

    To filter the list of log entries, type a filter string. The display is automatically updated to show only those lines containing the string. For example, to see only log entries with the severity WARNING, type 'warning' in the box.

    A message is displayed when a filter is in effect, to remind you that not all entries are visible.

    To clear the filter, delete the string.

    Tip: The filter string is matched anywhere within the log entry, with no case sensitivity.

    View last xxx line(s)

    Select this check box to display only the most xxx recent log entries . New lines are displayed as they become available (if not filtered). Enter how many recent entries to show, maximum 100.

    Clear this check box to display the entire contents of the log.

    Tip: Click [Refresh] to update the display after clearing this check box.

    Auto-Refresh

    Select this check box to have new log data retrieved from the CA API Gateway every few seconds. The log display will scroll automatically to display the latest lines in the log.

    Clear this check box to update the log only when the [Refresh] button is clicked.

    Showing xx/xx line(s)

    Displays the total number of events currently displayed in the log window, out of the total number of viewable entries. This is useful to see how many lines are displayed when a filter is used.

    Refresh

    Click this button to update the log data displayed.

    Tip: The [Refresh] button is not necessary when Auto-Refresh is enabled, but you can still use it to update the display in between auto refreshes.

    Cancel

    Click this button to cancel a manual refresh. For example, you may wish to cancel if a refresh is taking too long to complete.

    Last Updated

    Displays the date and time of the most recent update, whether auto or manual refresh.

     

  3. Click [Close] to close the Log Viewer and the Select Log dialogs when done.

Saving a Log File

Before saving the log, be sure the entries you want to save are currently displayed. Data that is filtered out will not be saved. For example, if you were viewing 'Severe' events, only 'Severe' events will be saved. If you wish to save the entire log, be sure to clear the filter first.

To save the log:

  1. In the Log Viewer dialog, select [File] > Save as.
  2. Specify a file name and location or use the defaults presented.

    Tip: Accepting the suggested file name makes it easier to sort and organize your saved logs. Be sure to preserve the ".txt" file extension.

  3. Click [Save]

 To view the saved log:

  • Open the saved log file using any text editor.

Configure the Log Message Format

By default, the Gateway logs provide a standard amount of detail. If necessary, you can change the format to show verbose details or the raw message.

Only system administrators or advanced technical users should attempt to change the log message format.

To configure the CA API Gateway log message format, edit the following properties in the ssglog.properties file:

sink.format.<format>
sink.format.<log sink name>.<format>

Examples:

  • sink.format.VERBOSE formats VERBOSE level messages for all Log Sinks
  • sink.format.MyErrorSink.RAW formats messages for the Log Sink named "MyErrorSink".

Tip: The CA API Gateway uses the Java standard/default log formatter java.util.logging.SimpleFormatter for the log messages. For more information, refer to this page in the Oracle documentation: https://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html

The following table describes the default format strings:

Log Format Format String
RAW %4$s
STANDARD %2$s %3$s: %4$s
VERBOSE [%8$s] %2$s %3$s %6$s: %4$s

The format string is a Java String.format formatting string. The following table lists the items that are available to be logged, with each referenced by number in the format string.

Index Value Data
1 JVM Time in millis
2 Java Log Level (INFO, WARNING, ...)
3 Logger Name (Class originating the log message)
4 Message logged
5 Thread ID (Note this is already written to Syslog via a lower level)
6 Source Method originating the log message
7 Exception message (this is automatically added when required, don't use)
8 Log Sink Name

For information on where the log formats are used, see Log Sink Properties.

Was this helpful?

Please log in to post comments.