Maximo

 View Only

How to Enable HTTP Access Log on Manage 8.x Liberty Server

By Jenny Wang posted 26 days ago

  

How to Enable Access Log on Manage Liberty server

With Manage 8, the Maximo servers are run as containers within the pods on OpenShift. The Liberty server and the configuration are part of the image that is deployed. How would you customize the server configuration? Additional Server Config is a feature that you can use to "instruct" the operator to add the server configuration you need to the Liberty image. You can find the steps in Manage 8.3 documentation.

For example, you can use additional server config to enable Maximo Liberty server to write http access log.

Use the MAS Manage configuration UI to supply the additional server config for the Manage bundle you would like add access log to.

Directly enter the content into the "Additional Server Config" field of the manage server bundle configuration screen. Include the entire httpendpoint configuration.

<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
      <httpEndpoint id="defaultHttpEndpoint" 
                sslOptionsRef="sslopt"
                host="*"
                httpPort="9080"
                httpsPort="9443" 
                protocolVersion="http/1.1" >
            <compression serverPreferredAlgorithm="deflate|gzip|x-gzip|zlib|identity|none">
                <types>+application/*</types>
                <types>-text/plain</types>
            </compression>
            <accessLogging filepath="/logs/accesslog.log" logFormat='%a %A %h %m %r %s %u %U'/>
        </httpEndpoint>
</server>  

If there is already additional server config supplied, edit the displayed secret to combine the server config. In the example below, masdev-manage-de--sb0--asc--sn is the secret name.

The secret would look like this:

After apply the change and activate Manage, or save the secret, the operator will apply the custom server.xml and the liberty server will be restarted to take effect.

You will find /logs/accesslog.log in the container of the Liberty server.

0 comments
9 views

Permalink