Configuring the xMatters Agent to record wire-level log messages

Question

Can I configure the xMatters Agent to record wire-level log messages?

Environment

All versions of xMatters.

Answer

Yes. The xMatters Agent logs basic information about the HTTP requests it makes by default, but you can configure the xMatters Agent to record detailed, low-level messages about the HTTP requests it initiates, and the corresponding responses, without installing external tools.

Note: The xMatters Agent for Linux already has debug-level messages enabled, therefore, no additional messages can be obtained from agents running on Linux.

Configuring the xMatters Agent to record wire-level log messages

  1. Open a command prompt as an administrator.
  2. Use the command prompt to issue the following command:
    write "c:\Program Files\xa\config\logback.xml"
  3. Add the following line, immediately prior to "<root level=“${logging.level.root:-INFO}“>":
    <logger name="org.apache.http.wire" level="DEBUG" />
  4. Save the file.
  5. Restart the xMatters Agent.

Viewing xMatters Agent wire-level messages

The wire-level messages are written to both the activity stream and the xMatters Agent log file. The new message will include the contents of the following headers:

  • > Accept-Charset:
  • > Authorization:
  • < cache-control:
  • < content-length:
  • < expires:

Disabling xMatters Agent wire-level log messages

  1. In c:\Program Files\xa\config\logback.xml., comment out the line that was added. For example:

    Replace:
    <logger name="org.apache.http.wire" level="DEBUG" />
    with:
    <!-- <logger name="org.apache.http.wire" level="DEBUG" /> -->
  2. Save the file and restart the Agent.

Note:  By default, C:\Program Files\xa\config\logback.xml cannot be edited by users who are not administrators. If a non-admin user needs to edit the file, the permissions will need to be altered by an administrator. 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk